1

Can someone explain how this transaction was validated, broadcasted and mined?

When i looked at the scriptsig it only had the hex value for OP_True.

https://blockchain.info/tx/91c8b08f305d895d6bc8f43bbdd36dcbc7f1d998e3df5e8f13dd9cdeebf15cb5?show_adv=true Also how can i create a transaction like this and have it broadcasted and mined?

1

Normally, non standard transactions would be rejected by P2P nodes (but would still be mineable by miners directly since this is just a policy rule).

P2SH addresses do not disclose the script they hash until they are first spent from. So you can send BTC to any script (valid or not) using P2SH addresses. Standardness rules are not imposed on P2SH input scripts, they just have to respect the protocol rules (size, use enabled opcodes, etc...).

To create your own scripts, you can use this question as a starting point.

  • But wouldn't miners reject it without a siganture or is the redeem script hash a hash of OP_TRUE in the scriptsig allowing it to be mined? – John Mar 19 '18 at 19:55
  • The script hashed by the address was OP_TRUE, which is valid by itself. Miners won't reject non standard scripts in P2SH spends (but would normally if used outside of P2SH). – alcio Mar 19 '18 at 20:55
  • So if the transaction is p2sh and i put the scriptsig as OP_True it will be valid but non standard? – John Mar 20 '18 at 1:47
  • It will be valid, the script will be non standard but the transaction will still be relayed. – alcio Mar 20 '18 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.