Skip to content

fix(node): withhold the synced global view until its cursor is recorded - #1201

Merged
CassOnMars merged 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:fix/committed-view-cursor-gap
Nov 4, 2026
Merged

CassOnMars merged 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:fix/committed-view-cursor-gap

Conversation

@blacks1ne

Copy link
Copy Markdown
Contributor

On a regular node the verified prover-tree pull installs the archive's GLOBAL records, refreshes the prover registry, and only then records the GLOBAL cursor in a separate write. For several seconds per pull, CommittedView::capture returns the new committee-session heads and tips with the cursor from before the sync, a pairing no GLOBAL frame had, so committee code reads tip age, drain and activation frames against the wrong frame.

Hold the view through the existing global state sync in progress wait: a held sync lists a hold scope in each chunk's commit, and checkpoint_synced_view writes the cursor and ends the hold in one commit right after the verified sync. If the record or the pull fails, the view stays withheld until a later verified pull, at most one sync interval while an archive is reachable. On a mainnet regular node a hold lasts 4-6 s per 300 s pull; refused captures wait, retry or drop one frame for refetch, and none affects votes. Archives and materializer nodes are unchanged.

Tests: a reproducer fails on 4b038faa and passes; recovery and wiring tests; four mutation controls fail; 20 stress rounds; fmt, check, census clean; CI command 6714/6714 on 9ddcbf26.

A regular node has no GLOBAL materializer: its verified prover-tree
pull installs the archive's GLOBAL records in chunks, each its own
commit, refreshes the prover registry, and only then records the
cursor with a separate store write. From the last chunk until that
write, about 6-8 s per pull on a mainnet node, CommittedView::capture
returns the new committee-session heads and tips with the cursor from
before the sync, a pairing no GLOBAL frame had. A single-chunk sync
gives the same view, since only multi-chunk syncs list their scope
as incomplete.

Hold the view through the existing wait instead. A held sync plan
also lists a hold scope in the commit of each chunk it installs, so
capture refuses with "global state sync in progress", as between
chunks. checkpoint_synced_view writes the cursor and ends the hold
in one commit under the commit lock. The pull records it right after
the verified sync, before the registry refresh, and logs one info
line per pull with the frames and the time since the sync. A failed
record leaves the view withheld; the next verified sync records the
cursor and ends the hold even with nothing to install.

Only the regular node's verified pull holds. Archives, materializer
nodes and the other syncs keep their behaviour.
@blacks1ne
blacks1ne marked this pull request as ready for review November 4, 2026 11:45
@CassOnMars
CassOnMars added this pull request to the merge queue Nov 4, 2026
Merged via the queue into QuilibriumNetwork:v2.1.0.25 with commit 26042a9 Nov 4, 2026
12 checks passed
@blacks1ne
blacks1ne deleted the fix/committed-view-cursor-gap branch November 4, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants