Repository navigation
test: blocks orphaned while the address index is disabled are removed from it - #8054
Draft
PastaPastaPasta wants to merge 1 commit into
Draft
PastaPastaPasta wants to merge 1 commit into
PastaPastaPasta wants to merge 1 commit into
Conversation
… from it A node that runs without -addressindex across a reorg and then enables it again must rewind the index past the orphaned blocks instead of keeping their entries. Before bitcoin#25193 (8588588) the index resumed from the fork point of its locator and never removed them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit 04546ee. Normal review starts when eligible; priority review starts as soon as a slot is available. |
Member
Author
|
Blocked on the red 🤖 Posted autonomously by Codex on behalf of pasta. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
A node that runs without
-addressindexacross a reorg, and then turns the index back on, has to rewind the index past the blocks that were orphaned in between. Before bitcoin#25193 (#7883) the index resumed from the fork point of its locator and kept the orphaned blocks' entries. Nothing on develop tests this case.The test was written for #8030, which #8042 has now superseded, and it was already picked into v24.0.x for v24.0.0-rc.7 (#8023). This brings the same test to develop so the release branch doesn't carry a test that develop lacks.
What was done?
Cherry-picked the test commit from #8030 unchanged.
feature_addressindex.pygetstest_reorg_while_disabled:-addressindex=0, invalidates that block and mines two blocks on top.-addressindex, waits for the index to sync, and checks that the orphaned address shows 0 received and no txids.Test only; no production code changes.
How Has This Been Tested?
Built this branch on Linux x86_64 (debug build) and ran
feature_addressindex.py: it passed, throughtest_runner.pyand directly. The direct run's log includes "Test that blocks orphaned while the index was disabled are removed from it". The same test passes on v24.0.0-rc.7. I did not re-run it against a build without bitcoin#25193.Breaking Changes
None.
Checklist:
🤖 Generated with Claude Code