This BIP describes a soft fork to add 64-bit arithmetic op codes to bitcoin
Implementation: https://github.com/bitcoin/bitcoin/pull/29221
This BIP describes a soft fork to add 64-bit arithmetic op codes to bitcoin
Implementation: https://github.com/bitcoin/bitcoin/pull/29221
Why not push the overflow amount and the result back on the stack?
Rather than $2^{64}-1 + 3 = \mbox{FALSE}$, do $2^{64}-1 + 3 = 2, 1$. Where $2 = 2^{64}-1 + 3 \mod 2^{64}$ is the result and 1 is the overflow.
This would simply doing 256-bit math from 64-bit stack elements and I don’t see any downsides for 64-bit operations.
Why not push the overflow amount and the result back on the stack?
Rather than 264−1+3=FALSE, do 264−1+3=2,1. Where 2=264−1+3mod264 is the result and 1 is the overflow.
This would simply doing 256-bit math from 64-bit stack elements and I don’t see any downsides for 64-bit operations.
Sorry I don’t understand this. Could you maybe give a more concrete example, perhaps on delvingbitcoin? We have a thread going here: https://delvingbitcoin.org/t/64-bit-arithmetic-soft-fork/397/25
0@@ -0,0 +1,302 @@
1+<pre>
2+ BIP: TBD
3+ Layer: Consensus (soft fork)
4+ Title: 64 bit arithmetic operations
5+ Author: Chris Stewart <stewart.chris1234@gmail.com>
6+ Comments-Summary: No comments yet.
7+ Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0364
0@@ -0,0 +1,302 @@
1+<pre>
2+ BIP: TBD
3+ Layer: Consensus (soft fork)
4+ Title: 64 bit arithmetic operations
Maybe:
0 Title: 64-bit arithmetic operations
I just did a light first pass. I noticed that this document may be missing a Rationale Section that describes design decisions, alternate approaches, and related work, and a Backwards Compatibility section.
You may want to add the “Post-History” header to the preamble to link to discussions of this proposal on the mailing list or forums.
Hey @Christewart, are you still working on this?
Yep i’m going to give it another go. I’ll update soon.