Yes. I also think it’s better not to encroach too much on available opcode space.
Eh, current script arithmetic opcodes are limited to 4-byte inputs, which means 32 bits signed integers.
I have no comment on whether we should pursue changing that.
One possibility is having an OP_ENABLE64BIT
, which has no effect on the stack when executed, but its presence in a script makes all arithmetic opcodes accept up to 8-byte inputs for example. This will not affect any existing scripts because existing scripts don’t have OP_ENABLE64BIT
in them. It has the advantage of, even if OP_ENABLE64BIT
is present, not changing semantics of valid existing scripts. And it is softfork-safe because the mere presence (not even execution) of OP_ENABLE64BIT
makes a script anyone-can-spend according to the existing consensus rules.
Alternatively, a new taproot leaf version could be used too. That’s even more compact.