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


For the reason that 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 supposed goal of all the opposite now-disabled opcodes appear to be nicely documented, however do now we have any report or clarification 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) via 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 might even be reserved to make sure customers writing uncooked contracts do not by chance 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 destructive signal within the Script Quantity encoding. (Another 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 via OP_RESERVED2 (0x8a, 138).

These do not appear to fall on any notably 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 might need reserved these codepoints?

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

Supply hyperlink

Leave a reply