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

feat(sync): chain syncer #6

Merged
merged 2 commits into from
Jan 8, 2025
Merged

feat(sync): chain syncer #6

merged 2 commits into from
Jan 8, 2025

Conversation

mempirate
Copy link
Contributor

@mempirate mempirate commented Jan 7, 2025

Implements a minimal chain syncer through keep track of epoch transitions (which are the important events for our syncing use case). What we need from the epoch transition:

  • Uncondionality (no problems with missed / skipped slots)
  • Block number of last known execution block (to sync logs)
  • Slot & epoch number for obvious reasons

It seems like using the payload_attributes stream was the best option, because it exhibits all 3 options. One thing I'm unsure about is the edge case where the epoch transition is a missed slot, and we use the unconditional payload attributes event to get the lookahead. Does the beacon node know the lookahead if the epoch transition slot was missed?

@mempirate mempirate marked this pull request as ready for review January 8, 2025 10:45
@mempirate mempirate requested a review from merklefruit January 8, 2025 10:48
Copy link
Contributor

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

Lgtm!

@mempirate mempirate merged commit 1f17344 into main Jan 8, 2025
0 of 3 checks passed
@mempirate mempirate deleted the jonas/feat/chainsync branch January 8, 2025 11:11
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