2024-05-07 04:18:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
|
|
|
|
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
|
2024-08-29 10:58:30 +00:00
|
|
|
CERC_L1_BLOCK_TIME="${CERC_L1_BLOCK_TIME:-$DEFAULT_CERC_L1_BLOCK_TIME}"
|
2024-09-03 09:42:08 +00:00
|
|
|
CERC_L1_BEACON="${CERC_L1_BEACON:-${DEFAULT_CERC_L1_BEACON}}"
|
2024-05-07 04:18:02 +00:00
|
|
|
|
|
|
|
# Start op-node
|
2024-08-18 13:43:53 +00:00
|
|
|
rollup_config=/l2-config/rollup.json
|
|
|
|
seq_key=$(cat /l2-accounts/accounts.json | jq -r .SeqKey)
|
2024-05-07 04:18:02 +00:00
|
|
|
jwt_file=/l2-config/l2-jwt.txt
|
2024-08-18 13:43:53 +00:00
|
|
|
l2_auth="http://op-geth:8551"
|
|
|
|
rpc_kind=any # this can optionally be set to a preset for common node providers like Infura, Alchemy, etc.
|
2024-05-07 04:18:02 +00:00
|
|
|
|
2024-08-23 05:37:14 +00:00
|
|
|
exec op-node \
|
2024-08-18 13:43:53 +00:00
|
|
|
--l2=$l2_auth \
|
2024-05-07 04:18:02 +00:00
|
|
|
--l2.jwt-secret=$jwt_file \
|
|
|
|
--sequencer.enabled \
|
|
|
|
--sequencer.l1-confs=5 \
|
|
|
|
--verifier.l1-confs=4 \
|
2024-08-18 13:43:53 +00:00
|
|
|
--rollup.config=$rollup_config \
|
2024-05-07 04:18:02 +00:00
|
|
|
--rpc.addr=0.0.0.0 \
|
|
|
|
--rpc.port=8547 \
|
|
|
|
--p2p.disable \
|
|
|
|
--rpc.enable-admin \
|
|
|
|
--p2p.sequencer.key="${SEQ_KEY#0x}" \
|
|
|
|
--l1=$CERC_L1_RPC \
|
2024-08-18 13:43:53 +00:00
|
|
|
--l1.rpckind=$rpc_kind \
|
2024-08-29 10:58:30 +00:00
|
|
|
--l1.beacon=$CERC_L1_BEACON \
|
|
|
|
--l1.http-poll-interval="${CERC_L1_BLOCK_TIME}s" \
|
|
|
|
--l1.epoch-poll-interval="$((CERC_L1_BLOCK_TIME * 32))s"
|