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

Implement domain chain snap-sync #3026

Open
shamil-gadelshin opened this issue Sep 16, 2024 · 0 comments
Open

Implement domain chain snap-sync #3026

shamil-gadelshin opened this issue Sep 16, 2024 · 0 comments
Assignees

Comments

@shamil-gadelshin
Copy link
Member

We need to implement domain chain snap sync similar to consensus chain snap sync to improve new domain operators UX by significantly increasing the initial sync speed.

Domain snap sync algorithm

  1. Acquire the last confirmed domain block execution receipt from the consensus chain.
  2. Use the consensus block number from the acquired execution receipt to snap sync the consensus chain.
  3. Acquire the block for domain chain state sync (block number from the execution receipt - see 1.)
  4. Download the domain state for the block acquired previously (3.)
  5. Download MMR-data

Security concerns and implementation details

  • consensus chain snap sync can't be applied directly to the domain chain because we must rely on the local consensus block production, this is why we produce the state block (3.) from the consensus block
  • we implement a separate consensus algorithm for acquiring execution receipts (1.) similar to what we have for segment headers
  • remote MMR data must be verified using state data (MMR roots) acquired differently
  • synchronization is required to orchestrate different stages of the process split between consensus and domain chains: start consensus chain snap-sync after acquiring the execution receipt, pause consensus chain block production until domain state is acquired, etc.
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 a pull request may close this issue.

1 participant