Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions reth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,6 @@ RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --singl
RUN . /tmp/versions.env && cd op-node && \
make VERSION=$OP_NODE_TAG op-node

FROM rust:1.88 AS reth

WORKDIR /app

COPY versions.env /tmp/versions.env

RUN apt-get update && apt-get -y upgrade && apt-get install -y git libclang-dev pkg-config curl build-essential

RUN . /tmp/versions.env && git clone $OP_RETH_REPO --branch $OP_RETH_TAG --single-branch . && \
git switch -c branch-$OP_RETH_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$OP_RETH_COMMIT" ]'

RUN cargo build --bin op-reth --profile maxperf --manifest-path crates/optimism/bin/Cargo.toml

FROM rust:1.88 AS reth-base

WORKDIR /app
Expand All @@ -41,7 +27,7 @@ RUN . /tmp/versions.env && git clone $BASE_RETH_NODE_REPO . && \
git checkout tags/$BASE_RETH_NODE_TAG && \
bash -c '[ "$(git rev-parse HEAD)" = "$BASE_RETH_NODE_COMMIT" ]' || (echo "Commit hash verification failed" && exit 1)

RUN cargo build --bin base-reth-node --release
RUN cargo build --bin base-reth-node --profile maxperf

FROM ubuntu:24.04

Expand All @@ -53,8 +39,7 @@ RUN mkdir -p /var/log/supervisor
WORKDIR /app

COPY --from=op /app/op-node/bin/op-node ./
COPY --from=reth /app/target/maxperf/op-reth ./
COPY --from=reth-base /app/target/release/base-reth-node ./
COPY --from=reth-base /app/target/maxperf/base-reth-node ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./reth/reth-entrypoint ./execution-entrypoint
COPY op-node-entrypoint .
Expand Down
10 changes: 1 addition & 9 deletions reth/reth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ DISCOVERY_PORT="${DISCOVERY_PORT:-30303}"
P2P_PORT="${P2P_PORT:-30303}"
ADDITIONAL_ARGS=""
NODE_TYPE="${NODE_TYPE:-base}"
BINARY="./base-reth-node"

if [[ -z "${RETH_CHAIN:-}" ]]; then
echo "expected RETH_CHAIN to be set" 1>&2
Expand All @@ -23,15 +24,6 @@ if [[ "$NODE_TYPE" == "base" && -n "${RETH_FB_WEBSOCKET_URL:-}" ]]; then
echo "Enabling Flashblocks support with endpoint: $RETH_FB_WEBSOCKET_URL"
fi

# Select binary based on NODE_TYPE
if [[ "$NODE_TYPE" == "base" ]]; then
echo "Starting Base Reth node"
BINARY="./base-reth-node"
else
echo "Starting OP Reth node"
BINARY="./op-reth"
fi

# Add pruning for base
if [[ "$NODE_TYPE" == "base" && "${RETH_PRUNING_ARGS+x}" = x ]]; then
echo "Adding pruning arguments: $RETH_PRUNING_ARGS"
Expand Down
Loading