Conversation
…shots. Same installer as mkberanode.sh (binaries, systemd units, storage provisioning) but the snapshot step restores from Berachain's v2 catalog instead of the v1 index.csv. Both chains are treated identically; mainnet's v2 catalog is assumed to be bepolia-shaped, matching every other v2 consumer in this campaign. --mode archive here means "keep everything on both layers" (this script sets CL pruning = "nothing" for it), which is the v2 catalog's full_archive pairing (EL --archive, CL cl-archive) -- not the v2 "archive" storage_mode, which pairs EL --archive with the still-pruned cl-pruned. --mode pruned runs the EL node with --full (not --minimal), so it restores with the --full preset to match. Getting this mapping wrong would silently under-provision the running node relative to its own pruning policy. EL restore shells out to the already-installed bera-reth download binary (storage v2 EL objects are a modular manifest, not a tarball); CL restore keeps the existing disk-then-extract lz4/tar mechanism, only the URL source changed.
…store. Self-review caught two bugs the prior commit's own message claimed were handled but weren't: - init_el() ran bera-reth init unconditionally, even right after bera-reth download successfully restored and configured the EL datadir. Every other restore command in this campaign refuses a non-empty --datadir; running init again on top of a just-restored one risked aborting the whole installer on its happy path. Now gated on whether the download actually succeeded. - --mode pruned restored with the EL --minimal preset, but the systemd unit for --mode pruned runs bera-reth with --full (see install_systemd_units), not --minimal. Restoring --minimal data under a --full-pruning-policy node was exactly the under-provisioning bug the surrounding comment warned against. Also restored the catalog header shape check in select_v2_role() that a malformed catalog should fail on, not silently misparse.
camembera
force-pushed
the
feat/mkberanode-v2
branch
from
September 4, 2026 15:56
2b8cfc8 to
626628e
Compare
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.
Summary
Same installer as
mkberanode.sh(binaries, systemd units, storage provisioning) but the snapshot step restores from Berachain's storage v2 catalog instead of the v1index.csv. Both chains are treated identically — mainnet's v2 catalog is assumed to be bepolia-shaped, matching every other v2 consumer in this campaign (fetch-berachain-snapshot-v2.js,berabox,bera-reth's owndownloadcommand).Mode mapping, worth flagging explicitly:
--mode archivehere means "keep everything on both layers" (this script already sets CLpruning = "nothing"for it), which is the v2 catalog'sfull_archivepairing (EL--archive, CLcl-archive) — not the v2archivestorage_mode, which pairs EL--archivewith the still-prunedcl-pruned.--mode prunedruns the EL node with--full(not--minimal), so it restores with the--fullpreset to match. Copyingfetch-berachain-snapshot-v2.js'spruned → --minimalmapping here would have silently under-provisioned the running node relative to its own pruning policy.EL restore shells out to the already-installed
bera-reth downloadbinary (storage v2 EL objects are a modular manifest, not a tarball, so the old curl|lz4|tar path doesn't apply); CL restore keeps the existing disk-then-extract mechanism unchanged, only the URL source changed.init_el'sbera-reth initis skipped when the snapshot download succeeds, sincebera-reth downloadalready initializes and configures the datadir.mkberanode.sh(v1) is untouched.Test plan
bash -n apps/node-scripts/mkberanode-v2.sh— clean.el-manifest,cl-pruned,cl-archiveall resolve to the correct real object URLs; an unrecognized role fails closed (exit 1).mkberanode.sheither; same as that script, this ships without one.