Posted by ajtowns
Jan 11, 2024/17:42 UTC
The proposal under consideration introduces a new opcode, OP_ENABLE64BIT
, designed to extend the capacity of arithmetic operations within a scripting language. When this opcode is executed within a script, its primary function would be to allow arithmetic opcodes to accept inputs up to 8 bytes in size, effectively enhancing their computational range.
Drawing inspiration from the implementation in liquid/elements, the suggested modification to the mathematical operations such as ADD and SUB would result in a significant behavioral change from the current system. Specifically, the outcome of these operations would involve pushing two values onto the stack: firstly, a boolean value indicating the success or failure of the operation based on the input range (TRUE if the operands were within the acceptable range, FALSE otherwise), followed by the actual result of the computation provided that the operands were indeed within the specified range.
This approach marks a departure from the existing operational mechanism in Bitcoin's script where mathematical opcodes behave differently. The implications of altering established opcodes to align with this new behavior warrant careful consideration due to the fundamental shift it represents in the execution of arithmetic instructions.
TLDR
We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project?
Give Feedback