Closed rkalis closed 2 years ago
Note that we do not need to add support for bigint
for any "satoshis" values, since the max amoount of satoshis is 21 000 000 00000000
, while the max value of a JS number is 90 071 992 54740991
(about 4x the max satoshis).
Also note that locktime and version fields in the transaction fit within a JS number
since they're 32bit integers.
This has been implemented in v0.7.0-next.0
. If some issues with it come up I'll have the time to fix that before May, if no issues come up, I will release v0.7.0
once the May 2022 upgrade hits mainnet.
v0.7.0
has been released for mainnet support of bigger integers and OP_MUL
Link to the CHIP: https://gitlab.com/GeneralProtocols/research/chips/-/blob/master/CHIP-2021-02-Bigger-Script-Integers.md
No action seems to be required for bigger integer support on the compiler side. However on the SDK side JS numbers are limited to 53 bytes (versus 64 bytes of the new BCH big integers). So for that we need to allow the use of JS
bigint
at any place where you can currently providenumber
parameters.The second part of the CHIP is the enabling of OP_MUL, so the
*
operator needs to be added to CashScript.