From 86539e050e7c4cf1c3f6abbe028d911ab615689f Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Tue, 12 Sep 2023 12:48:46 -0400 Subject: [PATCH] feat: testnetify 3 validators (#4) Signed-off-by: Artur Troian --- Makefile | 5 +- config-v0.24.0.json | 126 +++++++++++++++++++++++++++++--------------- run.sh | 6 ++- 3 files changed, 91 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 7eb2a1d..90fd858 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BINARY_VERSION ?= v0.24.2 +BINARY_VERSION ?= v0.24.3 CURRENT_UPGRADE ?= v0.24.0 GENESIS_DEST_DIR ?= $(CACHE_DIR)/$(CURRENT_UPGRADE) GENESIS_DEST := $(GENESIS_DEST_DIR)/genesis.json @@ -6,6 +6,7 @@ GENESIS_ORIG ?= $(GENESIS_DEST_DIR)/genesis.orig.json LZ4_ARCHIVE ?= $(GENESIS_DEST_DIR)/genesis.json.tar.lz4 export GENESIS_ORIG +#export SNAPSHOT_URL ?= $(PWD)/akash_12685843.tar.lz4 CHAIN_TOKEN_DENOM := uakt CHAIN_VALIDATOR_AMOUNT := 20000000000000000 @@ -44,7 +45,7 @@ $(GENESIS_DEST_DIR): testnetify: $(AKASH) $(GENESIS_DEST_DIR) $(AKASH) debug testnetify $(GENESIS_ORIG) $(GENESIS_DEST) -c config-$(CURRENT_UPGRADE).json -archive:# testnetify +archive: testnetify (cd $(GENESIS_DEST_DIR); tar cvf - genesis.json | lz4 -f - $(LZ4_ARCHIVE)) .PHONY: clean diff --git a/config-v0.24.0.json b/config-v0.24.0.json index da937dc..e92d99b 100644 --- a/config-v0.24.0.json +++ b/config-v0.24.0.json @@ -1,48 +1,90 @@ { - "chain_id": "localakash", - "accounts": { - "add": [ - { - "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", - "pubkey": { - "@type": "/cosmos.crypto.secp256k1.PubKey", - "key": "Ap0sauGRfAcjXjL0k+Oyp+mZmR3Tono8CrhrFXWJtlG2" - }, - "coins": [ - "2000000000000000uakt" + "chain_id": "localakash", + "accounts": { + "add": [ + { + "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", + "pubkey": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "Ap0sauGRfAcjXjL0k+Oyp+mZmR3Tono8CrhrFXWJtlG2" + }, + "coins": [ + "2000000000000000uakt" + ] + } ] - } - ] - }, - "validators": { - "add": [ - { - "name": "upgrade-tester", - "pubkey": { - "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "d0sS1j4EdrAkBkpFXb50lkibj7+Kwh9UtGPO5O35Pes=" - }, - "rates": { - "rate": "0.05", - "maxRate": "0.8", - "maxChangeRate": "0.1" - }, - "bonded": true, - "delegators": [ - { - "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", - "coins": [ - "1950000000000000uakt" - ] - } + }, + "validators": { + "add": [ + { + "name": "upgrade-tester-1", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "bsSoqsps8H653LIetc5vubX4xtsEXaAHB6818xbqz3s=" + }, + "rates": { + "rate": "0.05", + "maxRate": "0.8", + "maxChangeRate": "0.1" + }, + "bonded": true, + "delegators": [ + { + "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", + "coins": [ + "1500000000000000uakt" + ] + } + ] + }, + { + "name": "upgrade-tester-2", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "hmhw7ZVh2cnFjgq+/Y0KKTZt74bRr9VNIIbv37VVFu8=" + }, + "rates": { + "rate": "0.05", + "maxRate": "0.8", + "maxChangeRate": "0.1" + }, + "bonded": true, + "delegators": [ + { + "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", + "coins": [ + "220000000000000uakt" + ] + } + ] + }, + { + "name": "upgrade-tester-3", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "AnHnkIvUa/AmZd5aQglj8IOIUGYXoC57K8q+K4G7vmM=" + }, + "rates": { + "rate": "0.05", + "maxRate": "0.8", + "maxChangeRate": "0.1" + }, + "bonded": true, + "delegators": [ + { + "address": "akash1dge0lcc5rqxkw52rgav4q0fyhx7arcufmrkyww", + "coins": [ + "220000000000000uakt" + ] + } + ] + } ] - } - ] - }, - "gov": { - "voting_params": { - "voting_period": "60s" + }, + "gov": { + "voting_params": { + "voting_period": "60s" + } } - } } diff --git a/run.sh b/run.sh index 5324380..b5c68bd 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -e +set -o pipefail AKASH_MONIKER=node-tmp1 AKASH_STATESYNC_ENABLE=false @@ -61,7 +62,8 @@ data_path=$AKASH_HOME/data rm -rf "$AKASH_HOME/config" rm -rf "$data_path" -${AKASH} init "$AKASH_MONIKER" +${AKASH} init "$AKASH_MONIKER" > /dev/null 2>&1 + rm "$AKASH_HOME/config/genesis.json" GENESIS_URL="$(echo "$CHAIN_METADATA" | jq -r '.genesis.genesis_url? // .genesis?')" @@ -155,4 +157,4 @@ if [[ "$AKASH_STATESYNC_ENABLE" == true ]]; then fi echo "exporting state to [${GENESIS_ORIG}]" -${AKASH} export --home="${AKASH_HOME}" > "${GENESIS_ORIG}" +${AKASH} export --log_level=panic --home="${AKASH_HOME}" --to-file "${GENESIS_ORIG}"