Skip to content

Commit

Permalink
update rollup config flags to match optimism's recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Bayardo committed Nov 6, 2023
1 parent 5f68f89 commit f454167
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions .env.goerli
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
OP_NODE_VERIFIER_L1_CONFS=4
OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSION=true

# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node
# is fully trusted. It also allows op-node to work with clients such as Erigon that do not
Expand Down
1 change: 1 addition & 0 deletions .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
OP_NODE_VERIFIER_L1_CONFS=4
OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSION=true

# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node
# is fully trusted. It also allows op-node to work with clients such as Erigon that do not
Expand Down
1 change: 1 addition & 0 deletions .env.sepolia
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ OP_NODE_RPC_ADDR=0.0.0.0
OP_NODE_RPC_PORT=8545
OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log
OP_NODE_VERIFIER_L1_CONFS=4
OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSION=true

# OP_NODE_L1_TRUST_RPC allows for faster syncing, but should be used *only* if your L1 RPC node
# is fully trusted. It also allows op-node to work with clients such as Erigon that do not
Expand Down
15 changes: 2 additions & 13 deletions geth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -eu
VERBOSITY=${GETH_VERBOSITY:-3}
GETH_DATA_DIR=/data
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth/chaindata"
OP_GETH_GENESIS_FILE_PATH="${OP_GETH_GENESIS_FILE_PATH:-/genesis.json}"
CHAIN_ID=$(jq -r .config.chainId < "$OP_GETH_GENESIS_FILE_PATH")
RPC_PORT="${RPC_PORT:-8545}"
WS_PORT="${WS_PORT:-8546}"
AUTHRPC_PORT="${AUTHRPC_PORT:-8551}"
Expand All @@ -16,16 +14,6 @@ ADDITIONAL_ARGS=""

mkdir -p $GETH_DATA_DIR

if [ ! -d "$GETH_CHAINDATA_DIR" ]; then
echo "$GETH_CHAINDATA_DIR missing, running init"
echo "Initializing genesis."
./geth --verbosity="$VERBOSITY" init \
--datadir="$GETH_DATA_DIR" \
"$OP_GETH_GENESIS_FILE_PATH"
else
echo "$GETH_CHAINDATA_DIR exists."
fi

echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"

if [ "${OP_GETH_ETH_STATS+x}" = x ]; then
Expand All @@ -37,7 +25,7 @@ if [ "${OP_GETH_ALLOW_UNPROTECTED_TXS+x}" = x ]; then
fi

if [ "${OP_NODE_NETWORK+x}" = x ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --op-network=$OP_NODE_NETWORK --rollup.superchain-upgrades"
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --op-network=$OP_NODE_NETWORK"
fi

exec ./geth \
Expand Down Expand Up @@ -68,5 +56,6 @@ exec ./geth \
--nat=extip:$HOST_IP \
--networkid="$CHAIN_ID" \
--rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP" \
--rollup.halt=major \
--port="$P2P_PORT" \
$ADDITIONAL_ARGS # intentionally unquoted

0 comments on commit f454167

Please sign in to comment.