fixturenet-optimism-stack/config/fixturenet-optimism/run-op-node.sh

41 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
CERC_L1_RPC_KIND="${CERC_L1_RPC_KIND:-${DEFAULT_CERC_L1_RPC_KIND}}"
CERC_L1_BLOCK_TIME="${CERC_L1_BLOCK_TIME:-$DEFAULT_CERC_L1_BLOCK_TIME}"
CERC_L1_BEACON="${CERC_L1_BEACON:-${DEFAULT_CERC_L1_BEACON}}"
log_level=INFO
if [ -n "$CERC_LOG_LEVEL" ]; then
log_level="$CERC_LOG_LEVEL"
fi
# Start op-node
rollup_config=/l2-config/rollup.json
seq_key=$(cat /l2-accounts/accounts.json | jq -r .SeqKey)
jwt_file=/l2-config/l2-jwt.txt
l2_auth="http://op-geth:8551"
exec op-node \
--l2=$l2_auth \
--l2.jwt-secret=$jwt_file \
--sequencer.enabled \
--sequencer.l1-confs=5 \
--verifier.l1-confs=4 \
--rollup.config=$rollup_config \
--rpc.addr=0.0.0.0 \
--rpc.port=8547 \
--p2p.disable \
--rpc.enable-admin \
--p2p.sequencer.key="${SEQ_KEY#0x}" \
--l1=$CERC_L1_RPC \
--l1.rpckind=$CERC_L1_RPC_KIND \
--l1.beacon=$CERC_L1_BEACON \
--l1.http-poll-interval="${CERC_L1_BLOCK_TIME}s" \
--l1.epoch-poll-interval="$((CERC_L1_BLOCK_TIME * 32))s" \
--log.level="$log_level"