delvingbitcoin
64 bit arithmetic soft fork
Posted on: January 11, 2024 17:39 UTC
The email discussion revolves around the complexity and potential confusion arising from a script containing multiple operation codes (opcodes), such as OP_ADD, OP_SUB, and OP_ENABLE64BIT.
The suggestion offered to mitigate this confusion involves a particular constraint on the opcode ENABLE64BIT
. It is proposed that ENABLE64BIT
should be designed to cause the script to fail if it is not placed as the first opcode in the script sequence, with the exception of any OP_SUCCESSx
operations.
Furthermore, the proposition extends to future upgrades that may introduce new opcodes with the prefix 'ENABLE'. These future opcodes would ideally have the flexibility to appear in any order at the beginning of the script. This added leniency, however, is currently reserved for the introduction of new opcodes and does not apply to ENABLE64BIT
.
The recommendation also includes strict enforcement of the placement rule for ENABLE64BIT
, even within conditional branches of the script that are not executed, such as those within an IF/ELSE
structure. This ensures consistency in the script's behavior and avoids unintended consequences when certain branches are not activated during script execution. By enforcing these guidelines, the clarity and predictability of the scripting language can be significantly improved, facilitating its current use and providing a structured approach for future expansions.