CashScript / cashscript

⚖️ Easily write and interact with Bitcoin Cash smart contracts
https://cashscript.org
MIT License
115 stars 80 forks source link

Nov 14 deadline: 2025 BCH upgrade approval #219

Closed bitjson closed 22 hours ago

bitjson commented 1 week ago

Hello,

This is a formal request for approval from CashScript regarding the May 2025 upgrade of Bitcoin Cash (BCH).

"CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits" and "CHIP-2024-07 BigInt: High-Precision Arithmetic for Bitcoin Cash" have achieved the Cash Improvement Proposal (CHIP) milestones required to be locked in on November 15, 2024 and activated on May 15, 2025.

The CHIP contributors believe CashScript is an important stakeholder in the Bitcoin Cash ecosystem. Please respond by 12:00 UTC on November 14, 2024; non-responses will be considered "Abstain (Neutral)".

Does CashScript approve of activating "CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits" and "CHIP-2024-07 BigInt: High-Precision Arithmetic for Bitcoin Cash" in the May 2025 Upgrade to Bitcoin Cash (BCH)? - Yes (Approve) - No (Disapprove), or - Abstain (Neutral) Separate responses may also be given for each CHIP. To make a public statement explaining this decision, please provide it here (required for disapprovals):

For reference:

Please let me know if you have any questions.

Thank you,
Jason Dreyzehner
VM Limits CHIP & BigInt CHIP Maintainer

mr-zwets commented 1 day ago

Thanks for reaching out! Here are our two approval statements 😄

VM Limits Approval

The CashScript compiler has been one of the main tools through which BCH contract developers encounter the current, overly restrictive VM limits. The implementation of the 'Targeted VM Limits' CHIP will significantly reduce this pain point, providing much-needed flexibility without compromising the security or scalability of the network.

For BCH contract developers, the most immediate limit will shift from the current 201-opcode limit to the 1650-byte input size standard rule. This CHIP effectively expands the capacity of smart contracts to include approximately ~10x the number of opcodes or ~3x the byte size.

We are excited to eliminate the 201-opcode and 520-byte limits from the CashScript compiler, empowering BCH contract developers to experiment with and build more powerful and innovative smart contracts.

BigInt approval:

Integer overflows have been a significant edge case that BCH smart contract developers must carefully account for in their contract design. While Bitcoin Cash previously increased the integer size to 64-bit to work nicely with native introspection, developers have still run into the 64-bit integer limit, particularly with advanced algorithms such as those used in AMM DEXs. Even on Ethereum, which utilizes 256-bit integers, developers often rely on external libraries to emulate higher-precision math. The proposed BigInts CHIP will address these challenges directly, simplifying contract development by eliminating integer overflow as a critical concern.

This enhancement will not only lower the barrier for developers but also enable new possibilities for innovation, such as implementing advanced cryptographic functions within contracts using the existing math primitives. BigInts can be introduced safely due to the comprehensive research and testing of the 'Targeted VM Limits' CHIP, which demonstrated that the current length limit on integers no longer serves a meaningful purpose.

By sidestepping the complexities of emulating higher precision math, BigInts offer a robust solution that will significantly benefit a wide range of smart contract applications on Bitcoin Cash.

bitjson commented 14 hours ago

Fantastic, thanks @mr-zwets and @rkalis!