#36220 rpc: report background validation progress in getchainstates

ReviewabilityReviewsAgreementSize
#36220 arejula27 rpc: report background validation progress in getchainstatesWaiting on author1 -1Blocked3 + 4 tests
  • Ensure getchainstates reports consistent background validation progress during assumeutxo sync
  • Matches progress values reported by getblockchaininfo relative to the snapshot base block
  • Ready to review
  • Unaddressed blocking objection: adds special cases instead of revisiting synchronization design (l0rinc)
  • Verified progress reporting matches getblockchaininfo on an assumeutxo node (musaHaruna)
  • Tested on assumeutxo (nervana21)
  • Support for accurate monitoring aligning with assumeutxo documentation (vicjuma)
  • Concept approval without stated reasons (sedited)
  • 3 lines added or modified outside tests
  • 4 lines added or modified in tests
  • 2 lines removed in total
  • 2 files, 2 commits
RPC / REST / ZMQ#42 of 55
P3 · bug fix
  • P3 because it fixes an internal RPC inconsistency when monitoring background chainstates in assumeutxo
  • Minor progress reporting discrepancy across RPCs that is worthwhile to clean up but deferrable
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:

ReviewerTypeHarm, request, or questionStatusMust beAuthor repliedQuote
nervana21 (contributor)suggestion, styleuse TargetBlock().has_value() in getchainstatesaccepted · author explained TargetBlock returns a pointer; reviewer acknowledged mistakeansweredyes2026-09-11: 'cs.TargetBlock().has_value() ? chainman.GetBackgroundVerificationProgress(*tip)'
Status from: 2026-09-11: nervana21: 'ahh, you're right. my mistake!'
musaHaruna (contributor)suggestion, correctnesscheck active chainstate verificationprogress against getblockchaininfo in feature_assumeutxo.pyopenansweredno2026-10-10: 'Optional suggestion: could we also check the active chainstate’s `verificationprogress` against the top-level value from `getblockchaininfo`?'
l0rinc (member)objection, approachadds special cases around background validation instead of revisiting the underlying synchronization design and costsopenchangedno2026-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

dossier JSON · extract JSON · model ledger, generated 2026-10-12T01:22, confidence high, input hash 0e8a684684783be6
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