Skip to content

feat!: Handle multiple snapshot urls for sync#17407

Merged
PhilWindle merged 1 commit intonextfrom
palla/snapshot-urls
Oct 1, 2025
Merged

feat!: Handle multiple snapshot urls for sync#17407
PhilWindle merged 1 commit intonextfrom
palla/snapshot-urls

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Sep 30, 2025

Nodes will download the index for each snapshot location and pick the one synced to the latest L1 block. If download fails from a given location, they will try the next one.

Renames the env var from SYNC_SNAPSHOTS_URL to SYNC_SNAPSHOTS_URLS, but keeps the old one as fallback. The flag is changed from --snapshots-url to --snapshots-urls.

Fix A-101

Nodes will download the index for each snapshot location and pick the
one synced to the latest L1 block. If download fails from a given
location, they will try the next one.

Renames the env var from `SYNC_SNAPSHOTS_URL` to `SYNC_SNAPSHOTS_URLS`,
but keeps the old one as fallback. The flag is changed from
`--snapshots-url` to `--snapshots-urls`.
});
return true;
} catch (err) {
log.error(`Failed to download snapshot from ${url}. Trying next candidate.`, err, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to implement any cleanup logic here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's handled on the snapshotSync function, which calls tryRmDir on the download dir in a finally block.

@PhilWindle PhilWindle enabled auto-merge October 1, 2025 16:20
@PhilWindle PhilWindle added this pull request to the merge queue Oct 1, 2025
Merged via the queue into next with commit dd47a59 Oct 1, 2025
21 checks passed
@PhilWindle PhilWindle deleted the palla/snapshot-urls branch October 1, 2025 17:05
@AztecBot
Copy link
Collaborator

AztecBot commented Oct 1, 2025

💔 All backports failed

Status Branch Result
v2 Backport failed because of merge conflicts

You might need to backport the following PRs to v2:
- chore: use CloudFlare R2 storage for snapshot storage

Manual backport

To create the backport manually run:

backport --pr 17407

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@alexghr
Copy link
Contributor

alexghr commented Oct 2, 2025

This is being backported in #17444

@alexghr alexghr mentioned this pull request Oct 2, 2025
alexghr added a commit that referenced this pull request Oct 6, 2025
Backports of #17312, #17326 and #17407

Fix A-109

---------

Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants