fix: intermittent incorrect logging of CheckQueue for invalid blocks#7312
Conversation
It helps to return valid error during ConnectBlock instead no-named failure
2024-09-23T13:13:10Z ERROR: ConnectBlock: CheckQueue failed
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe pull request modifies Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Review complete (commit 76e6645) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
I reviewed the exact queued head 76e6645cd43e73847e1444bb1aef788f58e8c0cf and only src/validation.cpp changes in this PR. The change is a narrowly scoped fix to object lifetime ordering in CChainState::ConnectBlock: txsdata is now guaranteed to outlive CCheckQueueControl, which matches the existing comment and prevents queued CScriptCheck workers from observing destroyed PrecomputedTransactionData. I did not find any correctness, consensus, or Dash-specific interaction issues in the current patch.
Reviewed commit: 76e6645
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
The single-line reordering in src/validation.cpp ensures txsdata is constructed before CCheckQueueControl<CScriptCheck> control and therefore destroyed after it, matching the in-source comment that txsdata must remain valid until control's destructor finishes running queued script checks. The fix is narrow, correct, and has no Dash subsystem interaction.
Reviewed commit: 76e6645
Fresh dispatcher run for this queue item. A same-SHA review already existed, so this records the fresh verification without duplicating inline threads.
Code Review
Reviewed commit: 76e6645
… for invalid blocks 76e6645 fix: intermittent incorrect logging of CheckQueue for invalid blocks (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented ConnectBlock may return no-named failure instead proper error code such as: 2024-09-23T13:13:10Z ERROR: ConnectBlock: CheckQueue failed ## What was done? This PR fixes this intermittent failure ## How Has This Been Tested? N/A ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 76e6645 Tree-SHA512: 5d2b2d40ae65086082dc81c4d0faf9dc2895db1e97cfe1d47857efc6ec5050ea930ca501eb8ef56ebc70ff7e0a14622b69979e63a8d3c1d6703875da06121e8b (cherry picked from commit f4f0b49)
… for invalid blocks 76e6645 fix: intermittent incorrect logging of CheckQueue for invalid blocks (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented ConnectBlock may return no-named failure instead proper error code such as: 2024-09-23T13:13:10Z ERROR: ConnectBlock: CheckQueue failed ## What was done? This PR fixes this intermittent failure ## How Has This Been Tested? N/A ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 76e6645 Tree-SHA512: 5d2b2d40ae65086082dc81c4d0faf9dc2895db1e97cfe1d47857efc6ec5050ea930ca501eb8ef56ebc70ff7e0a14622b69979e63a8d3c1d6703875da06121e8b (cherry picked from commit f4f0b49)
Issue being fixed or feature implemented
ConnectBlock may return no-named failure instead proper error code such as:
What was done?
This PR fixes this intermittent failure
How Has This Been Tested?
N/A
Breaking Changes
N/A
Checklist: