Skip lighthouse node dependency check

This commit is contained in:
Prathamesh Musale 2023-04-03 17:28:37 +05:30
parent cf807ce064
commit a022d94d1f
4 changed files with 13 additions and 22 deletions

View File

@ -58,12 +58,6 @@ services:
environment:
RUN_BOOTNODE: "true"
image: cerc/fixturenet-eth-lighthouse:local
healthcheck:
test: ["CMD", "/scripts/status-internal.sh"]
interval: 10s
timeout: 100s
retries: 3
start_period: 15s
fixturenet-eth-lighthouse-1:
hostname: fixturenet-eth-lighthouse-1

View File

@ -4,10 +4,6 @@ services:
fixturenet-optimism-contracts:
hostname: fixturenet-optimism-contracts
image: cerc/optimism-contracts:local
depends_on:
# TODO Replace dependency with a check
fixturenet-eth-bootnode-lighthouse:
condition: service_healthy
env_file:
- ../config/fixturenet-optimism/optimism-contracts/.env
command: |
@ -96,6 +92,7 @@ services:
command: "/run-op-batcher.sh"
volumes:
op_node_data:
l2_accounts:
fixturenet_geth_accounts:
l1_deployment:
l2_accounts:
op_node_data:

View File

@ -1,5 +1,5 @@
# Change if pointing to an external L1 endpoint
CHAIN_ID=1212
L1_CHAIN_ID=1212
L1_HOST="fixturenet-eth-geth-1"
L1_PORT=8545
L1_ADDRESS=

View File

@ -15,7 +15,7 @@ echo "import './rekey-json'" >> tasks/index.ts
echo "import './send-balance'" >> tasks/index.ts
# Update the chainId in the hardhat config
sed -i "/getting-started/ {n; s/.*chainId.*/ chainId: $CHAIN_ID,/}" hardhat.config.ts
sed -i "/getting-started/ {n; s/.*chainId.*/ chainId: $L1_CHAIN_ID,/}" hardhat.config.ts
# Generate the L2 account addresses
yarn hardhat rekey-json --output /l2-accounts/keys.json
@ -41,13 +41,6 @@ else
echo "Using L1 account credentials from env"
fi
# Send balances to the above L2 addresses
yarn hardhat send-balance --to "${ADMIN_ADDRESS}" --amount 2 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${PROPOSER_ADDRESS}" --amount 5 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${BATCHER_ADDRESS}" --amount 1000 --private-key "${L1_PRIV_KEY}" --network getting-started
echo "Balances sent to L2 accounts"
# Select a finalized L1 block as the starting point for roll ups
until FINALIZED_BLOCK=$(cast block finalized --rpc-url "$L1_RPC"); do
echo "Waiting for a finalized L1 block to exist, retrying after 10s"
@ -57,9 +50,16 @@ done
L1_BLOCKHASH=$(echo "$FINALIZED_BLOCK" | awk '/hash/{print $2}')
L1_BLOCKTIMESTAMP=$(echo "$FINALIZED_BLOCK" | awk '/timestamp/{print $2}')
# Send balances to the above L2 addresses
yarn hardhat send-balance --to "${ADMIN_ADDRESS}" --amount 2 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${PROPOSER_ADDRESS}" --amount 5 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${BATCHER_ADDRESS}" --amount 1000 --private-key "${L1_PRIV_KEY}" --network getting-started
echo "Balances sent to L2 accounts"
# Update the deployment config
sed -i 's/"l2OutputOracleStartingTimestamp": TIMESTAMP/"l2OutputOracleStartingTimestamp": '"$L1_BLOCKTIMESTAMP"'/g' deploy-config/getting-started.json
jq --arg chainid "$CHAIN_ID" '.l1ChainID = ($chainid | tonumber)' deploy-config/getting-started.json > tmp.json && mv tmp.json deploy-config/getting-started.json
jq --arg chainid "$L1_CHAIN_ID" '.l1ChainID = ($chainid | tonumber)' deploy-config/getting-started.json > tmp.json && mv tmp.json deploy-config/getting-started.json
node update-config.js deploy-config/getting-started.json "$ADMIN_ADDRESS" "$PROPOSER_ADDRESS" "$BATCHER_ADDRESS" "$SEQUENCER_ADDRESS" "$L1_BLOCKHASH"