Skip to content

Commit

Permalink
feat: testnetify v0.24.0 (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Sep 1, 2023
1 parent 6762e92 commit 54ff957
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tag> .cache/<tag>/genesis.json.tar.lz4
```
48 changes: 48 additions & 0 deletions config-v0.24.0.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export AKASH_NODE
export AKASH_CHAIN_ID
export AKASH_MINIMUM_GAS_PRICES="0.025uakt"
export POLKACHU_PEERS="[email protected]: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
Expand Down
15 changes: 15 additions & 0 deletions scripts/testnetify-render-config.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 54ff957

Please sign in to comment.