Skip to content

fix(checkpoints): refresh txid during status updates#39

Merged
purusang merged 1 commit into
mainfrom
fix/checkpoint-txid-status-refresh
Jun 5, 2026
Merged

fix(checkpoints): refresh txid during status updates#39
purusang merged 1 commit into
mainfrom
fix/checkpoint-txid-status-refresh

Conversation

@purusang

@purusang purusang commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • continue scanning checkpoint status updates through the relevant transition boundary instead of stopping on the first unchanged row
  • compare stored txid as well as status before deciding a checkpoint is already current
  • expose txid from confirmed/finalized RPC checkpoint payloads and cover that mapping with model tests
  • add Docker ignore files so local compose builds do not upload target/node build artifacts

Why this was needed

After the latest sync change, the explorer can persist checkpoints from the RPC latest epoch while they are still Pending. Those rows have no L1 txid yet. When the same checkpoint later becomes Confirmed or Finalized, the updater must refresh both status and txid from strata_getCheckpointInfo.

Staging exposed an edge case: checkpoint/epoch 0 remains Pending. The old updater started at the earliest local Pending checkpoint and returned immediately when that checkpoint had no status change. Because epoch 0 was unchanged, the updater never reached later local Pending checkpoints that the Strata RPC already reported as Finalized, leaving their txids null in the explorer.

This fix makes unchanged checkpoints a skip, not a stop, while bounding the scan using chain status:

  • local Pending rows are scanned through the RPC confirmed epoch
  • local Confirmed rows are scanned through the RPC finalized epoch

That lets checkpoint 0 stay Pending without blocking later checkpoints from being updated directly to Confirmed or Finalized with their txids.

Verification

  • cargo test -p model
  • cargo test -p checkpoint-explorer
  • local docker compose run against staging RPC: manually forced checkpoints 3..17 to Pending/NULL txid and verified the updater restored Finalized status and txids while checkpoint 0 remained Pending

@purusang purusang added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 48a5b82 Jun 5, 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.

2 participants