Skip to content

fix(checkpoints): discover checkpoints from latest OL epoch#38

Merged
krsnapaudel merged 1 commit into
mainfrom
STR-3652
Jun 2, 2026
Merged

fix(checkpoints): discover checkpoints from latest OL epoch#38
krsnapaudel merged 1 commit into
mainfrom
STR-3652

Conversation

@krsnapaudel

@krsnapaudel krsnapaudel commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Discover checkpoints from the latest OL epoch

Problem

The explorer gated checkpoint discovery on strata_getChainStatus().confirmed.epoch, fetching only start..=confirmed. A checkpoint sealed on the OL but not yet L1-confirmed (latest > confirmed) was never fetched, so it stayed invisible in the explorer until confirmed caught up — the observed checkpoint lag (fullnode_latest=2 while checkpoint 3 was already sealed). Ref: STR-3652

Fix

  • Discover checkpoints up to latest.epoch instead of confirmed.epoch; keep confirmation_status from getCheckpointInfo as the source of truth for display status.
  • Deserialize latest, confirmed, and finalized from getChainStatus using strata_identifiers::EpochCommitment, pinned to the same strata-common tag used by ../alpen.
  • Require the full chain-status shape; no fallback to confirmed if latest is absent.
  • Point the block fetcher at the latest checkpoint we attempted to sync, falling back to the highest checkpoint actually in the DB when the latest checkpoint is not stored yet.
  • Log fullnode_latest, fullnode_confirmed, and fullnode_finalized.

Testing

  • mock_fullnode now returns full epoch commitments for all three slots (latest = n−1 reported as Pending), exercising the pending-checkpoint discovery path.

Note / follow-up

Deserialization is now strict: each epoch slot requires epoch + last_slot + last_blkid. Confirm the live strata_getChainStatus returns full EpochCommitment objects before relying on this in production.

@storopoli storopoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 85954bb

1 non-blocking comment.

Comment thread backend/Cargo.toml Outdated
@krsnapaudel krsnapaudel requested a review from storopoli June 2, 2026 18:37
@krsnapaudel krsnapaudel added this pull request to the merge queue Jun 2, 2026
Merged via the queue into main with commit 77ac07a Jun 2, 2026
3 checks passed
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.

3 participants