Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64bit arith inquisition #49

Draft
wants to merge 3 commits into
base: 26.x
Choose a base branch
from

Conversation

Christewart
Copy link

This PR replaces #48 and targets 26.x of bitcoin core. It looks like there is a ton of conflicts if I were to target 25.x .

This PRs implements signed integer 64 bit arithmetic in the Script interpreter.

It corresponds to this PR on the bitcoin core repo and this delving bitcoin discussion: bitcoin#29221

It corresponds to this BIP pull req: bitcoin/bips#1538

This implementation purposefully avoids using CScriptNum, if you would like to see what a CScriptNum implementation looks like, please see this branch: https://github.com/Christewart/bitcoin/tree/64bit-arith-cscriptnum

If you would like to see usage of these op codes, please see my OP_INOUT_AMOUNT implementation and delving bitcoin discussion: https://github.com/Christewart/bitcoin/tree/op-inout-amount

Rework IsOpSuccess() to use SigVersion rather than leaf_version

Use switch based impl for IsOpSuccess()

Remove default in switch statement

Fix compiler warning

Move SigVersion to sigversion.h

Fix includes

try to fix compile

Add sigversion.h

Add include guards
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
@ajtowns ajtowns deleted the branch bitcoin-inquisition:26.x April 9, 2024 08:21
@ajtowns ajtowns closed this Apr 9, 2024
@ajtowns ajtowns reopened this Apr 9, 2024
@ajtowns ajtowns added this to the 26.x milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants