From 54ff9577e43e0c0a19ece472cbd21f88b534a98f Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Fri, 1 Sep 2023 09:46:34 -0400 Subject: [PATCH] feat: testnetify v0.24.0 (#3) Signed-off-by: Artur Troian --- Makefile | 10 +++--- README.md | 6 ++++ config-v0.24.0.json | 48 +++++++++++++++++++++++++++++ run.sh | 2 +- scripts/testnetify-render-config.sh | 15 +++++++++ 5 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 config-v0.24.0.json create mode 100755 scripts/testnetify-render-config.sh diff --git a/Makefile b/Makefile index 75ec1f9..7eb2a1d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -BINARY_VERSION ?= v0.22.8 -CURRENT_UPGRADE ?= v0.22.0 +BINARY_VERSION ?= v0.24.2 +CURRENT_UPGRADE ?= v0.24.0 GENESIS_DEST_DIR ?= $(CACHE_DIR)/$(CURRENT_UPGRADE) GENESIS_DEST := $(GENESIS_DEST_DIR)/genesis.json GENESIS_ORIG ?= $(GENESIS_DEST_DIR)/genesis.orig.json @@ -44,15 +44,15 @@ $(GENESIS_DEST_DIR): testnetify: $(AKASH) $(GENESIS_DEST_DIR) $(AKASH) debug testnetify $(GENESIS_ORIG) $(GENESIS_DEST) -c config-$(CURRENT_UPGRADE).json -archive: testnetify - tar cvf - -C $(GENESIS_DEST_DIR) $(GENESIS_ORIG) | lz4 -f - $(LZ4_ARCHIVE) +archive:# testnetify + (cd $(GENESIS_DEST_DIR); tar cvf - genesis.json | lz4 -f - $(LZ4_ARCHIVE)) .PHONY: clean clean: rm -rf $(CACHE_DIR) $(TESTNETIFY_CONFIG): $(GENESIS_BINARY) $(GOMPLATE) $(GENESIS_CONFIG_TEMPLATE) - $(ROOT_DIR)/script/testnetify-render-config.sh \ + $(ROOT_DIR)/scripts/testnetify-render-config.sh \ $(GENESIS_BINARY) \ $(KEY_NAME) \ config-$(UPGRADE_TO).tmpl.json \ diff --git a/README.md b/README.md index 75fef5e..f468b64 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,9 @@ Reqs: 2 CPU, 16 GiB RAM, 20 GiB storage ## Next steps If Github API allows, we can probably even automate the GH runner deployment & registration. + +## Manual upload + +```shell +gh release upload .cache//genesis.json.tar.lz4 +``` diff --git a/config-v0.24.0.json b/config-v0.24.0.json new file mode 100644 index 0000000..da937dc --- /dev/null +++ b/config-v0.24.0.json @@ -0,0 +1,48 @@ +{ + "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" + ] + } + ] + } + ] + }, + "gov": { + "voting_params": { + "voting_period": "60s" + } + } +} + diff --git a/run.sh b/run.sh index 4c0b0a1..5324380 100755 --- a/run.sh +++ b/run.sh @@ -132,7 +132,7 @@ export AKASH_NODE export AKASH_CHAIN_ID export AKASH_MINIMUM_GAS_PRICES="0.025uakt" export POLKACHU_PEERS="d1e47b071859497089c944dc082e920403484c1a@65.108.128.201:12856" -export AKASH_P2P_PERSISTENT_PEERS="$POLKACHU_PEERS,$MAINNET_PEERS" +export AKASH_P2P_PERSISTENT_PEERS="${POLKACHU_PEERS},${MAINNET_PEERS}" export AKASH_STATESYNC_ENABLE export AKASH_STATESYNC_RPC_SERVERS=https://rpc.akashnet.net:443,https://rpc.akashnet.net:443 export AKASH_STATESYNC_RPC_SERVERS=https://akash-rpc.polkachu.com:443,https://akash-rpc.polkachu.com:443 diff --git a/scripts/testnetify-render-config.sh b/scripts/testnetify-render-config.sh new file mode 100755 index 0000000..e7ecfc0 --- /dev/null +++ b/scripts/testnetify-render-config.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +akash=$1 +key=$2 +template=$3 +result=$4 + +ACCOUNT_ADDRESS=$($akash keys show "$key" -a) \ +ACCOUNT_PUBKEY=$($akash keys show "$key" -p) \ +VALIDATOR_PUBKEY=$($akash tendermint show-validator) \ + gomplate \ + -d 'account_address=env:///ACCOUNT_ADDRESS' \ + -d 'account_pubkey=env:///ACCOUNT_PUBKEY' \ + -d 'validator_pubkey=env:///VALIDATOR_PUBKEY' \ + -f "$template" | jq > "$result"