Author: Johnson Lau 2016-04-29 05:48:10
Published on: 2016-04-29T05:48:10+00:00
The BIP (Bitcoin Improvement Proposal) defines the scripting system in Merkelized Abstract Syntax Tree and re-enables some of the previously disabled opcodes, introduces new opcodes, and defines expandable opcodes for future extension. The proposed changes include re-enabling CAT, SUBSTR, LEFT, RIGHT, INVERT, AND, OR, XOR, LSHIFT, and RSHIFT, introducing new opcodes like DUPTOALTSTACK, DUPFROMALTSTACK, SWAPSTACK, SWAPCAT, and RESIZE, and defining expandable opcodes for future softforks of stack manipulating opcodes: EXPAND1 to EXPAND32. This BIP is based on the BIP114 MAST. A reference implementation, including the BIP9 logic and script tests, can be found at https://github.com/jl2012/bitcoin/tree/segwit_mast. However, the BIP9 activation has not been tested yet. The implementation of the re-enabled opcode are mostly taken from the Elements Project.The BIP does not describe changes in CHECKSIG, which should be another BIP. The author also considered more radical changes, such as making all comparison opcode to be “VERIFY” type, and a script passes if and only if the stack is exactly empty after evaluation.
Updated on: 2023-05-19T23:16:35.844594+00:00