From 9e9bd3019f8a67cdbd237823d0f81e93584e662b Mon Sep 17 00:00:00 2001 From: Isha Venikar <145848618+IshaVenikar@users.noreply.github.com> Date: Fri, 5 Jul 2024 17:20:40 +0530 Subject: [PATCH 1/4] Update stack with testnet onboarding changes (#1) * Add enable onboarding flag in fixturenet script * Use genesis file if present * Modify setup repos link * Update readme steps to run fixturenet stack using s0 genesis file * Update genesis file mount path * Update instructions for onboarding module flag --- .../docker-compose-fixturenet-laconicd.yml | 3 +++ .../fixturenet-laconicd/create-fixturenet.sh | 13 +++++++++++++ .../stacks/fixturenet-laconicd/README.md | 18 +++++++++++++++++- .../stacks/fixturenet-laconicd/stack.yml | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml b/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml index a47d3bc..500cfba 100644 --- a/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml +++ b/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml @@ -6,8 +6,10 @@ services: environment: TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false} TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false} + ONBOARDING_ENABLED: ${ONBOARDING_ENABLED:-false} volumes: - laconicd-data:/root/.laconicd + - genesis-config:/var/tmp - ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh ports: - "6060" @@ -25,3 +27,4 @@ services: volumes: laconicd-data: + genesis-config: diff --git a/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh b/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh index 4b9225e..d9de757 100644 --- a/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh +++ b/stack-orchestrator/config/fixturenet-laconicd/create-fixturenet.sh @@ -6,6 +6,8 @@ MONIKER="localtestnet" KEYRING="test" LOGLEVEL="${LOGLEVEL:-info}" +input_genesis_file=/var/tmp/genesis.json + if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then # validate dependencies are installed command -v jq > /dev/null 2>&1 || { @@ -29,6 +31,11 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then # Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) laconicd init $MONIKER --chain-id $CHAINID --default-denom photon + if [ -f ${input_genesis_file} ]; then + # Use provided genesis config + cp $input_genesis_file $HOME/.laconicd/config/genesis.json + fi + update_genesis() { jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json @@ -52,6 +59,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"' fi + if [[ "$ONBOARDING_ENABLED" == "true" ]]; then + echo "Enabling validator onboarding." + + update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true' + fi + # increase block time (?) update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"' diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/README.md b/stack-orchestrator/stacks/fixturenet-laconicd/README.md index 891835f..d5c879a 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/README.md +++ b/stack-orchestrator/stacks/fixturenet-laconicd/README.md @@ -51,7 +51,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso * Edit `network` in the spec file to map container ports to host ports as required: ```bash - # testnet-laconicd-spec.yml + # fixturenet-laconicd-spec.yml ... network: ports: @@ -82,8 +82,24 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso cp fixturenet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml ``` +* (Optional) Copy over the genesis file (`.json`) containing the onboarding module state with funded participants to data directory in deployment (`fixturenet-laconicd-deployment/data/genesis-config`): + + ```bash + # Example + cp genesis.json fixturenet-laconicd-deployment/data/genesis-config/genesis.json + ``` + ## Configuration +* Inside the `fixturenet-laconicd-deployment` deployment directory, open `config.env` file and set the following env variable: + + ```bash + # Optional + + # Set to true to enable adding participants functionality of the onboarding module + ONBOARDING_ENABLED= + ``` + * Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables: ```bash diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml b/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml index 85c2ba1..59610af 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml +++ b/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: fixturenet-laconicd description: "A laconicd fixturenet" repos: - - git.vdb.to/cerc-io/laconic2d + - github.com/deep-stack/laconic2d@testnet-onboarding containers: - cerc/laconic2d pods: -- 2.45.2 From 06fedd6a03458785bececab7edbd00b80bdfb456 Mon Sep 17 00:00:00 2001 From: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:57:30 +0530 Subject: [PATCH 2/4] Add scripts to generate a genesis file with allocations for enrolled participants (#2) * Add script to generate validators using bridge node data * Modify script to convert bridge node output to json array * Add script to get address balance mapping from bridge node output * Modify script to generate cosmos address to balance map * Add scripts to generate genesis file with allocations * Take deployment dir and eth account holdings file as inputs * Add .gitignore --------- Co-authored-by: Shreerang Kale --- .gitignore | 7 +++ .../stacks/fixturenet-laconicd/README.md | 3 +- .../scripts/fetch-account-holdings.sh | 22 +++++++ .../scripts/generate-stage1-genesis.sh | 61 +++++++++++++++++++ .../fixturenet-laconicd/scripts/genesis.sh | 32 ++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100755 stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh create mode 100755 stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh create mode 100755 stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f2f3cc --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +stage0-spec.yml +stage0-deployment +stage1-spec.yml +stage1-deployment + +stage1-genesis +output diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/README.md b/stack-orchestrator/stacks/fixturenet-laconicd/README.md index d5c879a..b613b97 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/README.md +++ b/stack-orchestrator/stacks/fixturenet-laconicd/README.md @@ -82,7 +82,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso cp fixturenet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml ``` -* (Optional) Copy over the genesis file (`.json`) containing the onboarding module state with funded participants to data directory in deployment (`fixturenet-laconicd-deployment/data/genesis-config`): +* (Optional) Copy over an existing genesis file (`.json`) to data directory in deployment (`fixturenet-laconicd-deployment/data/genesis-config`): ```bash # Example @@ -97,6 +97,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso # Optional # Set to true to enable adding participants functionality of the onboarding module + # (default: false) ONBOARDING_ENABLED= ``` diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh new file mode 100755 index 0000000..3a90a3b --- /dev/null +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Exit on error +set -e + +# Note: Needs to be run in the go-nitro repository +# Example usage: +# In go-nitro +# /home/user/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh eth-account-holdings.json + +# Check if output file is provided +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +OUTPUT_FILE=$1 + +# Run the nitro-rpc-client command and process the output with jq +npm exec -c "nitro-rpc-client get-all-ledger-channels -p 4006" | jq -s '[.[] | {ethereum_address: .Balance.Them, balance: .Balance.TheirBalance}]' > "$OUTPUT_FILE" + +echo "Ethereum account holdings exported to $OUTPUT_FILE" diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh new file mode 100755 index 0000000..15f3fc2 --- /dev/null +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# Exit on error +set -e + +# Prerequisite: a json file with ETH accounts holdings + +# Check if output file is provided +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +STAGE0_DEPLOYMENT_DIR="$1" +ETH_ACCOUNT_HOLDINGS_FILE="$2" + +STAGE1_GENESIS_DIR=stage1-genesis + +# Create a target directory +mkdir -p $STAGE1_GENESIS_DIR + +# Export onboarding module state from stage0 laconicd chain +onboarding_state_file="$STAGE1_GENESIS_DIR/stage0-onboarding-state.json" +docker run -it \ + -v ${STAGE0_DEPLOYMENT_DIR}/data/laconicd-data:/root/stage0-deployment/.laconicd \ + cerc/laconic2d:local bash -c "laconicd export --home /root/stage0-deployment/.laconicd" \ + | jq .app_state.onboarding > "$onboarding_state_file" + +eth_account_holdings=$(cat "$ETH_ACCOUNT_HOLDINGS_FILE") +stage0_participants=$(cat "$onboarding_state_file" | jq .participants) + +# For each participant, using ETH account holdings, figure out balance allocation for stage1 +# TODO Check what happens if participant is missing +stage1_allocations_file="$STAGE1_GENESIS_DIR/stage1-allocations.json" +jq -n --argjson holdings "$eth_account_holdings" --argjson participants "$stage0_participants" ' +[ + $holdings[] | + . as $holding | + $participants[] | + select((.ethereum_address | ascii_downcase) == ($holding.ethereum_address | ascii_downcase)) | + { + cosmos_address: .cosmos_address, + balance: $holding.balance + } +]' > $stage1_allocations_file + +# Run a script with cerc/laconic2d:local to generate the genesis file +# with onboarding module state and given allocations +docker run -it \ + -v ./stage1-genesis:/root/.laconicd \ + -v ./scripts:/scripts \ + cerc/laconic2d:local bash -c "/scripts/genesis.sh" + +# Copy over the genesis file to output folder +OUTPUT_DIR=output +mkdir -p $OUTPUT_DIR +cp ./stage1-genesis/config/genesis.json $OUTPUT_DIR/genesis.json +echo "Genesis file for stage1 written to $OUTPUT_DIR/genesis.json" + +# Clean up +echo "Please remove the temporary data directory: sudo rm -rf stage1-genesis" diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh new file mode 100755 index 0000000..554a4ea --- /dev/null +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Exit on error +set -e + +# Note: Needs to be run in a docker container with image cerc/laconic2d:local + +CHAINID="laconic_9000-1" +STAGE1_MONIKER=localtestnet-stage-1 +NODE_HOME="/root/.laconicd" + +onboarding_state_file="$NODE_HOME/stage0-onboarding-state.json" +stage1_allocations_file="$NODE_HOME/stage1-allocations.json" +stage1_genesis_file="$NODE_HOME/config/genesis.json" + +laconicd init $STAGE1_MONIKER --chain-id $CHAINID --default-denom photon + +# Update onboarding module state with participants from stage0 +participants=$(jq -c '.participants' $onboarding_state_file) +jq --argjson p "$participants" '.app_state.onboarding.participants = $p' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file" + +# Read and assign allocations +jq -c '.[]' "$stage1_allocations_file" | while IFS= read -r line; do + cosmos_address=$(jq -r '.cosmos_address' <<< "$line") + balance=$(jq -r '.balance' <<< "$line") + + # Add a genesis account for participant's laconic address with required balance + laconicd genesis add-genesis-account $cosmos_address ${balance}photon +done + +# Ensure that resulting genesis file is valid +laconicd genesis validate -- 2.45.2 From e5c637e71656d8cc0154f97d99808f48848c2486 Mon Sep 17 00:00:00 2001 From: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:19:27 +0530 Subject: [PATCH 3/4] Disable transfers in bank module in the generated genesis file (#3) * Disbale transfers in bank module in the generated genesis file * Use bash to run the fixturenet script * Trust local certs for fetching account holdings --- .../compose/docker-compose-fixturenet-laconicd.yml | 2 +- stack-orchestrator/stacks/fixturenet-laconicd/README.md | 2 +- .../fixturenet-laconicd/scripts/fetch-account-holdings.sh | 3 +++ .../stacks/fixturenet-laconicd/scripts/genesis.sh | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml b/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml index 500cfba..d4bc53a 100644 --- a/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml +++ b/stack-orchestrator/compose/docker-compose-fixturenet-laconicd.yml @@ -2,7 +2,7 @@ services: laconicd: restart: unless-stopped image: cerc/laconic2d:local - command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] + command: ["bash", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] environment: TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false} TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false} diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/README.md b/stack-orchestrator/stacks/fixturenet-laconicd/README.md index b613b97..356950d 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/README.md +++ b/stack-orchestrator/stacks/fixturenet-laconicd/README.md @@ -74,7 +74,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso * Create deployment from the spec files: ```bash - laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment + laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh index 3a90a3b..f3d2596 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh @@ -16,6 +16,9 @@ fi OUTPUT_FILE=$1 +# Trust locally-trusted development certificates created by mkcert +export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" + # Run the nitro-rpc-client command and process the output with jq npm exec -c "nitro-rpc-client get-all-ledger-channels -p 4006" | jq -s '[.[] | {ethereum_address: .Balance.Them, balance: .Balance.TheirBalance}]' > "$OUTPUT_FILE" diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh index 554a4ea..e45326c 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/genesis.sh @@ -19,6 +19,9 @@ laconicd init $STAGE1_MONIKER --chain-id $CHAINID --default-denom photon participants=$(jq -c '.participants' $onboarding_state_file) jq --argjson p "$participants" '.app_state.onboarding.participants = $p' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file" +# Disable bank module transfers +jq '.app_state["bank"]["params"]["default_send_enabled"]=false' "$stage1_genesis_file" > tmp.$$.json && mv tmp.$$.json "$stage1_genesis_file" + # Read and assign allocations jq -c '.[]' "$stage1_allocations_file" | while IFS= read -r line; do cosmos_address=$(jq -r '.cosmos_address' <<< "$line") -- 2.45.2 From 5e91f5e40f786a55e4dae4320c2f61231c0bc15e Mon Sep 17 00:00:00 2001 From: neerajvijay1997 <111040298+neerajvijay1997@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:02:45 +0530 Subject: [PATCH 4/4] Use nitro rpc client binary in genesis generation script (#4) * Update script to use nitro rpc client binary * Integrate fetching ETH account holdings in the genesis generation script * Update laconic2d repo source * Change ethereum_address to nitro_address in genesis generation script --------- Co-authored-by: Prathamesh Musale --- .../scripts/fetch-account-holdings.sh | 25 ----------- .../scripts/generate-stage1-genesis.sh | 43 ++++++++++++++----- .../stacks/fixturenet-laconicd/stack.yml | 2 +- 3 files changed, 34 insertions(+), 36 deletions(-) delete mode 100755 stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh deleted file mode 100755 index f3d2596..0000000 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Exit on error -set -e - -# Note: Needs to be run in the go-nitro repository -# Example usage: -# In go-nitro -# /home/user/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd/scripts/fetch-account-holdings.sh eth-account-holdings.json - -# Check if output file is provided -if [ -z "$1" ]; then - echo "Usage: $0 " - exit 1 -fi - -OUTPUT_FILE=$1 - -# Trust locally-trusted development certificates created by mkcert -export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" - -# Run the nitro-rpc-client command and process the output with jq -npm exec -c "nitro-rpc-client get-all-ledger-channels -p 4006" | jq -s '[.[] | {ethereum_address: .Balance.Them, balance: .Balance.TheirBalance}]' > "$OUTPUT_FILE" - -echo "Ethereum account holdings exported to $OUTPUT_FILE" 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 15f3fc2..5e220d7 100755 --- a/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh +++ b/stack-orchestrator/stacks/fixturenet-laconicd/scripts/generate-stage1-genesis.sh @@ -3,47 +3,67 @@ # Exit on error set -e -# Prerequisite: a json file with ETH accounts holdings +# Prerequisite: nitro-rpc-client package installed globally +# https://github.com/cerc-io/go-nitro/blob/main/packages/nitro-rpc-client/readme.md -# Check if output file is provided -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " +# Check args +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " exit 1 fi STAGE0_DEPLOYMENT_DIR="$1" -ETH_ACCOUNT_HOLDINGS_FILE="$2" - STAGE1_GENESIS_DIR=stage1-genesis -# Create a target directory +# Create a temporary target directory mkdir -p $STAGE1_GENESIS_DIR +# -------- + +# Fetch ETH account holdings from the bridge node + +# Trust locally-trusted development certificates created by mkcert +export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" + +# Run the nitro-rpc-client command and process the output with jq +eth_account_holdings=$(nitro-rpc-client get-all-ledger-channels -p 4006 | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]') + +echo "Fetched Ethereum account holdings" + +# -------- + # Export onboarding module state from stage0 laconicd chain + onboarding_state_file="$STAGE1_GENESIS_DIR/stage0-onboarding-state.json" docker run -it \ -v ${STAGE0_DEPLOYMENT_DIR}/data/laconicd-data:/root/stage0-deployment/.laconicd \ cerc/laconic2d:local bash -c "laconicd export --home /root/stage0-deployment/.laconicd" \ | jq .app_state.onboarding > "$onboarding_state_file" -eth_account_holdings=$(cat "$ETH_ACCOUNT_HOLDINGS_FILE") stage0_participants=$(cat "$onboarding_state_file" | jq .participants) +echo "Exported onboarding module state from stage 0 chain" + +# -------- + # For each participant, using ETH account holdings, figure out balance allocation for stage1 -# TODO Check what happens if participant is missing stage1_allocations_file="$STAGE1_GENESIS_DIR/stage1-allocations.json" jq -n --argjson holdings "$eth_account_holdings" --argjson participants "$stage0_participants" ' [ $holdings[] | . as $holding | $participants[] | - select((.ethereum_address | ascii_downcase) == ($holding.ethereum_address | ascii_downcase)) | + select((.nitro_address | ascii_downcase) == ($holding.nitro_address | ascii_downcase)) | { cosmos_address: .cosmos_address, balance: $holding.balance } ]' > $stage1_allocations_file +echo "Calculated allocations for stage 1 chain" + +# -------- + # Run a script with cerc/laconic2d:local to generate the genesis file # with onboarding module state and given allocations docker run -it \ @@ -55,7 +75,10 @@ docker run -it \ OUTPUT_DIR=output mkdir -p $OUTPUT_DIR cp ./stage1-genesis/config/genesis.json $OUTPUT_DIR/genesis.json + echo "Genesis file for stage1 written to $OUTPUT_DIR/genesis.json" +# -------- + # Clean up echo "Please remove the temporary data directory: sudo rm -rf stage1-genesis" diff --git a/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml b/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml index 59610af..85c2ba1 100644 --- a/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml +++ b/stack-orchestrator/stacks/fixturenet-laconicd/stack.yml @@ -2,7 +2,7 @@ version: "1.0" name: fixturenet-laconicd description: "A laconicd fixturenet" repos: - - github.com/deep-stack/laconic2d@testnet-onboarding + - git.vdb.to/cerc-io/laconic2d containers: - cerc/laconic2d pods: -- 2.45.2