From bf594011fb210536e865317c4b29e2ec3e15e3bd Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Sun, 18 Aug 2024 09:43:53 -0400 Subject: [PATCH] Script clean up --- .../docker-compose-fixturenet-optimism.yml | 2 -- config/fixturenet-optimism/run-op-node.sh | 21 +++++++------------ stack/fixturenet-optimism/README.md | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/compose/docker-compose-fixturenet-optimism.yml b/compose/docker-compose-fixturenet-optimism.yml index 8ee38be..08e9c61 100644 --- a/compose/docker-compose-fixturenet-optimism.yml +++ b/compose/docker-compose-fixturenet-optimism.yml @@ -1,5 +1,3 @@ -version: '3.7' - services: # Generates and funds the accounts required when setting up the L2 chain (outputs to volume l2_accounts) # Creates / updates the configuration for L1 contracts deployment diff --git a/config/fixturenet-optimism/run-op-node.sh b/config/fixturenet-optimism/run-op-node.sh index 4aa3f29..862de17 100755 --- a/config/fixturenet-optimism/run-op-node.sh +++ b/config/fixturenet-optimism/run-op-node.sh @@ -4,34 +4,27 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -CERC_L1_CHAIN_ID="${CERC_L1_CHAIN_ID:-${DEFAULT_CERC_L1_CHAIN_ID}}" CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}" -DEPLOYMENT_CONTEXT="$CERC_L1_CHAIN_ID" - -deploy_config_file="/l2-config/$DEPLOYMENT_CONTEXT.json" -l1_deployment_file="/l1-deployment/$DEPLOYMENT_CONTEXT-deploy.json" -l2_allocs_file="/l2-config/allocs-l2.json" -genesis_outfile="/l2-config/genesis.json" -rollup_outfile="/l2-config/rollup.json" # Start op-node -SEQ_KEY=$(cat /l2-accounts/accounts.json | jq -r .SeqKey) +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" -RPC_KIND=any # this can optionally be set to a preset for common node providers like Infura, Alchemy, etc. +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 \ - --l2=$L2_AUTH \ + --l2=$l2_auth \ --l2.jwt-secret=$jwt_file \ --sequencer.enabled \ --sequencer.l1-confs=5 \ --verifier.l1-confs=4 \ - --rollup.config=$rollup_outfile \ + --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=$RPC_KIND \ + --l1.rpckind=$rpc_kind \ --l1.beacon=http://fixturenet-eth-lighthouse-1:8001 diff --git a/stack/fixturenet-optimism/README.md b/stack/fixturenet-optimism/README.md index 3222b5e..9bdbda9 100644 --- a/stack/fixturenet-optimism/README.md +++ b/stack/fixturenet-optimism/README.md @@ -68,7 +68,7 @@ laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism de ### Ports -It is usually necessary to expose certain container ports on one or more the host's addresses to allow incoming connections. +It is usually necessary to expose certain container ports on one or more of the host's addresses to allow incoming connections. Any ports defined in the Docker compose file are exposed by default with random port assignments, bound to "any" interface (IP address 0.0.0.0), but the port mappings can be customized by editing the "spec" file generated by `laconic-so deploy init`. In addition, a stack-wide port mapping "recipe" can be applied at the time the