Configure rpc kind from env
This commit is contained in:
parent
4b01f3de72
commit
c7ca93417c
@ -91,6 +91,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- CERC_SCRIPT_DEBUG
|
- CERC_SCRIPT_DEBUG
|
||||||
- CERC_L1_RPC
|
- CERC_L1_RPC
|
||||||
|
- CERC_L1_RPC_KIND
|
||||||
- CERC_L1_BLOCK_TIME
|
- CERC_L1_BLOCK_TIME
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-optimism/run-op-node.sh:/run-op-node.sh
|
- ../config/fixturenet-optimism/run-op-node.sh:/run-op-node.sh
|
||||||
|
@ -6,8 +6,11 @@ DEFAULT_CERC_L1_RPC="http://fixturenet-eth-geth-1:8545"
|
|||||||
DEFAULT_CERC_L1_HOST="fixturenet-eth-geth-1"
|
DEFAULT_CERC_L1_HOST="fixturenet-eth-geth-1"
|
||||||
DEFAULT_CERC_L1_PORT=8545
|
DEFAULT_CERC_L1_PORT=8545
|
||||||
|
|
||||||
# Default block time to match L1 fixturenet config
|
# Default block time matches L1 fixturenet config.
|
||||||
DEFAULT_CERC_L1_BLOCK_TIME=3
|
DEFAULT_CERC_L1_BLOCK_TIME=3
|
||||||
|
# This can optionally be set to a preset for common node providers like Infura, Alchemy, etc.
|
||||||
|
# Or, set to "any" to try all available methods.
|
||||||
|
DEFAULT_CERC_L1_RPC_KIND=standard
|
||||||
|
|
||||||
# URL to get CSV with credentials for accounts on L1
|
# URL to get CSV with credentials for accounts on L1
|
||||||
# that are used to send balance to Optimism Proxy contract
|
# that are used to send balance to Optimism Proxy contract
|
||||||
|
@ -5,6 +5,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
|
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_BLOCK_TIME="${CERC_L1_BLOCK_TIME:-$DEFAULT_CERC_L1_BLOCK_TIME}"
|
||||||
|
|
||||||
# Start op-node
|
# Start op-node
|
||||||
@ -12,7 +13,6 @@ rollup_config=/l2-config/rollup.json
|
|||||||
seq_key=$(cat /l2-accounts/accounts.json | jq -r .SeqKey)
|
seq_key=$(cat /l2-accounts/accounts.json | jq -r .SeqKey)
|
||||||
jwt_file=/l2-config/l2-jwt.txt
|
jwt_file=/l2-config/l2-jwt.txt
|
||||||
l2_auth="http://op-geth:8551"
|
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.
|
|
||||||
|
|
||||||
exec op-node \
|
exec op-node \
|
||||||
--l2=$l2_auth \
|
--l2=$l2_auth \
|
||||||
@ -27,7 +27,7 @@ exec op-node \
|
|||||||
--rpc.enable-admin \
|
--rpc.enable-admin \
|
||||||
--p2p.sequencer.key="${SEQ_KEY#0x}" \
|
--p2p.sequencer.key="${SEQ_KEY#0x}" \
|
||||||
--l1=$CERC_L1_RPC \
|
--l1=$CERC_L1_RPC \
|
||||||
--l1.rpckind=$rpc_kind \
|
--l1.rpckind=$CERC_L1_RPC_KIND \
|
||||||
--l1.beacon=http://fixturenet-eth-lighthouse-1:8001 \
|
--l1.beacon=http://fixturenet-eth-lighthouse-1:8001 \
|
||||||
--l1.http-poll-interval="${CERC_L1_BLOCK_TIME}s" \
|
--l1.http-poll-interval="${CERC_L1_BLOCK_TIME}s" \
|
||||||
--l1.epoch-poll-interval="$((CERC_L1_BLOCK_TIME * 32))s"
|
--l1.epoch-poll-interval="$((CERC_L1_BLOCK_TIME * 32))s"
|
||||||
|
Loading…
Reference in New Issue
Block a user