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)
293f778 doc: trim v23.1.3 release note test detail (PastaClaw) 2c0015a chore: prepare v23.1.3 release (PastaClaw) d08fdd7 Merge #7312: fix: intermittent incorrect logging of CheckQueue for invalid blocks (pasta) 4616073 Merge #7289: revert: "fix: avoid improper dual way connection attempts" + tests (pasta) 5e0af0b Merge #7279: test: RPC coverage linter + related fixes for listaddressbalances (pasta) 5bc0bd5 Merge #7293: fix: keep sending ISDLOCK invs to non-MN peers with watchquorums (pasta) 1b52c85 Merge #7271: Merge bitcoin-core/gui#555: Restore Send button when using external signer (pasta) Pull request description: # Release Preparation for v23.1.3 Prepares Dash Core v23.1.3 on the `v23.1.x` branch. ## Changes - **Version bump:** 23.1.2 → 23.1.3 (`configure.ac`) - **Backports included:** - dash#7271 — Restore Send button when using external signer - dash#7279 — RPC coverage linter + `listaddressbalances` fixes - dash#7289 — Revert improper dual-way connection attempts + tests - dash#7293 — Keep sending ISDLOCK invs to non-MN peers with `watchquorums` - dash#7312 — Fix intermittent incorrect logging of CheckQueue for invalid blocks - **Release notes:** Archived v23.1.2 notes and wrote v23.1.3 notes - **Flatpak metainfo:** Added v23.1.3 release entry dated 2026-05-15 - **Manpages:** Regenerated for v23.1.3 / May 2026 - **Chainparams:** Refreshed mainnet `nMinimumChainWork`, `defaultAssumeValid`, `checkpointData`, and `chainTxData`; testnet is intentionally unchanged for this patch release ## Chainparams source data Mainnet was updated from a synced node using a chainlocked block two blocks back from tip: - Height: 2471728 - Hash: `000000000000001a19ad7270422a00f86123ea94e0b295a3a796d6861bd7b032` - Chainwork: `00000000000000000000000000000000000000000000b9040746437784aaec47` - `getchaintxstats 17280`: - `time`: 1778832687 - `txcount`: 69379403 - `txrate`: 0.1476929741159368 Testnet chainparams are left unchanged from v23.1.x. ## Backport label follow-up Once this PR lands, the `backport-candidate-23.1.x` label can be removed from dash#7271, dash#7279, dash#7289, dash#7293, and dash#7312. Existing older candidate labels that appear already included in the v23.1 line and may be stale: - `backport-candidate-22.1.x`: dash#6879 - `backport-candidate-23.0.x`: dash#7064, dash#7069, dash#7087, dash#7126 ## Validation - `git diff --check upstream/v23.1.x..HEAD` - `python3 test/lint/lint-whitespace.py` - `python3 test/lint/lint-files.py` - `python3 test/lint/lint-python.py` (skipped Python linting because `flake8` is not installed) - Pre-PR code review gate: no significant issues found; recommendation: ship ACKs for top commit: UdjinM6: utACK 293f778 UdjinM6: re-utACK 293f778 Tree-SHA512: 1052f3ecb7cdc9b0e035c25c34a083d6e913d7080bc8128f90a0a15cbb51c6199112274b82fcf431125badcaaf2bfa64adff0f4215d5f702a6f0916025029f4b
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: