replace snapshot fetchers with bash - #451
Merged
Merged
Conversation
Operators restore pruned Beacon Kit and Bera-Reth into the Quickstart datadirs with one command, without node, and without overwriting consensus keys.
5 tasks
The install step is optional and unused by this job's only check. Run Prettier first, and let Foundry fail without failing the build.
camembera
commented
Sep 2, 2026
The fetchers used NETWORK="${CHAIN:-mainnet}" before any env file parse, so a Quickstart tree with CHAIN=bepolia in env.sh restored mainnet.
- Delete tests/test-snapshot-urls.js (orphan Node health check, not in bash suite). - Stop advertising fetch-berachain-snapshot-v2.sh in README; keep the file. - Reject invalid CHAIN instead of silently falling back to mainnet. - README step 5 no longer says source env.sh first.
camembera
commented
Sep 3, 2026
|
|
||
| - name: Prettier check | ||
| run: bunx prettier@3.6.2 --check "**/*.{ts,tsx,md}" --ignore-path .prettierignore | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Dropped this workflow change. Foundry and Prettier are back to the order on main.
The snapshot restore does not need a workflow tweak, and Foundry flakes stay a separate problem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace
fetch-berachain-snapshot.jsandfetch-berachain-snapshot-v2.jswith bash restore scripts. After Quickstart setup,. ./env.sh && ./fetch-berachain-snapshot.shdownloads the latest official pruned snapshots and extracts them into$BEACOND_DATA/$RETH_DATA. Consensus keys andjwt.hexstay in place. A freshsetup-reth.shdatadir is replaced without a handrm.env.shlooks upbeacondonly and defaults RPC to 26657 / 8545 whenPORT_BASEis unset.Storage v2 is the same env and datadirs:
./fetch-berachain-snapshot-v2.sh. Missing catalog is a generic HTTP or parse error, not a v1 fallback. EL restore usesbera-reth download --manifest-urland fails closed if that flag is absent.Companion: berachain/docs#107
Type of Change
Guide Details
apps/node-scripts/fetch-berachain-snapshot.sh(v2:fetch-berachain-snapshot-v2.sh)Checklist
Additional Notes
Playground on an isolated tree: Bepolia v1 pruned, Mainnet v1 pruned, then Bepolia v2 pruned. After each restore both clients started, imported blocks, and local height was within snapshot lag of public tip and advancing. Shell tests in-repo cover extract, key preservation,
--force, and v2 fail-closed behavior.