- What is the purpose of the RETURN PUSHDATA(36)(...), actually, in theory, this output can never be consumed by anyone, because there is no OP_CHECKSIG or similar OP at the end to return true in the Script stack.
From my understanding, this is mandatory in SegWit enabled blocks.
The second script (starting with OP_RETURN
) provides the merkleroot of the witness tree. IIRC it was created this way to prevent a hard fork. Adding an extra field into the block header would defiantly require a hard fork, so the best alternative was to place the data somewhere already available in all current blocks. Since the OP_RETURN
script will never be a valid output, it will simply be ignored.
Reference and more information: here and hereBIP141 Commitment structure and a similar question