CHIPs · CHIP-2024-07 · activated
BigInt: High-Precision Arithmetic for Bitcoin Cash
Removes the script number length limit, so contracts can do arithmetic on numbers up to the 10,000-byte stack item size.
Summary
BigInt builds on VM Limits by removing one more limit: the maximum length of VM
numbers (nMaxNumSize). Numbers had been capped at 8 bytes (64-bit) since
2022. See BigInt.
Motivation
“Many financial and cryptographic applications require higher-precision arithmetic than is currently available to Bitcoin Cash contracts.” Before VM Limits, the anti-DoS design could not safely allow bigger numbers. Once VM Limits charges arithmetic by its real cost, higher precision can be enabled “without increasing the processing or memory requirements of the VM.”
The CHIP lists two benefits:
- Safer contracts. No more math emulation, which is hard to review. Fewer overflows mean fewer bugs that could expose users to losses.
- Smaller transactions. Removing emulation code shrinks contracts and lowers fees.
What it specifies
- The number length limit is removed.
- The 10,000-byte stack element limit from VM Limits still bounds both operands and results.
- Arithmetic operations are charged by the VM Limits operation cost rules, so a huge multiplication costs more than a small one.
Current status
Final. Activated on 15 May 2025. Proposed together with VM Limits, which it requires.
The stakeholder table records 124 approvals, 4 disapprovals (Flowee, Knuth, Flowee Pay, Flowee Products) and 345 neutral; non-responses were counted as neutral.
Stakeholder positions
Only public statements we could link to. Silence is not listed as a position.