diff --git a/scripts/local_multi_setup.sh b/scripts/local_multi_setup.sh new file mode 100755 index 00000000..bd9ce05a --- /dev/null +++ b/scripts/local_multi_setup.sh @@ -0,0 +1,140 @@ +#!/bin/bash +set -e + +# always returns true so set -e doesn't exit if it is not running. +killall sedad || true +rm -rf $HOME/.sedad/ + +# make four chain directories +mkdir $HOME/.sedad +mkdir $HOME/.sedad/validator1 +mkdir $HOME/.sedad/validator2 +mkdir $HOME/.sedad/validator3 +mkdir $HOME/.sedad/validator4 + +# init all four validators +sedad init --default-denom aseda --chain-id=testing validator1 --home=$HOME/.sedad/validator1 +sedad init --default-denom aseda --chain-id=testing validator2 --home=$HOME/.sedad/validator2 +sedad init --default-denom aseda --chain-id=testing validator3 --home=$HOME/.sedad/validator3 +sedad init --default-denom aseda --chain-id=testing validator4 --home=$HOME/.sedad/validator4 +# create keys for all four validators +sedad keys add validator1 --keyring-backend=test --home=$HOME/.sedad/validator1 +sedad keys add validator2 --keyring-backend=test --home=$HOME/.sedad/validator2 +sedad keys add validator3 --keyring-backend=test --home=$HOME/.sedad/validator3 +sedad keys add validator4 --keyring-backend=test --home=$HOME/.sedad/validator4 + + + +# create validator node with tokens to transfer to the four other nodes +sedad add-genesis-account $(sedad keys show validator1 -a --keyring-backend=test --home=$HOME/.sedad/validator1) 10000000000000000000aseda --home=$HOME/.sedad/validator1 +sedad gentx validator1 10000000000000000000aseda --keyring-backend=test --home=$HOME/.sedad/validator1 --chain-id=testing +sedad collect-gentxs --home=$HOME/.sedad/validator1 + + +# port key (validator1 uses default ports) +# validator1 1317, 9050, 9091, 26658, 26657, 26656, 6060, 26660 +# validator2 1316, 9088, 9089, 26655, 26654, 26653, 6061, 26630 +# validator3 1315, 9086, 9087, 26652, 26651, 26650, 6062, 26620 +# validator4 1314, 9084, 9085, 26649, 26648, 26647, 6063, 26610 + + +# change app.toml values +VALIDATOR1_APP_TOML=$HOME/.sedad/validator1/config/app.toml +VALIDATOR2_APP_TOML=$HOME/.sedad/validator2/config/app.toml +VALIDATOR3_APP_TOML=$HOME/.sedad/validator3/config/app.toml +VALIDATOR4_APP_TOML=$HOME/.sedad/validator4/config/app.toml + +# validator1 +sed -i -E 's|0.0.0.0:9090|0.0.0.0:9050|g' $VALIDATOR1_APP_TOML + +# validator2 +sed -i -E 's|tcp://0.0.0.0:1317|tcp://0.0.0.0:1316|g' $VALIDATOR2_APP_TOML +sed -i -E 's|0.0.0.0:9090|0.0.0.0:9088|g' $VALIDATOR2_APP_TOML +sed -i -E 's|0.0.0.0:9091|0.0.0.0:9089|g' $VALIDATOR2_APP_TOML + +# validator3 +sed -i -E 's|tcp://0.0.0.0:1317|tcp://0.0.0.0:1315|g' $VALIDATOR3_APP_TOML +sed -i -E 's|0.0.0.0:9090|0.0.0.0:9086|g' $VALIDATOR3_APP_TOML +sed -i -E 's|0.0.0.0:9091|0.0.0.0:9087|g' $VALIDATOR3_APP_TOML +sed -i -E 's|adaptive-fee-enabled = "false"|adaptive-fee-enabled = "true"|g' $VALIDATOR3_APP_TOML + +# validator4 +sed -i -E 's|tcp://0.0.0.0:1317|tcp://0.0.0.0:1314|g' $VALIDATOR4_APP_TOML +sed -i -E 's|0.0.0.0:9090|0.0.0.0:9084|g' $VALIDATOR4_APP_TOML +sed -i -E 's|0.0.0.0:9091|0.0.0.0:9085|g' $VALIDATOR4_APP_TOML +sed -i -E 's|adaptive-fee-enabled = "false"|adaptive-fee-enabled = "true"|g' $VALIDATOR4_APP_TOML + + +# change config.toml values +VALIDATOR1_CONFIG=$HOME/.sedad/validator1/config/config.toml +VALIDATOR2_CONFIG=$HOME/.sedad/validator2/config/config.toml +VALIDATOR3_CONFIG=$HOME/.sedad/validator3/config/config.toml +VALIDATOR4_CONFIG=$HOME/.sedad/validator4/config/config.toml + +# validator1 +sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR1_CONFIG +# sed -i -E 's|version = "v0"|version = "v1"|g' $VALIDATOR1_CONFIG +sed -i -E 's|prometheus = false|prometheus = true|g' $VALIDATOR1_CONFIG + +# validator2 +sed -i -E 's|tcp://127.0.0.1:26658|tcp://127.0.0.1:26655|g' $VALIDATOR2_CONFIG +sed -i -E 's|tcp://127.0.0.1:26657|tcp://127.0.0.1:26654|g' $VALIDATOR2_CONFIG +sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26653|g' $VALIDATOR2_CONFIG +sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR2_CONFIG +sed -i -E 's|prometheus = false|prometheus = true|g' $VALIDATOR2_CONFIG +sed -i -E 's|prometheus_listen_addr = ":26660"|prometheus_listen_addr = ":26630"|g' $VALIDATOR2_CONFIG + +# validator3 +sed -i -E 's|tcp://127.0.0.1:26658|tcp://127.0.0.1:26652|g' $VALIDATOR3_CONFIG +sed -i -E 's|tcp://127.0.0.1:26657|tcp://127.0.0.1:26651|g' $VALIDATOR3_CONFIG +sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26650|g' $VALIDATOR3_CONFIG +sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR3_CONFIG +sed -i -E 's|prometheus = false|prometheus = true|g' $VALIDATOR3_CONFIG +sed -i -E 's|prometheus_listen_addr = ":26660"|prometheus_listen_addr = ":26620"|g' $VALIDATOR3_CONFIG + +# validator4 +sed -i -E 's|tcp://127.0.0.1:26658|tcp://127.0.0.1:26649|g' $VALIDATOR4_CONFIG +sed -i -E 's|tcp://127.0.0.1:26657|tcp://127.0.0.1:26648|g' $VALIDATOR4_CONFIG +sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26647|g' $VALIDATOR4_CONFIG +sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR4_CONFIG +sed -i -E 's|prometheus = false|prometheus = true|g' $VALIDATOR4_CONFIG +sed -i -E 's|prometheus_listen_addr = ":26660"|prometheus_listen_addr = ":26610"|g' $VALIDATOR4_CONFIG + + +# copy validator1 genesis file to validator2-4 +cp $HOME/.sedad/validator1/config/genesis.json $HOME/.sedad/validator2/config/genesis.json +cp $HOME/.sedad/validator1/config/genesis.json $HOME/.sedad/validator3/config/genesis.json +cp $HOME/.sedad/validator1/config/genesis.json $HOME/.sedad/validator4/config/genesis.json + + +# copy tendermint node id of validator1 to persistent peers of validator2-4 +sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$(sedad tendermint show-node-id --home=$HOME/.sedad/validator1)@localhost:26656\"|g" $HOME/.sedad/validator2/config/config.toml +sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$(sedad tendermint show-node-id --home=$HOME/.sedad/validator1)@localhost:26656\"|g" $HOME/.sedad/validator3/config/config.toml +sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$(sedad tendermint show-node-id --home=$HOME/.sedad/validator1)@localhost:26656\"|g" $HOME/.sedad/validator4/config/config.toml + +# start all four validators +tmux new-session -s validator1 -d +tmux send -t validator1 'sedad start --home=$HOME/.sedad/validator1' ENTER + +tmux new-session -s validator2 -d +tmux send -t validator2 'sedad start --home=$HOME/.sedad/validator2' ENTER + +tmux new-session -s validator3 -d +tmux send -t validator3 'sedad start --home=$HOME/.sedad/validator3' ENTER + +tmux new-session -s validator4 -d +tmux send -t validator4 'sedad start --home=$HOME/.sedad/validator4' ENTER + +# send aseda from first validator to second validator +echo "Waiting 7 seconds to send funds to validators 2, 3, and 4..." +sleep 7 +sedad tx bank send validator1 $(sedad keys show validator2 -a --keyring-backend=test --home=$HOME/.sedad/validator2) 500000000aseda --keyring-backend=test --home=$HOME/.sedad/validator1 --chain-id=testing --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda +sedad tx bank send validator1 $(sedad keys show validator3 -a --keyring-backend=test --home=$HOME/.sedad/validator3) 400000000aseda --keyring-backend=test --home=$HOME/.sedad/validator1 --chain-id=testing --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda +sedad tx bank send validator1 $(sedad keys show validator4 -a --keyring-backend=test --home=$HOME/.sedad/validator4) 400000000aseda --keyring-backend=test --home=$HOME/.sedad/validator1 --chain-id=testing --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda + +# create second, third and fourth validator +sedad tx staking create-validator --amount=500000000aseda --from=validator2 --pubkey=$(sedad tendermint show-validator --home=$HOME/.sedad/validator2) --moniker="validator2" --chain-id="testing" --commission-rate="0.1" --commission-max-rate="0.2" --commission-max-change-rate="0.05" --min-self-delegation="500000000" --keyring-backend=test --home=$HOME/.sedad/validator2 --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda +sedad tx staking create-validator --amount=400000000aseda --from=validator3 --pubkey=$(sedad tendermint show-validator --home=$HOME/.sedad/validator3) --moniker="validator3" --chain-id="testing" --commission-rate="0.1" --commission-max-rate="0.2" --commission-max-change-rate="0.05" --min-self-delegation="400000000" --keyring-backend=test --home=$HOME/.sedad/validator3 --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda +sedad tx staking create-validator --amount=400000000aseda --from=validator4 --pubkey=$(sedad tendermint show-validator --home=$HOME/.sedad/validator4) --moniker="validator4" --chain-id="testing" --commission-rate="0.1" --commission-max-rate="0.2" --commission-max-change-rate="0.05" --min-self-delegation="400000000" --keyring-backend=test --home=$HOME/.sedad/validator4 --broadcast-mode block --node http://localhost:26657 --yes --fees 1000000aseda + +echo "All 4 Validators are up and running!" diff --git a/scripts/local_setup.sh b/scripts/local_setup.sh index b8f4a75c..3e4088b5 100755 --- a/scripts/local_setup.sh +++ b/scripts/local_setup.sh @@ -46,6 +46,11 @@ add_key_and_account "fixedacc2" "100000000000000000seda" "hole bag crumble table add_key_and_account "satoshi" "100000000000000000seda" add_key_and_account "acc1" "100000000000000000seda" +$BIN keys add vesttest --keyring-backend test +VESTING_START=$(date +%s) +VESTING_END=$((VESTING_START + 100000)) +$BIN add-genesis-account vesttest 10000seda --vesting-amount 10000seda --vesting-start-time $VESTING_START --vesting-end-time $VESTING_END --funder seda1jq60my60e87arglrazfpqn753hx0pzcatdek76 --keyring-backend test + # create a default validator $BIN gentx satoshi 10000000000000000seda --keyring-backend test diff --git a/scripts/testnet/build_genesis_state.sh b/scripts/testnet/build_genesis_state.sh index ea9b25ee..1a74e224 100755 --- a/scripts/testnet/build_genesis_state.sh +++ b/scripts/testnet/build_genesis_state.sh @@ -199,18 +199,20 @@ 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 # 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["group"]["groups"][2]["admin"]='$OOA_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS - # jq '.app_state["group"]["group_policies"][2]["admin"]='$OOA_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 + jq '(.app_state.group.groups[] | select(.metadata == "Security Group") .admin) |= '$SECURITY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '(.app_state.group.group_policies[] | select(.address == '$SECURITY_GROUP_POLICY_ADDR') .admin) |= '$SECURITY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + + jq '(.app_state.group.groups[] | select(.metadata == "Treasury Group") .admin) |= '$TREASURY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '(.app_state.group.group_policies[] | select(.address == '$TREASURY_GROUP_POLICY_ADDR') .admin) |= '$TREASURY_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + + jq '(.app_state.group.groups[] | select(.metadata == "OOA Group") .admin) |= '$OOA_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + jq '(.app_state.group.group_policies[] | select(.address == '$OOA_GROUP_POLICY_ADDR') .admin) |= '$OOA_GROUP_POLICY_ADDR'' $TMP_GENESIS > $TMP_TMP_GENESIS && mv $TMP_TMP_GENESIS $TMP_GENESIS + + if [ "$WASM_PERMISSION_EVERYONE" != "true" ]; then + 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 + fi fi # Modify wasm codes, contracts, and sequences. diff --git a/scripts/testnet/config_example.sh b/scripts/testnet/config_example.sh index d65ecaf5..8a3e39fe 100644 --- a/scripts/testnet/config_example.sh +++ b/scripts/testnet/config_example.sh @@ -1,45 +1,22 @@ - -CHAIN_ID=seda-1-testnet -GENESIS_TIME="2024-01-18T22:00:00.000000Z" - -CHAIN_VERSION=v0.0.4 +CHAIN_ID=seda-1-devnet +GENESIS_TIME="2024-04-24T16:00:00.000000Z" +CHAIN_VERSION=v0.1.3 WASMVM_VERSION=v1.5.2 -LOCAL_BIN=$(git rev-parse --show-toplevel)/build/sedad # chain binary executable on your machine +WASM_PERMISSION_EVERYONE=true # true for everyone and false for mainnet configuration +SHORT_VOTING_PERIOD=true # true for 180s voting period or false for mainnet configuration +LOCAL_BIN=$(git rev-parse --show-toplevel)/build/sedad # chain binary executable on your machine HOME_DIR=$HOME/.sedad # chain directory HOME_CONFIG_DIR=$HOME_DIR/config # chain config directory - NODE_DIR=./$CHAIN_ID-nodes # where node directories will be created WASM_DIR=./artifacts # where Wasm files will be downloaded -DENOM_METADATA='[ - { - "description": "The token asset for SEDA Chain", - "denom_units": [ - { - "denom": "aseda", - "exponent": 0, - "aliases": [ - "attoseda" - ] - }, - { - "denom": "seda", - "exponent": 18, - "aliases": [] - } - ], - "base": "aseda", - "display": "seda", - "name": "seda", - "symbol": "SEDA" - } -]' ####################################### ########### VALIDATOR NODES ########### ####################################### +# NOTE: ONLY FILL OUT THIS PART IF YOU ARE SETTING UP VALIDATOR NODES. # NOTE: Assumes 26656 port for p2p communication # NOTE: Assumes user is ec2-user # NOTE: The setup node script assumes ami-0a1ab4a3fcf997a9d @@ -47,20 +24,22 @@ IPS=( "xx.xx.xx.xx" "xx.xx.xx.xx" ) +SSH_KEY=~/.ssh/id_rsa # or id_ed25519 MONIKERS=( - "node0" - "node1" + "SEDA-node0" + "SEDA-node1" ) SELF_DELEGATION_AMOUNTS=( - "30000000000000000seda" - "10000000000000000seda" + "27500seda" + "27500seda" ) -SSH_KEY=~/.ssh/id_rsa # key used for ssh - ####################################### ########## GENESIS ACCOUNTS ########### ####################################### +SATOSHI=seda... # if set, creates a genesis account with 100x seda tokens compared to standard genesis account +FAUCET=seda... # if set, creates a genesis account with 10x seda tokens compared to standard genesis account + # Standard genesis accounts # NOTE: The script will create operators of the nodes defined above and # add them as genesis accounts in addition to the ones defined below. @@ -69,9 +48,6 @@ GENESIS_ADDRESSES=( "seda..." ) -SATOSHI=seda... # if set, creates a genesis account with 100x seda tokens compared to standard genesis account -FAUCET=seda... # if set, creates a genesis account with 10x seda tokens compared to standard genesis account - ####################################### ######### COSMWASM CONTRACTS ########## ####################################### @@ -80,8 +56,14 @@ CONTRACTS_VERSION=v0.0.1-rc # latest or seda-chain-contracts release version ####################################### ############ GROUP CONFIG ############# ####################################### -MEMBERS_JSON_FILE=./members.json -POLICY_JSON_FILE=./policy.json +GROUP_OOA_MEMBERS=./group_ooa_members.json +GROUP_SECURITY_MEMBERS=./group_security_members.json +GROUP_TREASURY_MEMBERS=./group_treasury_members.json + +GROUP_OOA_POLICY=./group_ooa_policy.json +GROUP_SECURITY_POLICY=./group_security_policy.json +GROUP_TREASURY_POLICY=./group_treasury_policy.json + ADMIN_SEED="mushroom energy ..." # used for creating groups - overwritten by group policy addresses anyways ####################################### diff --git a/scripts/testnet/create_genesis.sh b/scripts/testnet/create_genesis.sh index 61681ff4..9dd7e1bf 100755 --- a/scripts/testnet/create_genesis.sh +++ b/scripts/testnet/create_genesis.sh @@ -65,8 +65,14 @@ 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"]="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 +if [ "$SHORT_VOTING_PERIOD" = "true" ]; then + 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 +else + 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 +fi + cat $HOME/.sedad/config/genesis.json | jq '.app_state["gov"]["params"]["min_deposit"][0]["denom"]="aseda"' > $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_deposit"][0]["amount"]="20000000000000000000000"' > $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_min_deposit"][0]["denom"]="aseda"' > $HOME/.sedad/config/tmp_genesis.json && mv $HOME/.sedad/config/tmp_genesis.json $HOME/.sedad/config/genesis.json diff --git a/scripts/testnet/upload_and_start.sh b/scripts/testnet/upload_and_start.sh index 7d286453..305f8b5a 100755 --- a/scripts/testnet/upload_and_start.sh +++ b/scripts/testnet/upload_and_start.sh @@ -31,10 +31,29 @@ if [ ! -f "$LOCAL_BIN" ]; then exit 1 fi -# download chain binaries -curl -LO https://github.com/sedaprotocol/seda-chain/releases/download/$CHAIN_VERSION/sedad-amd64 +# Download chain binaries + +# From release: +# curl -LO https://github.com/sedaprotocol/seda-chain/releases/download/$CHAIN_VERSION/sedad-amd64 +# curl -LO https://github.com/sedaprotocol/seda-chain/releases/download/$CHAIN_VERSION/sedad-arm64 + +# From artifact: +RUN_NO=8941156340 +ARTIFACT_NO=1471046522 + +set +x +url=$(curl -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/sedaprotocol/seda-chain/actions/runs/$RUN_NO/artifacts | \ + jq -r '.artifacts[] | select(.id=='"$ARTIFACT_NO"') | .archive_download_url') +curl -L -o artifact.zip \ + -H "Authorization: token $GITHUB_TOKEN" \ + $url +set -x + +unzip artifact.zip + mv sedad-amd64 $NODE_DIR -curl -LO https://github.com/sedaprotocol/seda-chain/releases/download/$CHAIN_VERSION/sedad-arm64 mv sedad-arm64 $NODE_DIR