Skip to content

Conversation

@Cmdv
Copy link
Contributor

@Cmdv Cmdv commented Dec 15, 2025

Description

This fixes #2045 #2050

Fixed two bugs in db-sync:

Bug 1: ChainSync client hang after genesis fallback
After re-intersecting at genesis, clientTip wasn't reset to Origin, causing the pipeline policy to think the client was ahead of the server and stop requesting blocks.
Fix: Reset clientTip to Origin when re-intersecting at genesis.

Bug 2: Missing database fallback for intersection points
When no ledger state snapshots are available after restart, getLatestPoints had no intersection points to sync from.
Fix: Query database for recent blocks when no snapshots are available.

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.17.0.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

Migrations

  • The pr causes a breaking change of type a,b or c
  • If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
  • Resyncing and running the migrations provided will result in the same database semantically

If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.

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.

Rollback tests don't really rollback

2 participants