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

Fast sync #341

Closed
chancehudson opened this issue Dec 15, 2021 · 1 comment
Closed

Fast sync #341

chancehudson opened this issue Dec 15, 2021 · 1 comment

Comments

@chancehudson
Copy link
Member

chancehudson commented Dec 15, 2021

A client should be able to fast sync by downloading all the merkle tree leaves and then verifying that the resulting hash exists on the blockchain. This would happen in the following steps:

  1. Client asks coordinator for leaves
  2. Coordinator provides leaves, and the latest block header hash
  3. Client downloads leaves, adds them to the database, then calculates root hashes
  4. Client verifies that block header exists, then matches nullifier, utxo, and withdrawal roots
  5. Client synchronizes blocks as usual, skipping grove patches until it reaches the header hash provided by the coordinator
  6. Client continue synchronizes as usual, calculating and applying grove patches

Considerations:

  • Coordinator should store a compressed fast sync payload. This payload may take a while to build so it should be done no more than once every hundred blocks (for example)
@chancehudson chancehudson mentioned this issue Dec 15, 2021
@chancehudson
Copy link
Member Author

Closing in favor of #358 #357 and #348

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