[Proposal] 64-bit arithmetic in Script

Posted by Chris Stewart

May 12, 2025/16:15 UTC

The proposed soft fork aims to significantly enhance the numerical capabilities of Script by extending the range of numeric operands from the current -2^31+1 to 2^31-1, to a much broader -2^63+1 to 2^63-1. Similarly, it proposes to expand the result range for arithmetic operations from the existing -2^63 to 2^63-1, extending it to -2^127 to 2^127-1. This expansion is applied to all existing opcodes that are currently interpreting stack elements as numbers, which will now be upgraded to support 64-bit parameters. This enhancement maintains the original Bitcoin implementation's number encoding format and arithmetic semantics while significantly increasing the supported precision. The documentation and discussion for these changes can be found in detail within the GitHub repository here.

Chris, the author of the proposal, highlights that this initiative is aimed at laying the foundational groundwork necessary for introducing monetary amounts into Script. Although the document does not take a stance on the specific method of introduction, Chris mentions having prototyped several proposals related to integrating amount locks into Script. He believes the proposal has reached a level of stability that warrants serious review by the community. The communication underlines the technical advancements intended to bolster the Bitcoin scripting language's functionality and its potential implications for future developments.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback