-
Notifications
You must be signed in to change notification settings - Fork 38.1k
test: Fix reorg patterns in tests to use proper fork-based approach #32587
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?
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/32587. 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. 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. |
feel free to ping me when it's ready |
Sure! |
7bbdba1
to
516c6ce
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. |
516c6ce
to
b70c907
Compare
@instagibbs can you review this, will add other tests once this one gets ACK'ed |
b70c907
to
9565415
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 with the approach . Left some nits
9565415
to
45fad54
Compare
Addressed some nits and rebased with master! |
35414a8
to
c98f361
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.
LGTM c98f361
feel free to add more cases
c98f361
to
3012d6d
Compare
e186193
to
f079571
Compare
Fixed conflicts and rebased to master. |
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 cec7ce0
changes since I last reviewed
- the PR has been extended to 5 more tests other than
mempool_reorg.py
- Tested and reviewed the added tests.
forgot about this, definitely worthwhile to get merged soon |
cec7ce0
to
e4c4d7f
Compare
Rebased to 1ed00a0. |
e4c4d7f
to
0f1f029
Compare
Fixed some linter errors. No change in tests. |
@instagibbs @mzumsande want to circle back here for a look? |
ACK 0f1f029
|
tACK 0f1f029 |
looks like you forgot to remove the definition from |
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.
Looks pretty good, just a few comments.
A nice-to-have: in the functional tests with multiple nodes, it would be a bit more realistic / interesting if the two forks were mined by different nodes.
assert_equal(entry1['fees']['base'], entry0['fees']['base']) | ||
assert_equal(entry1['vsize'], entry0['vsize']) | ||
assert_equal(entry1['depends'], entry0['depends']) | ||
|
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.
There is still an invalidateblock
in this test?
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.
ping, could you respond to this @yuvicc
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.
have you had a chance to look at this?
0f1f029
to
48b3819
Compare
…py module to enable reuse across multiple tests.
48b3819
to
7defbc7
Compare
Thank you @glozow and @instagibbs for the review. Addressed feedback:
Additionally, updated the |
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.
assert_equal(entry1['fees']['base'], entry0['fees']['base']) | ||
assert_equal(entry1['vsize'], entry0['vsize']) | ||
assert_equal(entry1['depends'], entry0['depends']) | ||
|
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.
ping, could you respond to this @yuvicc
7defbc7
to
f0717d0
Compare
|
Updated functional tests to replace direct use of
invalidateblock
with proper fork-based reorg behaviour. The direct invalidation approach bypasses important validation checks and has depth limitations(10 block) that don't match real-world reorg scenarios. For more details see #32531.Fixes #32531