Skip to content

Commit fcd5cfd

Browse files
feat: update geth Dockerfile to use base-consensus instead of op-node
Replace Go op-node build stage with Rust base-consensus stage. Update geth-entrypoint to use BASE_NODE_* auth vars and OP_GETH_OP_NETWORK for --op-network flag since BASE_NODE_NETWORK is now a numeric chain ID. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent c43d088 commit fcd5cfd

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

geth/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
FROM golang:1.24 AS op
2-
3-
RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin
1+
FROM rust:1.88 AS base-consensus
42

53
WORKDIR /app
64

75
COPY versions.env /tmp/versions.env
86

9-
RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \
10-
git switch -c branch-$OP_NODE_TAG && \
11-
bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]'
7+
RUN apt-get update && apt-get -y upgrade && \
8+
apt-get install -y git libclang-dev pkg-config curl build-essential && \
9+
rm -rf /var/lib/apt/lists/*
10+
11+
RUN . /tmp/versions.env && git clone $BASE_NODE_REPO . && \
12+
git checkout tags/$BASE_NODE_TAG && \
13+
bash -c '[ "$(git rev-parse HEAD)" = "$BASE_NODE_COMMIT" ]' || (echo "Commit hash verification failed" && exit 1)
1214

13-
RUN . /tmp/versions.env && cd op-node && \
14-
make VERSION=$OP_NODE_TAG op-node
15+
RUN cargo build --bin base-consensus --profile maxperf
1516

1617
FROM golang:1.24 AS geth
1718

@@ -34,10 +35,10 @@ RUN mkdir -p /var/log/supervisor
3435

3536
WORKDIR /app
3637

37-
COPY --from=op /app/op-node/bin/op-node ./
38+
COPY --from=base-consensus /app/target/maxperf/base-consensus ./
3839
COPY --from=geth /app/build/bin/geth ./
3940
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
4041
COPY geth/geth-entrypoint ./execution-entrypoint
41-
COPY op-node-entrypoint .
42+
COPY base-consensus-entrypoint .
4243

4344
CMD ["/usr/bin/supervisord"]

geth/geth-entrypoint

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ GETH_CACHE_GC="${GETH_CACHE_GC:-12}"
2121
GETH_CACHE_SNAPSHOT="${GETH_CACHE_SNAPSHOT:-24}"
2222
GETH_CACHE_TRIE="${GETH_CACHE_TRIE:-44}"
2323

24-
if [[ -z "$OP_NODE_NETWORK" ]]; then
25-
echo "expected OP_NODE_NETWORK to be set" 1>&2
24+
if [[ -z "$BASE_NODE_NETWORK" ]]; then
25+
echo "expected BASE_NODE_NETWORK to be set" 1>&2
2626
exit 1
2727
fi
2828

2929
mkdir -p $GETH_DATA_DIR
3030

31-
echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
31+
echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH"
3232

3333
if [ "${OP_GETH_ETH_STATS+x}" = x ]; then
3434
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --ethstats=$OP_GETH_ETH_STATS"
@@ -62,7 +62,7 @@ exec ./geth \
6262
--authrpc.addr=0.0.0.0 \
6363
--authrpc.port="$AUTHRPC_PORT" \
6464
--authrpc.vhosts="*" \
65-
--authrpc.jwtsecret="$OP_NODE_L2_ENGINE_AUTH" \
65+
--authrpc.jwtsecret="$BASE_NODE_L2_ENGINE_AUTH" \
6666
--ws \
6767
--ws.addr=0.0.0.0 \
6868
--ws.port="$WS_PORT" \
@@ -76,7 +76,7 @@ exec ./geth \
7676
--maxpeers=100 \
7777
--rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP" \
7878
--rollup.halt=major \
79-
--op-network="$OP_NODE_NETWORK" \
79+
--op-network="$OP_GETH_OP_NETWORK" \
8080
--discovery.port="$DISCOVERY_PORT" \
8181
--port="$P2P_PORT" \
8282
--rollup.disabletxpoolgossip=true \

0 commit comments

Comments
 (0)