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

Sync Relayer from previous Ethereum block #384

Merged
merged 16 commits into from
Jun 1, 2021
Merged

Conversation

denalimarsh
Copy link
Collaborator

@denalimarsh denalimarsh commented Apr 30, 2021

This PR includes the Ethereum-side functionality required for the Relayer to sync from a previous block. Syncing process steps:

  • On initialization, query previous BEEFY justifications from the relay chain, storing them in the BEEFY justification database
  • Query all previous InitialVerificationSuccessful events from Ethereum, use them to update the status of items in the database
  • Query all previous FinalVerificationSuccessful events, update the status of database items
  • Iterate over the database and send appropriate transactions to the blockchain
  • Transition to live mode by starting subscriptions

I'm currently blocked by step 1, as it's not possible to query BEEFY justifications by block yet.

@musnit
Copy link
Collaborator

musnit commented May 10, 2021

@denalimarsh i know you're blocked on parity, but is this existing functionality something we could complete/merge in and address the initialization extras when the apis are ready?

Copy link
Contributor

@philipstanislaus philipstanislaus left a comment

Choose a reason for hiding this comment

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

LGTM, just a few minor comments 💪

@denalimarsh denalimarsh force-pushed the dm-relayer-sync-beefy branch from 3f21899 to 767be45 Compare June 1, 2021 20:25
@musnit musnit merged commit 0eec3df into main Jun 1, 2021
@musnit musnit deleted the dm-relayer-sync-beefy branch June 1, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants