script – Why had been OP_RESERVED, OP_RESERVED1, and OP_RESERVED2 initially reserved?


Because the earliest public launch of Bitcoin, OP_RESERVED, OP_RESERVED1, and OP_RESERVED2 have been outlined at 0x50 (80), 0x89 (137), and 0x8a (138), respectively.


The meant function of all the opposite now-disabled opcodes appear to be properly documented, however do we now have any document or rationalization for why the OP_RESERVED{1,2} opcodes had been assigned at their present areas?

OP_RESERVED appears fairly clearly positioned to permit OP_1 (0x51, 81) by OP_16 (0x60, 96) to match every pushed quantity 1-to-1 with the second half of the byte (such that 0x515253 is well learn as OP_1 OP_2 OP_3). It could even be reserved to make sure customers writing uncooked contracts do not by accident assume 0x50 is both OP_0 (0x00) or OP_1NEGATE (0x4f, 79), which is likely to be simply confused as a result of 0x80 is mainly a unfavorable signal within the Script Quantity encoding. (Some other concepts as to why Satoshi did not fill in OP_RESERVED?)

For OP_RESERVED1 and OP_RESERVED2, the reasoning appears much less apparent.

Within the oldest commit they’re listed beneath // bit logic, a set of 8 opcodes which begins at 0x83 (131) and proceed by OP_RESERVED2 (0x8a, 138).

These do not appear to fall on any significantly particular codepoints, and neither of the previous or following opcode “teams” start or finish at any clearly particular codepoints.

Is there one thing uncommon about 0x89/137 and 0x8a/138 for which Satoshi may need reserved these codepoints?

Is there another instruction set which reserves them (or the place reserving them makes the “Bitcoin instruction set” according to that instruction set)?

Supply hyperlink

Leave a reply