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

Fetch fresh snapshot from peer when joining #6700

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

eddyashton
Copy link
Member

@eddyashton eddyashton commented Dec 11, 2024

Joining without a recent snapshot is slow, as some suffix (potentially the entire history) of the ledger must be transferred over the consensus protocol. Operators can attempt to provide recent snapshots to joining nodes, perhaps through a shared backup mount, but this requires operator intervention and is error-prone.

This PR adds a more automated solution. When joining, a node asks the target node for its latest snapshot (on the host, before entering the local enclave). If the target has a later snapshot than is available locally, it is fetched over HTTPS, and will then be used to initialise the node's state. Assuming snapshots are regularly emitted, this should remove the cases where a joining node is forced to replay the entire ledger history.

@eddyashton eddyashton marked this pull request as ready for review December 17, 2024 11:47
@eddyashton eddyashton requested a review from a team as a code owner December 17, 2024 11:47
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.

1 participant