theStack
commented at 6:28 PM on May 3, 2025:
contributor
While reviewing #31622 I noticed that the constant name (SCRIPT_)ERR_SIG_HASHTYPE is used for two different script verification error codes, namely one for legacy and one for Schnorr signatures:
In order to resolve this confusion, this PR adapts all script error constant names in the functional tests (currently only in feature_taproot.py) to the ones used in our C++ codebase (see script_error.cpp) with a scripted diff. This also makes checking whether we have test coverage for a certain script error easier.
DrahtBot
commented at 6:28 PM on May 3, 2025:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
#32247 (BIP-348 (OP_CHECKSIGFROMSTACK) (regtest only) by jamesob)
#29491 ([EXPERIMENTAL] Schnorr batch verification for blocks by fjahr)
#29371 (test: Add leaf_version parameter to taproot_tree_helper() by Christewart)
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.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
LLM Linter (✨ experimental)
Possible typos and grammar issues:
Error: “neither compressed or uncompressed” → “neither compressed nor uncompressed”
DrahtBot added the label Refactoring on May 3, 2025
scripted-diff: adapt script error constant names in feature_taproot.py
In order to remove potential confusion, this commit adapts all script
error constant names in the functional tests (currently only in
feature_taproot.py) to the ones used in our C++ codebase. This also
makes checking whether we have test coverage for a certain script error
easier.
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s|$1|$2|g" $( git grep -l "$1" -- "./test" ) ; }
ren ERR_SIG_SIZE ERR_SCHNORR_SIG_SIZE
ren ERR_SIG_HASHTYPE ERR_SCHNORR_SIG_HASHTYPE
ren ERR_SIG_SCHNORR ERR_SCHNORR_SIG
ren ERR_CONTROLBLOCK_SIZE ERR_TAPROOT_WRONG_CONTROL_SIZE
ren ERR_PUSH_LIMIT ERR_PUSH_SIZE
ren ERR_MINIMALIF ERR_TAPSCRIPT_MINIMALIF
ren ERR_UNKNOWN_PUBKEY ERR_PUBKEYTYPE
ren ERR_STACK_EMPTY ERR_INVALID_STACK_OPERATION
ren ERR_SIGOPS_RATIO ERR_TAPSCRIPT_VALIDATION_WEIGHT
ren ERR_UNDECODABLE ERR_BAD_OPCODE
ren ERR_NO_SUCCESS ERR_EVAL_FALSE
ren ERR_EMPTY_WITNESS ERR_WITNESS_PROGRAM_WITNESS_EMPTY
-END VERIFY SCRIPT-
b5f580c580
theStack force-pushed on May 3, 2025
DrahtBot added the label CI failed on May 3, 2025
DrahtBot
commented at 6:32 PM on May 3, 2025:
contributor
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed.
<sub>Task lint: https://github.com/bitcoin/bitcoin/runs/41591166714</sub>
<sub>LLM reason (✨ experimental): The CI failure is caused by errors in the lint check related to script evaluation failures, specifically ERR_EVAL_FALSE errors.</sub>
<details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
DrahtBot removed the label CI failed on May 3, 2025
Scripted-diff/func-test-only makes this an easy review. Good cleanup for this daunting file.
DrahtBot requested review from sipa on May 4, 2025
rkrux approved
rkrux
commented at 12:53 PM on May 5, 2025:
contributor
tACKb5f580c580257d28d295cae3f787b55eb1863f16
Having gone through feature_taproot.py file previously that can take a while to understand fully, this seems like a reasonable change to make it easier to follow the file by making the error constant names congruent with the ones in the cpp code.
+1 on using the scripted diff so that the reviewers need not manually verify each change in the file.
stratospher
commented at 5:51 AM on May 6, 2025:
contributor
ACKb5f580c. liked the consistency in script error names.
achow101
commented at 10:10 PM on May 6, 2025:
member
ACKb5f580c580257d28d295cae3f787b55eb1863f16
achow101 merged this on May 6, 2025
achow101 closed this on May 6, 2025
theStack deleted the branch on May 6, 2025
stickies-v referenced this in commit 772a33e052 on May 23, 2025
sedited referenced this in commit cb3cd9b8b9 on May 29, 2025
yuvicc referenced this in commit 069643f094 on Jul 6, 2025
bug-castercv502 referenced this in commit 2858098810 on Sep 28, 2025
Kino1994 referenced this in commit de2f5207dc on Jun 28, 2026
BigcoinBGC referenced this in commit f406e53d66 on Jun 30, 2026
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-08-04 01:51 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me