WIP: Upgrade Optimism for Granite fork #6
@ -8,6 +8,7 @@ services:
|
|||||||
hostname: fixturenet-optimism-contracts
|
hostname: fixturenet-optimism-contracts
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-optimism/l1-params.env
|
- ../config/fixturenet-optimism/l1-params.env
|
||||||
|
- ../config/fixturenet-optimism/l2-params.env
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L1_CHAIN_ID: ${CERC_L1_CHAIN_ID}
|
CERC_L1_CHAIN_ID: ${CERC_L1_CHAIN_ID}
|
||||||
@ -15,6 +16,8 @@ services:
|
|||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
||||||
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
|
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
|
||||||
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
|
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
|
||||||
|
CERC_L1_BLOCK_TIME: ${CERC_L1_BLOCK_TIME}
|
||||||
|
CERC_L2_BLOCK_TIME: ${CERC_L2_BLOCK_TIME}
|
||||||
CERC_PROPOSER_AMOUNT: ${CERC_PROPOSER_AMOUNT}
|
CERC_PROPOSER_AMOUNT: ${CERC_PROPOSER_AMOUNT}
|
||||||
CERC_BATCHER_AMOUNT: ${CERC_BATCHER_AMOUNT}
|
CERC_BATCHER_AMOUNT: ${CERC_BATCHER_AMOUNT}
|
||||||
volumes:
|
volumes:
|
||||||
@ -92,6 +95,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||||
|
CERC_L1_BLOCK_TIME: ${CERC_L1_BLOCK_TIME}
|
||||||
CERC_L1_BEACON: ${CERC_L1_BEACON}
|
CERC_L1_BEACON: ${CERC_L1_BEACON}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-optimism/run-op-node.sh:/run-op-node.sh
|
- ../config/fixturenet-optimism/run-op-node.sh:/run-op-node.sh
|
||||||
@ -155,6 +159,7 @@ services:
|
|||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||||
CERC_L1_CHAIN_ID: ${CERC_L1_CHAIN_ID}
|
CERC_L1_CHAIN_ID: ${CERC_L1_CHAIN_ID}
|
||||||
|
CERC_L1_BLOCK_TIME: ${CERC_L1_BLOCK_TIME}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
||||||
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
||||||
|
@ -6,6 +6,9 @@ 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_CERC_L1_BLOCK_TIME=3
|
||||||
|
|
||||||
# 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
|
||||||
# (enables them to do transactions on L2)
|
# (enables them to do transactions on L2)
|
||||||
|
2
config/fixturenet-optimism/l2-params.env
Normal file
2
config/fixturenet-optimism/l2-params.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Default L2 block time. Must be <= L1 block time.
|
||||||
|
DEFAULT_CERC_L2_BLOCK_TIME=1
|
@ -126,8 +126,8 @@ GS_SEQUENCER_ADDRESS=$SEQ \
|
|||||||
L1_RPC_URL=$CERC_L1_RPC \
|
L1_RPC_URL=$CERC_L1_RPC \
|
||||||
L1_CHAIN_ID=$CERC_L1_CHAIN_ID \
|
L1_CHAIN_ID=$CERC_L1_CHAIN_ID \
|
||||||
L2_CHAIN_ID=42069 \
|
L2_CHAIN_ID=42069 \
|
||||||
L1_BLOCK_TIME=12 \
|
L1_BLOCK_TIME=${CERC_L1_BLOCK_TIME:-$DEFAULT_CERC_L1_BLOCK_TIME} \
|
||||||
L2_BLOCK_TIME=2 \
|
L2_BLOCK_TIME=${CERC_L2_BLOCK_TIME:-$DEFAULT_CERC_L2_BLOCK_TIME} \
|
||||||
$config_build_script
|
$config_build_script
|
||||||
|
|
||||||
echo "Writing deployment config."
|
echo "Writing deployment config."
|
||||||
|
@ -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_BLOCK_TIME="${CERC_L1_BLOCK_TIME:-$DEFAULT_CERC_L1_BLOCK_TIME}"
|
||||||
CERC_L1_BEACON="${CERC_L1_BEACON:-${DEFAULT_CERC_L1_BEACON}}"
|
CERC_L1_BEACON="${CERC_L1_BEACON:-${DEFAULT_CERC_L1_BEACON}}"
|
||||||
|
|
||||||
# Start op-node
|
# Start op-node
|
||||||
@ -28,4 +29,6 @@ exec op-node \
|
|||||||
--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=$rpc_kind \
|
||||||
--l1.beacon=$CERC_L1_BEACON
|
--l1.beacon=$CERC_L1_BEACON \
|
||||||
|
--l1.http-poll-interval="${CERC_L1_BLOCK_TIME}s" \
|
||||||
|
--l1.epoch-poll-interval="$((CERC_L1_BLOCK_TIME * 32))s"
|
||||||
|
@ -6,6 +6,7 @@ fi
|
|||||||
|
|
||||||
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
|
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
|
||||||
CERC_L1_CHAIN_ID="${CERC_L1_CHAIN_ID:-${DEFAULT_CERC_L1_CHAIN_ID}}"
|
CERC_L1_CHAIN_ID="${CERC_L1_CHAIN_ID:-${DEFAULT_CERC_L1_CHAIN_ID}}"
|
||||||
|
CERC_L1_BLOCK_TIME="${CERC_L1_BLOCK_TIME:-${DEFAULT_CERC_L1_BLOCK_TIME}}"
|
||||||
DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID"
|
DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID"
|
||||||
|
|
||||||
# Start op-proposer
|
# Start op-proposer
|
||||||
@ -14,7 +15,7 @@ PROPOSER_KEY=$(cat /l2-accounts/accounts.json | jq -r .ProposerKey)
|
|||||||
L2OO_ADDR=$(cat /l1-deployment/$DEPLOYMENT_CONTEXT-deploy.json | jq -r .L2OutputOracleProxy)
|
L2OO_ADDR=$(cat /l1-deployment/$DEPLOYMENT_CONTEXT-deploy.json | jq -r .L2OutputOracleProxy)
|
||||||
|
|
||||||
exec op-proposer \
|
exec op-proposer \
|
||||||
--poll-interval=12s \
|
--poll-interval="${CERC_L1_BLOCK_TIME}s" \
|
||||||
--rpc.port=8560 \
|
--rpc.port=8560 \
|
||||||
--rollup-rpc=$ROLLUP_RPC \
|
--rollup-rpc=$ROLLUP_RPC \
|
||||||
--l2oo-address="${L2OO_ADDR#0x}" \
|
--l2oo-address="${L2OO_ADDR#0x}" \
|
||||||
|
Loading…
Reference in New Issue
Block a user