-
Notifications
You must be signed in to change notification settings - Fork 37.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
base: master
Are you sure you want to change the base?
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 fe53feb I've run The changes make sense in preparation for future expansions, as said. |
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 1ccd751
Who am I to say, but I philosophically agree with your reasoning on not passing default parameters in critical test code. |
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
ed4febd
to
6a0406b
Compare
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.
Concept ACK
Please cleanup your commit message, it contains message fragments from squashed commits.
6a0406b
to
6ffdabd
Compare
Done in 6ffdabd |
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 6ffdabd
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 |
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 fca0367
fca0367
to
e6c1026
Compare
e6c1026
to
4560189
Compare
4560189
to
2eacaa2
Compare
Rebased |
2eacaa2
to
4194b44
Compare
4194b44
to
3b8b612
Compare
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
This PR adds a
leaf_version
parameter 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()
.