Skip to content

Commit

Permalink
feat: testnetify 3 validators (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Sep 12, 2023
1 parent 54ff957 commit 86539e0
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 46 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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
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
Expand Down Expand Up @@ -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
Expand Down
126 changes: 84 additions & 42 deletions config-v0.24.0.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}

6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -e
set -o pipefail

AKASH_MONIKER=node-tmp1
AKASH_STATESYNC_ENABLE=false
Expand Down Expand Up @@ -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?')"
Expand Down Expand Up @@ -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}"

0 comments on commit 86539e0

Please sign in to comment.