Skip to content

fix(presim): drop tip state when canon notifications stall#527

Open
julio4 wants to merge 1 commit into
mainfrom
fix/presim-drop-stale-tip-state
Open

fix(presim): drop tip state when canon notifications stall#527
julio4 wants to merge 1 commit into
mainfrom
fix/presim-drop-stale-tip-state

Conversation

@julio4
Copy link
Copy Markdown
Member

@julio4 julio4 commented May 22, 2026

If no CanonStateNotification arrives for 30s, drop the held TipState so its StateProvider is released

If no `CanonStateNotification` arrives for 30s, drop the held `TipState`
so its `StateProvider` (and the underlying MDBX read transaction) is
released. During a long sync the previous behavior pinned a single read
tx for the entire gap, blocking page reclamation / pruning and tripping
MDBX's "long read transaction (300s)" warnings.

- `TopOfBlockSimulator::clear_tip` releases the held state provider
- `maintain_tip_state` now wraps `events.next()` in a 30s timeout; on
  elapsed it calls `clear_tip` once and warns. Resumption is debug-logged
- Demoted the "no tip state" log in `simulate_tx_sync` from warn -> debug
  since None is now an expected state during sync (would otherwise warn
  per pending tx for the full sync window)
- New counter `presim_tip_state_evictions`
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.

1 participant