#36220 rpc: report background validation progress in getchainstates
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36220 rpc: report background validation progress in getchainstates | Waiting on author | 1 -1 | Blocked | 3 + 4 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Updates the `verificationprogress` field in `getchainstates` to calculate progress relative to the snapshot base block when inspecting a background chainstate, using `chainman.GetBackgroundVerificationProgress()`. Also updates the RPC help text and adds an assertion to `feature_assumeutxo.py`.
Problem: After PR #33259 updated `getblockchaininfo`, `getchainstates` continued to compute verification progress against the active network tip for all chainstates. As a result, the same node reported conflicting progress values for the background chainstate during assumeutxo sync.
Reviewability
Paused · Waiting on author
Open objections from l0rinc, musaHaruna with no author reply for 21 days; review would repeat what has been asked.
Waiting on (from the thread read):
- author: response to l0rinc's Concept NACK and musaHaruna's test suggestion 2026-10-11
Agreement
Blocked
objection that needs a change, nobody has replied (l0rinc)
Thread notes: Added l0rinc's Concept NACK objecting to continuing to patch background validation rather than revisiting synchronization design in #36476.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| nervana21 (contributor) | suggestion, style | use TargetBlock().has_value() in getchainstates | accepted · author explained TargetBlock returns a pointer; reviewer acknowledged mistake | answered | yes | 2026-09-11: 'cs.TargetBlock().has_value() ? chainman.GetBackgroundVerificationProgress(*tip)' Status from: 2026-09-11: nervana21: 'ahh, you're right. my mistake!' |
| musaHaruna (contributor) | suggestion, correctness | check active chainstate verificationprogress against getblockchaininfo in feature_assumeutxo.py | open | answered | no | 2026-10-10: 'Optional suggestion: could we also check the active chainstate’s `verificationprogress` against the top-level value from `getblockchaininfo`?' |
| l0rinc (member) | objection, approach | adds special cases around background validation instead of revisiting the underlying synchronization design and costs | open | changed | no | 2026-10-11: 'Concept NACK on the direction of endless patches for a broken feature.' |
Support:
- sedited (member) (Concept ACK, 2026-09-10): (no reason given) [not substantive]
- nervana21 (contributor) (Concept ACK, 2026-09-10): (no reason given) [not substantive]
- vicjuma (contributor) (Concept ACK, 2026-09-10) [read: assumeutxo.md]: better aligns the assumeutxo.md documentation (accurate monitoring)
- nervana21 (contributor) (Tested ACK, 2026-09-11) [tested]: (no reason given) [not substantive]
- musaHaruna (contributor) (Concept ACK, 2026-10-10) [both]: verified on an AssumeUTXO node that both RPCs report matching progress toward the snapshot base, and verified functional tests pass and fail appropriately
Participants:
- nervana21 (contributor, support, 4 statements 2026-09-10 to 2026-09-11): Concept ACK and Tested ACK; withdrew an inline suggestion
- sedited (member, support, 1 statements 2026-09-10 to 2026-09-10): Concept ACK
- vicjuma (contributor, support, 2 statements 2026-09-10 to 2026-09-10): Concept ACK, noting alignment with assumeutxo documentation
- musaHaruna (contributor, support, 2 statements 2026-10-10 to 2026-10-10): Concept ACK with testing; suggested an additional test assertion
- l0rinc (member, objection, 1 statements 2026-10-11 to 2026-10-11): Concept NACK on adding special cases rather than revisiting the underlying synchronization design
Files
4 lines under test/bench/ci.
- src/rpc/blockchain.cpp +3/-2
- test/functional/feature_assumeutxo.py +4/-0
Card
The short text the ranking pass compares across PRs.
This pull request ensures `getchainstates` calculates background chainstate `verificationprogress` relative to the snapshot base block rather than the network tip, matching `getblockchaininfo`. It resolves a reporting inconsistency where a node running assumeutxo produced conflicting verification numbers across two RPC calls. The fix is minimal, accompanied by functional test coverage in `feature_assumeutxo.py`, and has received a tested ACK with no open objections.
Data
thread read through 2026-10-11 (12 statements), head d9638e49f6
labels: RPC/REST/ZMQ
Categories
RPC / REST / ZMQ
P3 · bug fix
Fixes conflicting progress reporting between RPCs for background chainstates during assumeutxo sync. While `getblockchaininfo` was previously updated, `getchainstates` continued reporting background verification progress relative to the active network tip rather than the snapshot base block, creating an internal RPC inconsistency that is worthwhile to clean up but deferrable.
Membership: Matches RPC/REST/ZMQ label and edits src/rpc/blockchain.cpp to adjust the verificationprogress output field.
Factors: security/stability 0, bug 1, performance 0, user value 1, leverage 0