From e60a2c1897eff2ebc20499c9cb7f3ed87d15979a Mon Sep 17 00:00:00 2001 From: Nabarun Date: Sat, 10 Aug 2024 20:10:49 +0530 Subject: [PATCH] Configure chain ID in stage1 genesis scripts --- .../scripts/generate-stage1-genesis-from-csv.sh | 2 ++ .../scripts/generate-stage1-genesis-from-json.sh | 2 ++ .../scripts/generate-stage1-genesis-using-allocations.sh | 2 ++ .../fixturenet-laconicd/scripts/generate-stage1-genesis.sh | 2 ++ .../stacks/fixturenet-laconicd/scripts/genesis.sh | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-csv.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-csv.sh index 51b36dc..ff32eaf 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-csv.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-csv.sh @@ -79,6 +79,8 @@ echo "Calculated allocations for stage 1 chain" docker run -it \ -v ./$STAGE1_GENESIS_DIR:/root/.laconicd \ -v ./scripts:/scripts \ + -e CHAINID=$CHAINID \ + -e STAGE1_MONIKER=$MONIKER \ cerc/laconicd:local bash -c "/scripts/genesis.sh" # Copy over the genesis file to output folder diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-json.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-json.sh index d9f4ff2..fb67e59 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-json.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-from-json.sh @@ -35,6 +35,8 @@ echo "Copied over stage1 allocations json file to mount dir" docker run -it \ -v ./$STAGE1_GENESIS_DIR:/root/.laconicd \ -v ./scripts:/scripts \ + -e CHAINID=$CHAINID \ + -e STAGE1_MONIKER=$MONIKER \ cerc/laconicd:local bash -c "/scripts/genesis.sh" # Copy over the genesis file to output folder diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-using-allocations.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-using-allocations.sh index e88de9d..3436e2b 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-using-allocations.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis-using-allocations.sh @@ -56,6 +56,8 @@ echo "Calculated allocations for stage 1 chain" docker run -it \ -v ./$STAGE1_GENESIS_DIR:/root/.laconicd \ -v ./scripts:/scripts \ + -e CHAINID=$CHAINID \ + -e STAGE1_MONIKER=$MONIKER \ cerc/laconicd:local bash -c "/scripts/genesis.sh" # Copy over the genesis file to output folder diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh index 7a7722c..bd29a34 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh @@ -63,6 +63,8 @@ echo "Calculated allocations for stage 1 chain" docker run -it \ -v ./$STAGE1_GENESIS_DIR:/root/.laconicd \ -v ./scripts:/scripts \ + -e CHAINID=$CHAINID \ + -e STAGE1_MONIKER=$MONIKER \ cerc/laconicd:local bash -c "/scripts/genesis.sh" # Copy over the genesis file to output folder diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh index 7ebaccb..1027bd9 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh @@ -6,8 +6,8 @@ set -u # Note: Needs to be run in a docker container with image cerc/laconicd:local -CHAINID="laconic_9000-1" -STAGE1_MONIKER=localtestnet-stage-1 +CHAINID=${CHAINID:-"laconic_9000-1"} +STAGE1_MONIKER=${MONIKER:-"localtestnet-stage-1"} NODE_HOME="/root/.laconicd" stage1_participants_file="$NODE_HOME/stage1-participants.json"