script – What’s OP_RETURN_252?

0
69


What’s OP_RETURN_252?

This is my guess:

The enter in a coinbase transaction is meaningless. The enter’s unlocking script (scriptSig) can by no means be executed. So it’s by no means checked for validity. It’s only utilized by miners, as a byte array, to file some personal info which has no goal for the remainder of the Bitcoin community (however see observe beneath about BIP34 peak in coinbase).

Opcodes between 185 (OP_NOP10) and 253 (OP_PUBKEYHASH) are undefined.

I believe the parser utilized by the mempool.area web site has foolishly been requested to provide a disassembled opcode interpretation of the bytes in a meaningless locking script in an enter in a coinbase transaction. It arbitrarily assigns the fictional title OP_RETURN_186 by OP_RETURN_252 to bytes within the vary 186-252 which happen at a degree in a script the place an opcode can be anticipated in a non-coinbase unlocking script.

I assume they selected names starting with OP_RETURN, and making these codes a form of synonym of OP_RETURN, in order that the beleaguered parser is relieved of any obligation to parse the next bytes.

I’d ignore the gibberish produced by mempool.area for a coinbase enter.


Is there some official documentation about these someplace?

No.

Partly as a result of Bitcoin has no officers to officiate official lists.


Coinbase enter

(Notes from feedback by PW imported right here for larger prominence)

Coinbase inputs aren’t scripts – they’re simply byte arrays. They’re by no means executed, so it does not truly matter that they include gibberish.

Coinbases will need to have precisely one enter (no thought why, it is only a rule that has at all times existed), and since BIP34 (height-in-coinbase, launched in 2012), the coinbase enter’s scriptSig should begin with the script bytes akin to pushing the block’s peak onto the stack. The bytes after that push are nonetheless allowed to be gibberish nonetheless. There may be additionally a rule that has at all times existed that the coinbase enter scriptSig should be at most 100 bytes lengthy (and at the least 2, although that is implied now by its peak push).

LEAVE A REPLY

Please enter your comment!
Please enter your name here