-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test, assumeutxo: Remove resolved todo comments and add new test #30403
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. 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. |
|
ACK 9d5a89509031ce924b9685a6e2e4b19cfef50a9e I wonder if this is a good place to discuss other (potentially addressed) TODOs? For example, interesting starting states could be loading a snapshot when the current chain tip is:
|
tdb3
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 9d5a89509031ce924b9685a6e2e4b19cfef50a9e
Double checking #30403 (comment) would also be good as well.
Right, good idea. I avoided this for a while because I thought I might miss something because I misinterpret them but since we had these detailed discussions in #29996 I am now pretty confident we can remove some that are addressed.
I think this is addressed and I am also unsure if this was ever not addressed :) Elsewhere I realized that I am not sure if "chain tip" in this comment refers to sync of headers or of blocks. But either way: If this is about blocks then any successful load is addressing this because if we have synced past the snapshot base block we fail because we don't need assumeutxo anymore. And if this is about headers then this is the
Yeah, I agree and if it is just headers in this case again it would be represented in all of the successful loads in the test. |
|
I have amended the commit to remove the previously named comments + made @alfonsoromanz co-author. In the second commit I now resolve one of the few remaining cases where the tip is on the same block as the snapshot. This is a special case of the "more work" case so this was quite simple to do. I think this means with this and the remaining open test PRs from @alfonsoromanz and @mzumsande we could resolve this list completely :) |
|
To give more detail where they are resolved: I think #30320 resolves two of the remaining three, it's just not part of the PR yet, see: #30320 (comment) and #29996 removes the third as already done in the commit here: 5b7f70b. The last one to get merged gets to remove the whole comment section 🥳 |
alfonsoromanz
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.
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.
Code Review ACK 29d19c414c9e138c99f8de84e398528db92ff07e
I will close PR #29681 in favor of this
|
Oh, sorry @BrandonOdiwuor , I missed #29681 😞 |
tdb3
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 29d19c414c9e138c99f8de84e398528db92ff07e
Left some nits.
alfonsoromanz
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 e523bcfc3403700debe1f286fa8c3db2d347e40b
|
Rebased |
tdb3
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 e1018672672f39910655ab37080bf3213ca55a39
alfonsoromanz
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 e1018672672f39910655ab37080bf3213ca55a39
- "Valid snapshot file, but referencing a snapshot block that turns out to be invalid, or has an invalid parent" has been addressed in bitcoin#30267 - "An ancestor of snapshot block" - If chain tip refers to blocks in this context then any successful load is addressing this because if we have synced past the snapshot base block we fail because we don't need assumeutxo anymore. And if this is about headers then this is the `test_headers_not_synced()` case. - "A descendant of the snapshot block" - If this refers to blocks the `test_snapshot_with_less_work()` addressed this and if it is just headers in this case again it would be represented in all of the successful loads in the test. Co-authored-by: Alfonso Roman Zubeldia <[email protected]>
Also pulls out the guarding assert and calls it explicitly before the test function is called. This is already done before the existing call of the test function so it was not needed there.
|
Rebased and since this is the last of the PRs addressing the TODOs comment in |
|
ACK d63ef73 |
maflcko
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 d63ef73
left a nit (possibly a new test idea, but this can be done later).
| - TODO: Valid snapshot file, but referencing a snapshot block that turns out to be | ||
| invalid, or has an invalid parent |
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.
alfonsoromanz
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 d63ef73
|
ACK d63ef73 |
The first commit removes three Todos that have been addressed previously (see commit message for details).
The second message resolves another todo by adding the missing test case. This is a special case of "the tip has more work than the snapshot" where the tip is the same block as the snapshot base block.
Related to #28648.