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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CLIENT=${CLIENT:-reth}
DATA_DIR=./${CLIENT}_data
CLIENT=reth
DATA_DIR=./reth_data
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
container_name: giwa-jwt-generator
image: alpine/openssl
entrypoint: >
/bin/sh -c "[ ! -f /shared/jwtsecret.key ] && openssl rand -hex 32 | tr -d '\n' > /shared/jwtsecret.key || exit 0"
/bin/sh -c "[ ! -s /shared/jwtsecret.key ] && openssl rand -hex 32 | tr -d '\n' > /shared/jwtsecret.key || exit 0"
volumes:
- shared:/shared
restart: "no"
Expand All @@ -14,7 +14,7 @@ services:
condition: service_completed_successfully
build:
context: .
dockerfile: ${CLIENT}/Dockerfile
dockerfile: ${CLIENT:-reth}/Dockerfile
args:
RETH_VERSION: v1.11.0
OPGETH_VERSION: v1.101609.1
Expand All @@ -28,7 +28,7 @@ services:
- "30303:30303/udp"
volumes:
- shared:/shared
- ${DATA_DIR}:/app/data
- ${DATA_DIR:-./reth_data}:/app/data
consensus:
container_name: giwa-cl
depends_on:
Expand All @@ -44,7 +44,7 @@ services:
env_file:
- ${NETWORK_ENV:-.env.sepolia}
environment:
OP_NODE_L2_ENGINE_KIND: ${CLIENT}
OP_NODE_L2_ENGINE_KIND: ${CLIENT:-reth}
ports:
- "9545:9545"
- "9222:9222"
Expand Down
6 changes: 4 additions & 2 deletions geth/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
set -euxo pipefail

if [ -n "${GENESIS_FILE-}" ]; then
geth init "${GENESIS_FILE}"
DATA_DIR="${GETH_DATADIR:-/app/data}"

if [ -n "${GENESIS_FILE-}" ] && [ ! -d "${DATA_DIR}/geth/chaindata" ]; then
geth init --datadir="${DATA_DIR}" "${GENESIS_FILE}"
fi

exec geth "$@"
6 changes: 5 additions & 1 deletion reth/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ROLLUP_SEQUENCER_HTTP="${GETH_ROLLUP_SEQUENCERHTTP}"
PRUNING_MODE="${GETH_GCMODE}"
JWT_SECRET="${GETH_AUTHRPC_JWTSECRET}"
BOOTNODES="${GETH_BOOTNODES}"
MAX_PEERS="${GETH_MAXPEERS:-100}"

# op-reth does not support --rollup.halt (op-geth reads GETH_ROLLUP_HALT from env).
# Protocol-version halt is enforced by op-node via OP_NODE_ROLLUP_HALT.

ADDITIONAL_ARGS=""
if [[ "$PRUNING_MODE" == "full" ]]; then
Expand Down Expand Up @@ -42,7 +46,7 @@ exec op-reth node \
--authrpc.port="$AUTHRPC_PORT" \
--authrpc.jwtsecret="$JWT_SECRET" \
--metrics=0.0.0.0:"$METRICS_PORT" \
--max-outbound-peers=100 \
--max-outbound-peers="$MAX_PEERS" \
--chain="$GENESIS_FILE" \
--rollup.sequencer-http="$ROLLUP_SEQUENCER_HTTP" \
--rollup.disable-tx-pool-gossip \
Expand Down