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 DepositTreeSnapshot download to checkpoint sync #7715

Closed
zilm13 opened this issue Nov 15, 2023 · 0 comments · Fixed by #7793 or #7892
Closed

Add DepositTreeSnapshot download to checkpoint sync #7715

zilm13 opened this issue Nov 15, 2023 · 0 comments · Fixed by #7793 or #7892
Assignees
Labels
enhancement 🕵️‍♀️ New feature or request

Comments

@zilm13
Copy link
Contributor

zilm13 commented Nov 15, 2023

Description

Most checkpoints supports DepositTreeSnapshot API https://github.com/ethereum/beacon-APIs/blob/master/apis/beacon/deposit_snapshot.yaml, so when user provides --checkpoint-sync-url, we can try to download DepositTreeSnapshot from the same provider and start node with fresh snapshot.
Please, note, currently we support only ssz input so it should be updated to be able to parse json also. There is no need to temporarily save a file, DepositSnapshotFileLoader supports URLs.

Reopened 15/12/2023

Reopened as we need to implement this again, this time with a proper fallback mechanism when we can't load it from the Beacon API.

Desired behaviour

Load from checkpoint-sync-url

  • Likely to be the most used option by users
  • Only used when checkpoint-sync-url option is in use
  • Not reliable, should fallback into bundled option (or stored db) when it fails. Should not fail if can’t load.
  • Should be the first choice when available

Load from bundled snapshot (current default behaviour)

  • The second most common option now that users are likely to start using checkpoint-sync-url
  • Only available on a compatible network (network that we provide a bundle for)
  • There is no reason for this to fail (it is provided as part of our JAR file). But if it fails, we should log a warning (?) and fallback into our stored snapshot in the db (even if it is an empty snapshot tree).

Load from provided path/URL (--Xdeposit-snapshot)

  • Less common option, probably only used for testnets etc.
  • Mandatory when specified
  • Don’t try any other fallback options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🕵️‍♀️ New feature or request
Projects
None yet
6 participants