-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Add leaf_version parameter to taproot_tree_helper()
#29371
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
test: Add leaf_version parameter to taproot_tree_helper()
#29371
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29371. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
778c65e to
fe53feb
Compare
|
Tested ACK fe53febee0288809184ef6f49131fa342ae86f7b I've run The changes make sense in preparation for future expansions, as said. |
scgbckbone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
fe53feb to
25dc427
Compare
|
I believe this CI failure is spurious: https://github.com/bitcoin/bitcoin/pull/29371/checks?check_run_id=21277712706 Could someone restart the job ( 🙏 ) or I can push an empty commit to restart everything. |
25dc427 to
00f5d15
Compare
00f5d15 to
accc172
Compare
accc172 to
1ccd751
Compare
|
Concept ACK In order to avoid changes in functional tests and keep the patch small and simple, it probably would makes sense to set |
This is more philsophical, but I really prefer not to provide default parameters to critical test code like this. It is SO easy to just forget to pass a parameter and have your test cases not test all possible branches of code! In this case, when dealing with consensus critical test cases, I think it should be required that the developer of the unit test pass in the tapscript version they are intending to test rather than us just assuming they want to test Please see #29221 for examples of this. For instance if I forgot to pass Reasonable minds can differ of course, for future readers of the PR leave a comment or give me a 👎 if you disagree and would like to see the default parameter used in this case. If it is clear that I'm in the minority, I will change it. |
|
tested ACK 1ccd751f5d5a5d6b970e7a6a3179e0403c6b9c90
Who am I to say, but I philosophically agree with your reasoning on not passing default parameters in critical test code. |
scgbckbone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK (I'm pro default function parameter)
1ccd751 to
ac5d855
Compare
scgbckbone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
6ffdabd to
fca0367
Compare
|
Rebased |
itornaza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rtACK fca0367d9a6f8a4296d41cc9b344c94b93ef136b
fca0367 to
e6c1026
Compare
e6c1026 to
4560189
Compare
4560189 to
2eacaa2
Compare
|
Rebased |
2eacaa2 to
4194b44
Compare
4194b44 to
3b8b612
Compare
scgbckbone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Unless I'm missing something, this is untrue?
bitcoin/test/functional/feature_taproot.py Line 1683 in 7d27af9
Can you explain why this is insufficient for usage? |
Hi @instagibbs I missed this and you are correct. I modified the code base to remove the default Closing this for now. |
This PR adds a
leaf_versionparameter totaproot_tree_helper(). Previously the leaf version was hard coded, because we only currently support 1 leaf version.Proposed soft forks such as #29221 require new leaf versions to be allocated. This PR allows the test framework to accomodate new leaf versions. This commit is also included in #29221, but in the policy of trying to avoid mega-PRs, I carved this out into a separate PR that can be merged.
This PR does not alter any test functionality, just adds a parameter and uses it across the codebase rather than hard coding the value inside of
taproot_tree_helper().