Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync_state DB table #10

Closed
mempirate opened this issue Jan 8, 2025 · 0 comments · Fixed by #14
Closed

Add sync_state DB table #10

mempirate opened this issue Jan 8, 2025 · 0 comments · Fixed by #14
Assignees
Labels
C: db C: sync Component: sync

Comments

@mempirate
Copy link
Contributor

Currently, in the sync pipeline, we have no way of knowing how far we synced in a previous run. For backfilling contract events & epochs, we should keep a persistent table with that information:

sync_state

  • block_number: last synced block number
  • epoch: last synced epoch
  • slot: last synced slot

Interacting with this table should ideally be done in a transaction: we only update the sync_state when all other updates have been completed.

@mempirate mempirate added C: db C: sync Component: sync labels Jan 8, 2025
@merklefruit merklefruit self-assigned this Jan 9, 2025
@merklefruit merklefruit linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: db C: sync Component: sync
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants