delvingbitcoin

64 bit arithmetic soft fork

64 bit arithmetic soft fork

Original Postby halseth

Posted on: February 27, 2024 14:12 UTC

In discussing the modification of the IN_OUT opcode to accommodate a 64-bit ScriptNum type encoding rather than the little-endian (LE) variant, it's highlighted that the transition would not be significantly complex.

The core adjustment involves pushing a ScriptNum encoded integer onto the stack, as exemplified in the provided code snippet. This method utilizes the CScriptNum constructor to encode the funding amount before appending it to the stack with the stack.push_back(bn.getvch()); function call. This approach underlines a straightforward adaptation process for the opcode, focusing on efficiently managing numeric data types within the scripting environment.