chore(docker): use patched Erigon v3.3.0 image for Linea from-scratch sync - #3698
Open
Othryades wants to merge 3 commits into
Open
chore(docker): use patched Erigon v3.3.0 image for Linea from-scratch sync#3698Othryades wants to merge 3 commits into
Othryades wants to merge 3 commits into
Conversation
… sync Stock Erigon does not sync current Linea from scratch: v3.5.0 hangs at block 0 with --externalcl + Maru (erigontech/erigon#22081), and earlier versions hit [EIP-7002] Syscall failure: Empty Code at the Fusaka fork because Linea's genesis allocates no code at the withdrawal/consolidation contract addresses (erigontech/erigon#18160). Update the getting-started compose files (mainnet + sepolia) to reference a patched Erigon image, linea-erigon:v3.3.0-linea-patched, built locally from a Dockerfile shipped in the repo at docs/getting-started/linea-mainnet/erigon-linea/. The Dockerfile clones erigontech/erigon v3.3.0 and applies three patches: - sentryMcDisableBlockDownload = false (enables EL-driven bootstrap) - EIP-7002 empty-code syscall returns nil (Fusaka fix) - EIP-7251 empty-code syscall returns nil (Fusaka fix) The erigon-node service now runs with --externalcl so Maru drives block delivery over the Engine API, while Erigon bootstraps its execution stage from genesis via its own block downloader. Signed-off-by: Othryades <Othryades@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 8901f79. Configure here.
The getting-started compose files still carried the Erigon 2 flag --prune=hrtc, but the patched image is built from Erigon v3.3.0, which replaced --prune with --prune.mode (values: full, archive, minimal, blocks). The unknown flag would abort erigon startup before sync. Switch both mainnet and sepolia to --prune.mode=full, which preserves the original hrtc intent (pruned full node, saves disk) and matches the Erigon 3 default. Signed-off-by: Othryades <Othryades@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
…ify, non-root) Address review findings on the patched Erigon image: - Pin Erigon source to commit a0c55b4 (the v3.3.0 tag) instead of the mutable lightweight tag, so a moved tag cannot silently change what gets built. - Pin the golang and debian base images by @sha256 digest for reproducible, tamper-resistant builds. - Verify each sed patch actually applied (sed exits 0 on no-match): grep for the patched constant / absence of the original error string, so upstream drift fails the build loudly instead of shipping unpatched. - Run the final image as a non-root user (UID 1000), matching the repo convention for runtime images. erigon-init now runs as root and chowns /data to 1000:1000 so the node can write the chain-data volume. Also move --datadir before the init subcommand in erigon-init: Erigon v3.3.0 does not apply --datadir when placed after the positional genesis arg, so the previous shell form silently wrote genesis to the default datadir instead of /data. Verified: image builds, init writes to /data (owned 1000:1000), and erigon-node starts as uid=1000 with no permission errors. Signed-off-by: Othryades <Othryades@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Hey @thedarkjester, does it look good to merge now? |
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
linea-erigon:v3.3.0-linea-patched, built locally from a Dockerfile shipped in the repo.erigon-linea/build directory (Dockerfile, Makefile, README) underdocs/getting-started/linea-mainnet/.erigon-nodeservice now runs with--externalclso Maru drives block delivery over the Engine API; genesis is mounted directly from./geth/geth-genesis.jsonso no manual copy is needed.--prune=hrtcto the Erigon 3--prune.mode=full(the patched image is built from Erigon v3.3.0, which no longer accepts the old flag and would abort startup).a0c55b4(thev3.3.0tag) instead of the mutable tag; pins thegolanganddebianbase images by@sha256digest; verifies eachsedpatch actually applied (so upstream drift fails the build loudly instead of shipping unpatched); and runs the final image as a non-root user (UID 1000), witherigon-initchowning/dataso the node can write the chain-data volume.Why
Stock Erigon does not sync current Linea from scratch:
erigontech/erigon:v3.5.0with--externalcl+ Maru hangs at block 0 (erigontech/erigon#22081).[EIP-7002] Syscall failure: Empty Codeat the Fusaka fork because Linea's genesis allocates no code at the withdrawal/consolidation contract addresses (erigontech/erigon#18160).The patched image applies three fixes on top of Erigon
v3.3.0:sentryMcDisableBlockDownload = false(enables EL-driven bootstrap from genesis)nilinstead of erroring (Fusaka fix)nilinstead of erroring (Fusaka fix)Test plan
make buildfromdocs/getting-started/linea-mainnet/erigon-linea/produceslinea-erigon:v3.3.0-linea-patched(SHA-pinned, digest-pinned, sed patches verified at build time)docker compose up erigon-initwrites genesis into/data(owned1000:1000);erigon-nodethen starts asuid=1000with no permission errorsdocker compose up erigon-init erigon-node maru-nodefromdocs/getting-started/linea-mainnet/begins syncingdocs/getting-started/linea-sepolia/)Note
Low Risk
Documentation and local Docker getting-started only; no production app or auth changes, though operators must build the image locally before compose will run.
Overview
Adds a local build for
linea-erigon:v3.3.0-linea-patchedunderdocs/getting-started/linea-mainnet/erigon-linea/(Dockerfile, Makefile, README). The image pins Erigon v3.3.0 (by commit SHA) and applies three Linea-specific patches (block download flag, EIP-7002/7251 empty-code handling) plus anosilkwormbuild; base images are pinned by digest, eachsedpatch is verified, and the final image runs as a non-root user.Mainnet and Sepolia
docker-compose.ymlErigon services switch from stockerigontech/erigon:2.61.0to that patched image.erigon-initinitializes/datafrom./geth/geth-genesis.jsonand chowns the volume for UID 1000.erigon-nodeis wired for Maru:--externalcl, Engine API on 8550 with JWT from./engine-jwt,--prune.mode=full, andhostname: el-client.Reviewed by Cursor Bugbot for commit 6448a60. Bugbot is set up for automated code reviews on this repo. Configure here.