Repository navigation
test: cover a genesis notification that reaches an index after its sync - #8210
Conversation
|
No actionable comments were generated in the recent review. WalkthroughAdds a test that synchronizes an Estimated code review effort: 2 (Simple) | ~8 minutes Possibly related PRs
Merge Risk:
|
|
✅ Final review complete — no blockers (commit 1be8fe8) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The shared BaseIndex guard prevents a late genesis notification from rewinding to a null parent, while a fresh index still appends genesis. The regression test delivers the notification after sync and checks that existing entries remain intact and the next block is indexed; no in-scope issues were found. Develop merges cleanly, and CI reports no failures: lint, Cppcheck, ClangFormat, and the ASan build passed, while the standard Linux build, ASan tests, and several dependency builds are still pending.
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The diff adds a narrow guard that skips a late genesis notification only when the index already has a best block, with a deterministic regression test. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 96% left, weekly 51% left; passed overgemini-3.8-flash-high(antigravity quota lookup failed) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— dash-core-commit-history (completed, effort medium); agentphase2-reviewer
thepastaclaw
left a comment
There was a problem hiding this comment.
CI failed after approval — commit c3d2de8
The standing review approved this commit; this follow-up moves the verdict to COMMENT: checks that failed after the review may relate to this change, and the evidence does not rule it out.
Failing checks:
linux64_nowallet-test / Test source(failure)
Why it is unclear: The log tail shows only test-log collection followed by exit code 1; it does not identify the failing test or show an assertion or crash. The wallet test directory names are not evidence that those tests failed, so the failure cannot be linked to or ruled out as a consequence of the BaseIndex change.
Nothing was re-reviewed: the findings of the standing review are unchanged. The next push gets a full review; a re-run that passes does not restore the approval.
Review provenance
Source: CI-check lane gpt-6.2-sol (agent: triage); no reviewer or verifier lanes ran for this follow-up
- Verdict moved because CI failed on this commit after the review; failure logs read: 1 GitHub Actions job(s)
|
This pull request has conflicts, please rebase. |
When the index sync thread catches up while the BlockConnected notification for the genesis block is still queued, BaseIndex receives it with a best block already set. The block has no parent, so the ancestor check passes (GetAncestor(-1) and pprev are both null). Before dashpay#8047, BlockConnected then called Rewind(best_block_index, nullptr), which dereferenced the null target and crashed the scheduler thread. This happens when -reindex-chainstate can connect only the genesis block: loadblk queues the genesis notification and the index sync finishes at height 0 before the scheduler delivers it. dashpay#8047's early return for a block the index already covers also covers genesis. Add a regression test that syncs an index, delivers the late genesis notification, and checks that nothing was un-indexed and the index keeps following the chain. Co-Authored-By: Claude Opus 5.5 <[email protected]>
c3d2de8 to
1be8fe8
Compare
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The PR adds a focused regression test covering a late genesis BlockConnected notification after the index has synchronized. The test exercises the queued validation-interface path, verifies the existing indexed chain remains intact, and confirms subsequent blocks are still indexed; the existing #8047 early return prevents the null-parent rewind. No in-scope correctness issues were found. CI has no reported code-check failures; remaining build and test jobs were still pending at the captured review state.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — This is a small, self-contained regression test change in src/test/baseindex_tests.cpp with no production behavior or critical-surface changes. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 92% left, weekly 49% left; passed overgemini-3.8-flash-high(antigravity quota lookup failed) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— dash-core-commit-history (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
Issue being fixed or feature implemented
A
-txindexnode used to segfault in the scheduler thread when an index received theBlockConnectednotification for the genesis block after its sync thread had already caught up:It showed up in
feature_assumeutxo_dash.pyon the AssumeUTXO branches, at the step where a node with-txindexrestarts with-reindex-chainstateand can connect only the genesis block. loadblk enqueuesBlockConnected(genesis), and the index sync finishes at height 0 before the scheduler delivers it. The genesis block has no parent, so the ancestor check passes (GetAncestor(-1)andpprevare both null) andBlockConnectedcalledRewind(best_block_index, nullptr).#8047 has since merged. Its early return for a block the index already covers (
best_block_index->GetAncestor(pindex->nHeight) == pindex) also covers genesis, so this PR no longer changessrc/index/base.cpp.What was done?
Adds a regression test for that case,
baseindex_tests/late_genesis_notification_keeps_index. It syncs an index to height 100, then deliversBlockConnectedfor genesis through the validation interface, as the queue does. It checks that the index still covers heights 0 to 100 and keeps following the chain (height 101).How Has This Been Tested?
baseindex_testspasses, 3 of 3 runs.memory access violation at address: 0x00000018, the same crash as above.Breaking Changes
None.
Checklist:
🤖 Generated with Claude Code