Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Previously included in bitcoin-inquisition (bitcoin-inquisition#58, also bitcoin-inquisition#64 and bitcoin-inquisition#79). Makes minimal changes to consensus logic, but still has to duplicate a bunch of code to get equivalent behaviour, might be worthwhile simplifying that API in followups, and potentially exposing as a kernel API of some sort? |
d14b4f7 to
a64f2ac
Compare
|
tACK a64f2ac Ran tool_utils, the script unit tests and feature_taproot on the head, and both examples from the description reproduce here. The PR description mentions |
a64f2ac to
3c221d0
Compare
3c221d0 to
598427f
Compare
|
Rebased, added a test that uses |
|
Tested 598427f. I ran the 1214 rows of script_tests.json that evalscript can express, each as a chain of calls (scriptSig, then scriptPubKey, then the redeem or witness script) with -tx and -spentoutput. All 1214 gave the expected result, and so did the 5 tapscript rows. The other 18 rows fail in checks that VerifyScript makes outside EvalScript. I also ran 10,000 random scripts under each sigversion with NONE, MANDATORY and STANDARD flags, 90,000 runs, and compared them with btclib's interpreter. Success and error matched on all but 246 runs. In those, both sides failed with different error codes, and all come from three btclib bugs. evalscript never crashed. One trap: a script argument that is valid hex is read as raw bytes. |
Review with `git diff --color-moved=zebra --color-moved-ws=allow-indentation-change`
598427f to
1b69b2c
Compare
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
1b69b2c to
f0acf4e
Compare

Adds an
evalscriptsubcommand for using bitcoin's consensus logic to evaluate script fragments. Intended for debugging and development.Examples: