Skip to content

feat: support reth as an alternative execution client - #145

Open
Dino2049 wants to merge 4 commits into
mainfrom
feat/reth-execution-client
Open

feat: support reth as an alternative execution client#145
Dino2049 wants to merge 4 commits into
mainfrom
feat/reth-execution-client

Conversation

@Dino2049

Copy link
Copy Markdown
Contributor

Add a full reth (morph-reth) startup path alongside the existing geth flow, in both Docker and binary modes, without touching the geth path.

  • entrypoint-reth.sh: launch morph-reth; parse static-nodes.json into --trusted-peers (no jq), omit the flag when absent
  • docker-compose.reth.yml: reth service + the same morph-node, pointed at morph-reth; reth uses its own reth-data datadir
  • run-binary-reth.sh: binary-mode launcher for reth + morphnode
  • Makefile: run/stop/rm-reth-node, build-reth(-all), binary + quickstart targets, setup-snapshot-data-reth (reth-data/ tarball layout), reth snapshot download and clean targets
  • .env/.env_hoodi: RETH_HOME/RETH_CHAIN/RETH_ENTRYPOINT_FILE and *_RETH_SNAPSHOT_NAME (reth uses a separate snapshot from geth)
  • hoodi/mainnet reth-data/: seed static-nodes.json + .gitignore
  • README: reth run/quickstart/binary sections, geth-vs-reth snapshot note, reth-data directory layout

Add a full reth (morph-reth) startup path alongside the existing geth
flow, in both Docker and binary modes, without touching the geth path.

- entrypoint-reth.sh: launch morph-reth; parse static-nodes.json into
  --trusted-peers (no jq), omit the flag when absent
- docker-compose.reth.yml: reth service + the same morph-node, pointed
  at morph-reth; reth uses its own reth-data datadir
- run-binary-reth.sh: binary-mode launcher for reth + morphnode
- Makefile: run/stop/rm-reth-node, build-reth(-all), binary + quickstart
  targets, setup-snapshot-data-reth (reth-data/ tarball layout), reth
  snapshot download and clean targets
- .env/.env_hoodi: RETH_HOME/RETH_CHAIN/RETH_ENTRYPOINT_FILE and
  *_RETH_SNAPSHOT_NAME (reth uses a separate snapshot from geth)
- hoodi/mainnet reth-data/: seed static-nodes.json + .gitignore
- README: reth run/quickstart/binary sections, geth-vs-reth snapshot
  note, reth-data directory layout

Co-Authored-By: Claude Opus 4.8 (1M context) <<EMAIL_ADDRESS>>
@panos-xyz

Copy link
Copy Markdown
Contributor

Issue 1: Snapshot heights in .env/.env_hoodi don't match the pinned reth snapshot

.env sets MAINNET_RETH_SNAPSHOT_NAME=snapshot-archive-reth-20260902-1, but the shared height variables still hold the geth snapshot's values:

  • .env: DERIVATION_START_HEIGHT=25440822, L1_MSG_START_HEIGHT=25439950, L2_BASE_HEIGHT=24216219 — the reth snapshot requires 25885664 / 25880870 / 26137782
  • .env_hoodi: 3122685 / 3106743 / 6543334 — the reth snapshot requires 3533250 / 3529538 / 8346700

The PR's own README note says "Ensure DERIVATION_START_HEIGHT, L1_MSG_START_HEIGHT, and L2_BASE_HEIGHT in .env/.env_hoodi match the selected snapshot", and .env states the heights match MAINNET_SNAPSHOT_NAME above — but since reth uses a separate snapshot while the height vars are shared, make quickstart-mainnet-reth-node runs out-of-the-box with the wrong heights.

Suggestion: add RETH_* height variables used by the reth path (entrypoint/compose/run-binary-reth), or restructure the env files so each execution client's snapshot carries its own heights.

@panos-xyz

Copy link
Copy Markdown
Contributor

Issue 2: build-reth doesn't pin a version

build-reth in the Makefile clones morph-reth at HEAD into ../morph-reth and builds --release without checking out any tag. This diverges from the repo's convention:

  • The geth/node binary path builds from submodules with set-versions (git checkout morph-v$(GETH_VERSION))
  • The Docker path pins morphreth/morph-reth:v1.3.0 in docker-compose.reth.yml

As a result, the binary path builds whatever morph-reth main is at clone time — unreproducible, and potentially version-skewed from the Docker path.

Suggestion: check out a pinned tag (e.g. v1.3.0, keeping it in sync with docker-compose.reth.yml) after cloning, ideally via a RETH_VERSION variable so future bumps are a one-line change (see also: set-versions currently only rewrites docker-compose.yml, so reth version bumps aren't automated).

The reth execution client uses a separate snapshot from geth, but the
derivation heights were shared, so `make quickstart-*-reth-node` ran with
the geth snapshot's heights (wrong for the reth snapshot — e.g. hoodi
L2_BASE_HEIGHT 8346379 vs reth 8346700).

Split the heights: add RETH_DERIVATION_START_HEIGHT / RETH_L1_MSG_START_HEIGHT
/ RETH_L2_BASE_HEIGHT matching *_RETH_SNAPSHOT_NAME, and have the reth
compose and run-binary-reth wire the node's MORPH_NODE_* heights from them
instead of the shared (geth) values. The geth path is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <<EMAIL_ADDRESS>>
build-reth cloned morph-reth at HEAD and built --release without checking
out a tag, so the binary path built whatever main happened to be, diverging
from the Docker path pinned at v1.3.0 in docker-compose.reth.yml.

Add a RETH_VERSION variable (default 1.3.0, matching the compose image) and
have build-reth `git checkout v$(RETH_VERSION)` after cloning (and on an
existing clone) so the build is reproducible and version-aligned with Docker.
Extend set-versions to also rewrite the morph-reth image tag in
docker-compose.reth.yml, so a reth bump is a one-line change like geth/node.

Co-Authored-By: Claude Opus 4.8 (1M context) <<EMAIL_ADDRESS>>
The reth snapshot section described the layout but lacked the manual mv
example that the geth section has. Add the two mv commands mirroring
setup-snapshot-data-reth so operators placing the snapshot by hand know
where reth-data/ and data/ go.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

3 participants