From be1a7dcd5ee84a29fae4361665733dc40bb13752 Mon Sep 17 00:00:00 2001 From: hacheigriega Date: Tue, 20 Feb 2024 13:27:44 -0500 Subject: [PATCH 1/3] chore: update testnet script --- go.mod | 2 +- scripts/testnet/build_genesis_state.sh | 14 ++++++++---- scripts/testnet/create_genesis.sh | 31 ++++++++++++++++---------- scripts/testnet/members.json | 19 ++++++++++++++-- scripts/testnet/policy.json | 4 ++-- 5 files changed, 49 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 2acf720b..359ae932 100644 --- a/go.mod +++ b/go.mod @@ -31,6 +31,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 + github.com/hashicorp/go-metrics v0.5.2 github.com/ory/dockertest/v3 v3.10.0 github.com/pkg/errors v0.9.1 github.com/sedaprotocol/vrf-go v0.0.0-20231211075603-e5a17bb0b87c @@ -136,7 +137,6 @@ require ( github.com/hashicorp/go-getter v1.7.3 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.2 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect diff --git a/scripts/testnet/build_genesis_state.sh b/scripts/testnet/build_genesis_state.sh index e8526304..4d85a23e 100755 --- a/scripts/testnet/build_genesis_state.sh +++ b/scripts/testnet/build_genesis_state.sh @@ -146,7 +146,12 @@ sleep 20 # Create group and group policy if [ $ADD_GROUPS = true ]; then - $LOCAL_BIN tx group create-group-with-policy $ADMIN_ADDR "ipfs://not_real_metadata" "{\"name\":\"quick turnaround\",\"description\":\"\"}" $MEMBERS_JSON_FILE $POLICY_JSON_FILE --home $TMP_HOME --from $ADMIN_ADDR --keyring-backend test --chain-id $TEMP_CHAIN_ID -y + # add security group + $LOCAL_BIN tx group create-group-with-policy $ADMIN_ADDR "Security Group" "{\"name\":\"Security Group Policy\",\"description\":\"\"}" $MEMBERS_JSON_FILE $POLICY_JSON_FILE --home $TMP_HOME --from $ADMIN_ADDR --keyring-backend test --chain-id $TEMP_CHAIN_ID -y + sleep 10 + + # add treasury group + $LOCAL_BIN tx group create-group-with-policy $ADMIN_ADDR "Treasury Group" "{\"name\":\"Treasury Group Policy\",\"description\":\"\"}" $MEMBERS_JSON_FILE $POLICY_JSON_FILE --home $TMP_HOME --from $ADMIN_ADDR --keyring-backend test --chain-id $TEMP_CHAIN_ID -y sleep 10 fi @@ -185,12 +190,12 @@ cp $ORIGINAL_GENESIS $TMP_GENESIS # make adjustments on TMP_GENESIS until replac # Modify group state and wasm code upload params if [ $ADD_GROUPS = true ]; then jq '.app_state["group"]' $EXPORTED_GENESIS > $TMP_HOME/group.tmp - GROUP_POLICY_ADDR=$(jq '.app_state["group"]["group_policies"][0]["address"]' $EXPORTED_GENESIS) + SECURITY_GROUP_POLICY_ADDR=$(jq '.app_state["group"]["group_policies"][1]["address"]' $EXPORTED_GENESIS) jq --slurpfile group $TMP_HOME/group.tmp '.app_state["group"] = $group[0]' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["code_upload_access"]["permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["instantiate_default_permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - jq '.app_state["wasm"]["params"]["code_upload_access"]["addresses"]=['$GROUP_POLICY_ADDR']' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["wasm"]["params"]["code_upload_access"]["addresses"]=['$SECURITY_GROUP_POLICY_ADDR']' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS fi # Modify wasm codes, contracts, and sequences. @@ -209,5 +214,6 @@ fi mv $TMP_GENESIS $ORIGINAL_GENESIS # clean up -rm -rf $TMP_HOME +# rm -rf $TMP_HOME +# echo $TMP_HOME rm chain_output.log diff --git a/scripts/testnet/create_genesis.sh b/scripts/testnet/create_genesis.sh index cd6227a9..476f9e97 100755 --- a/scripts/testnet/create_genesis.sh +++ b/scripts/testnet/create_genesis.sh @@ -41,10 +41,10 @@ cat $HOME/.sedad/config/genesis.json | jq '.app_state["distribution"]["params"][ cat $HOME/.sedad/config/genesis.json | jq '.app_state["distribution"]["params"]["bonus_proposer_reward"]="0.040000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json # gov params -cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="180s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json -cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["voting_period"]="180s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json -cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["expedited_voting_period"]="150s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json -cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["max_deposit_period"]="180s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="432000s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["voting_period"]="432000s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +# cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["expedited_voting_period"]="432000s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["max_deposit_period"]="432000s"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["min_initial_deposit_ratio"]="0.010000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json # mint params @@ -60,22 +60,21 @@ cat $HOME/.sedad/config/genesis.json | jq '.app_state["slashing"]["params"]["sla # consensus params cat $HOME/.sedad/config/genesis.json | jq '.consensus["params"]["block"]["max_gas"]="100000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json -# TO-DO gov (intentionally adjusted for testing): voting_params.voting_period, params.voting_period, params.expedited_voting_period, min_deposit[0].amount, max_deposit_period # TO-DO wasm params # # ADD GENESIS ACCOUNTS # for i in ${!GENESIS_ADDRESSES[@]}; do - $LOCAL_BIN add-genesis-account ${GENESIS_ADDRESSES[$i]} 100000000000000000seda + $LOCAL_BIN add-genesis-account ${GENESIS_ADDRESSES[$i]} 2000000seda --vesting-amount 1000000seda --vesting-start-time 1708610400 --vesting-end-time 1716386400 --funder $FUNDER_ADDRESS # 2M (1M nonvesting - 1M vesting) done set +u if [ ! -z "$SATOSHI" ]; then - $LOCAL_BIN add-genesis-account $SATOSHI 10000000000000000000seda + $LOCAL_BIN add-genesis-account $SATOSHI 270000000seda # 270M fi if [ ! -z "$FAUCET" ]; then - $LOCAL_BIN add-genesis-account $FAUCET 1000000000000000000seda + $LOCAL_BIN add-genesis-account $FAUCET 700000000seda # 700M fi set -u @@ -94,10 +93,18 @@ for i in ${!MONIKERS[@]}; do VALIDATOR_ADDRESS=$($LOCAL_BIN keys show ${MONIKERS[$i]} --keyring-backend test --home $INDIVIDUAL_VAL_HOME_DIR -a) - # to create their gentx - $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda --home $INDIVIDUAL_VAL_HOME_DIR - # to output geneis file - $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda + if [ -z ${VESTING_AMOUNTS[$i]} ]; then + # to create their gentx + $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS ${SELF_DELEGATION_AMOUNTS[$i]} --home $INDIVIDUAL_VAL_HOME_DIR + # to output geneis file + $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS ${SELF_DELEGATION_AMOUNTS[$i]} + else + # to create their gentx + $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS ${SELF_DELEGATION_AMOUNTS[$i]} --home $INDIVIDUAL_VAL_HOME_DIR --vesting-amount ${VESTING_AMOUNTS[$i]} --vesting-start-time 1708610400 --vesting-end-time 1716386400 --funder $FUNDER_ADDRESS + # to output geneis file + $LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS ${SELF_DELEGATION_AMOUNTS[$i]} --vesting-amount ${VESTING_AMOUNTS[$i]} --vesting-start-time 1708610400 --vesting-end-time 1716386400 --funder $FUNDER_ADDRESS + fi + $LOCAL_BIN gentx ${MONIKERS[$i]} ${SELF_DELEGATION_AMOUNTS[$i]} --moniker=${MONIKERS[$i]} --keyring-backend=test --home $INDIVIDUAL_VAL_HOME_DIR --ip=${IPS[$i]} --chain-id $CHAIN_ID diff --git a/scripts/testnet/members.json b/scripts/testnet/members.json index 6aef78bb..c091e55a 100644 --- a/scripts/testnet/members.json +++ b/scripts/testnet/members.json @@ -1,9 +1,24 @@ { "members": [ { - "address": "seda1g4tlruupkv9kp2n8fx5w70lscjkauy34vzutxs", + "address": "seda1ucv5709wlf9jn84ynyjzyzeavwvurmdyxat26l", "weight": "1", - "metadata": "testnet_faucet" + "metadata": "testnet_hy" + }, + { + "address": "seda1me08j60dfmxwcftpp6jq9cgeapws3e6268a8ng", + "weight": "1", + "metadata": "testnet_jasper" + }, + { + "address": "seda1cz4xdt254kpl09sf3y7qh2djaf6c9zqgyfnfp9", + "weight": "1", + "metadata": "testnet_mario" + }, + { + "address": "seda1jd2q0mz0vzs75tp7lyuzf9064zccddgs8utjr5", + "weight": "1", + "metadata": "testnet_franklin" }, { "address": "seda1xd04svzj6zj93g4eknhp6aq2yyptagcc2zeetj", diff --git a/scripts/testnet/policy.json b/scripts/testnet/policy.json index 64d6f859..c1d0288c 100644 --- a/scripts/testnet/policy.json +++ b/scripts/testnet/policy.json @@ -1,8 +1,8 @@ { "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", - "threshold": "1", + "threshold": "3", "windows": { - "voting_period": "2m", + "voting_period": "15m", "min_execution_period": "0s" } } \ No newline at end of file From cc50618eeaabdaef0c33c730276e77edb922652f Mon Sep 17 00:00:00 2001 From: hacheigriega Date: Tue, 27 Feb 2024 11:54:08 -0500 Subject: [PATCH 2/3] chore: update group genesis state creation script --- scripts/testnet/build_genesis_state.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/testnet/build_genesis_state.sh b/scripts/testnet/build_genesis_state.sh index 4d85a23e..06b661f2 100755 --- a/scripts/testnet/build_genesis_state.sh +++ b/scripts/testnet/build_genesis_state.sh @@ -190,9 +190,17 @@ cp $ORIGINAL_GENESIS $TMP_GENESIS # make adjustments on TMP_GENESIS until replac # Modify group state and wasm code upload params if [ $ADD_GROUPS = true ]; then jq '.app_state["group"]' $EXPORTED_GENESIS > $TMP_HOME/group.tmp + TREASURY_GROUP_POLICY_ADDR=$(jq '.app_state["group"]["group_policies"][0]["address"]' $EXPORTED_GENESIS) SECURITY_GROUP_POLICY_ADDR=$(jq '.app_state["group"]["group_policies"][1]["address"]' $EXPORTED_GENESIS) jq --slurpfile group $TMP_HOME/group.tmp '.app_state["group"] = $group[0]' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + + jq '.app_state["group"]["groups"][0]["admin"]="'$SECURITY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["group"]["group_policies"][1]["admin"]="'$SECURITY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + + jq '.app_state["group"]["groups"][0]["admin"]="'$TREASURY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["group"]["group_policies"][1]["admin"]="'$TREASURY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["wasm"]["params"]["code_upload_access"]["permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["instantiate_default_permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["code_upload_access"]["addresses"]=['$SECURITY_GROUP_POLICY_ADDR']' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS From f45f5d0bfa491ff256970fda92871759ae70bd37 Mon Sep 17 00:00:00 2001 From: hacheigriega Date: Tue, 27 Feb 2024 16:51:48 -0500 Subject: [PATCH 3/3] chore: update scripts --- scripts/testnet/build_genesis_state.sh | 10 +++++----- scripts/testnet/config_example.sh | 2 +- scripts/testnet/create_genesis.sh | 4 ++++ scripts/testnet/upload_and_start.sh | 12 ++++++------ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/scripts/testnet/build_genesis_state.sh b/scripts/testnet/build_genesis_state.sh index 06b661f2..8b831cf0 100755 --- a/scripts/testnet/build_genesis_state.sh +++ b/scripts/testnet/build_genesis_state.sh @@ -195,11 +195,11 @@ if [ $ADD_GROUPS = true ]; then jq --slurpfile group $TMP_HOME/group.tmp '.app_state["group"] = $group[0]' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - jq '.app_state["group"]["groups"][0]["admin"]="'$SECURITY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - jq '.app_state["group"]["group_policies"][1]["admin"]="'$SECURITY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - - jq '.app_state["group"]["groups"][0]["admin"]="'$TREASURY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - jq '.app_state["group"]["group_policies"][1]["admin"]="'$TREASURY_GROUP_POLICY_ADDR'"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + # replace group policy address as group & group policy admin + jq '.app_state["group"]["groups"][0]["admin"]='$SECURITY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["group"]["group_policies"][1]["admin"]='$SECURITY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["group"]["groups"][1]["admin"]='$TREASURY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '.app_state["group"]["group_policies"][0]["admin"]='$TREASURY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["code_upload_access"]["permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS jq '.app_state["wasm"]["params"]["instantiate_default_permission"]="AnyOfAddresses"' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS diff --git a/scripts/testnet/config_example.sh b/scripts/testnet/config_example.sh index f41aa5b0..d65ecaf5 100644 --- a/scripts/testnet/config_example.sh +++ b/scripts/testnet/config_example.sh @@ -82,7 +82,7 @@ CONTRACTS_VERSION=v0.0.1-rc # latest or seda-chain-contracts release version ####################################### MEMBERS_JSON_FILE=./members.json POLICY_JSON_FILE=./policy.json -ADMIN_SEED="mushroom energy ..." +ADMIN_SEED="mushroom energy ..." # used for creating groups - overwritten by group policy addresses anyways ####################################### ############### GITHUB ################ diff --git a/scripts/testnet/create_genesis.sh b/scripts/testnet/create_genesis.sh index 476f9e97..8019d198 100755 --- a/scripts/testnet/create_genesis.sh +++ b/scripts/testnet/create_genesis.sh @@ -48,6 +48,10 @@ cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["max_depo cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["min_initial_deposit_ratio"]="0.010000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json # mint params +cat $HOME/.sedad/config/genesis.json | jq '.app_state["mint"]["minter"]["inflation"]="0.000000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["mint"]["params"]["inflation_rate_change"]="0.000000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["mint"]["params"]["inflation_max"]="0.000000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json +cat $HOME/.sedad/config/genesis.json | jq '.app_state["mint"]["params"]["inflation_min"]="0.000000000000000000"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json cat $HOME/.sedad/config/genesis.json | jq '.app_state["mint"]["params"]["blocks_per_year"]="4204800"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json # slashing params diff --git a/scripts/testnet/upload_and_start.sh b/scripts/testnet/upload_and_start.sh index 32da0aa4..7d286453 100755 --- a/scripts/testnet/upload_and_start.sh +++ b/scripts/testnet/upload_and_start.sh @@ -56,7 +56,7 @@ done SEEDS=() for i in ${!IPS[@]}; do - SEED=$($LOCAL_BIN tendermint show-node-id --home $NODE_DIR/node$i) + SEED=$($LOCAL_BIN tendermint show-node-id --home $NODE_DIR/${MONIKERS[$i]}) SEEDS+=("$SEED@${IPS[$i]}:26656") done @@ -65,13 +65,13 @@ SEEDS_LIST="${list%,}" echo $SEEDS_LIST for i in ${!IPS[@]}; do - cp $NODE_DIR/genesis.json $NODE_DIR/node$i/config/genesis.json + cp $NODE_DIR/genesis.json $NODE_DIR/${MONIKERS[$i]}/config/genesis.json if [[ "$OSTYPE" == "darwin"* ]]; then - sed -i '' "s/seeds = \"\"/seeds = \"${SEEDS_LIST}\"/g" $NODE_DIR/node$i/config/config.toml + sed -i '' "s/seeds = \"\"/seeds = \"${SEEDS_LIST}\"/g" $NODE_DIR/${MONIKERS[$i]}/config/config.toml else - sed "s/seeds = \"\"/seeds = \"${SEEDS_LIST}\"/g" $NODE_DIR/node$i/config/config.toml > tmp - cat tmp > $NODE_DIR/node$i/config/config.toml + sed "s/seeds = \"\"/seeds = \"${SEEDS_LIST}\"/g" $NODE_DIR/${MONIKERS[$i]}/config/config.toml > tmp + cat tmp > $NODE_DIR/${MONIKERS[$i]}/config/config.toml rm tmp fi @@ -83,7 +83,7 @@ for i in ${!IPS[@]}; do ssh -i $SSH_KEY -t ec2-user@${IPS[$i]} 'sudo rm -rf /home/ec2-user/.sedad' # upload node files - scp -i $SSH_KEY -r $NODE_DIR/node$i ec2-user@${IPS[$i]}:/home/ec2-user/.sedad + scp -i $SSH_KEY -r $NODE_DIR/${MONIKERS[$i]} ec2-user@${IPS[$i]}:/home/ec2-user/.sedad # upload chain binary built for the corresponding architecture LINUX_BIN=$NODE_DIR/sedad-amd64