# Akash Testnet Upgrade Instructions 1. Verify you are currently running the correct version of Akash ``` akashd version --long name: akash server_name: akashd client_name: akashctl version: 0.8.3 commit: 11a6e4dfba545073f79732088735f93a5408995c build_tags: netgo,ledger,mainnet go: go version go1.15.5 linux/amd64 ``` 2. Stop your current akash process ``` sudo systemctl stop akash ``` or ``` akashd stop ``` 4. Export the `akashnet-2-testnet-1` state at height: 132913 ``` akashd export --for-zero-height --height 132913 > old_genesis_export.json ``` 5. Verify the SHA256 of the (sorted) exported genesis file: ``` $ jq -S -c -M '' old_genesis_export.json | shasum -a 256 ``` HASH: [TBD] 6. Install Akash@v0.10.0-rc2 ``` git clone https://github.com/ovrclk/akash cd akash git checkout v0.10.0-rc2 make install ``` 7. Verify you have the correct version: ``` name: akash server_name: akash version: 0.10.0-rc2 commit: 9390ece4602352325f711b085a3b23165ab88181 build_tags: netgo,ledger go: go version go1.15.5 linux/amd64 build_deps: - github.com/99designs/keyring@v1.1.6 - github.com/ChainSafe/go-schnorrkel@v0.0.0-20200405005733-88cbf1b4c40d - github.com/Workiva/go-datastructures@v1.0.52 - github.com/armon/go-metrics@v0.3.6 - github.com/avast/retry-go@v2.7.0+incompatible .... ``` NOTE: `akashd` and `akashctl` are merged into a single binary, `akash` now. 8. Migrate exported state from the current v0.8.3 version to the new v0.10.0-rc2 version (aka mainnet2 release candidate) with the genesis time 30 mins in the future ie. 1530UTC : ``` $ akash migrate v0.40 old_genesis_export.json --chain-id=akashnet-2-testnet-2 --genesis-time 2021-01-17T15:30:00Z > 040_migrated_genesis.json ``` 9. Migrate command adds a warning to the exported file. Remove the warning: ``` sed -i '/Warning/d' 040_migrated_genesis.json ``` 10. Update the evidence params as below: ``` sed -i 's/{"max_age_duration":"172800000000000","max_age_num_blocks":"100000"}/{"max_age_duration":"172800000000000","max_age_num_blocks":"100000","max_bytes":"1048576"}/g' 040_migrated_genesis.json ``` 11. Adding IBC and Akash parameters to the genesis file: ``` cat 040_migrated_genesis.json | jq '.app_state |= . + {"ibc":{"client_genesis":{"clients":[],"clients_consensus":[],"create_localhost":false},"connection_genesis":{"connections":[],"client_connection_paths":[]},"channel_genesis":{"channels":[],"acknowledgements":[],"commitments":[],"receipts":[],"send_sequences":[],"recv_sequences":[],"ack_sequences":[]}},"transfer":{"port_id":"transfer","denom_traces":[],"params":{"send_enabled":false,"receive_enabled":false}},"capability":{"index":"1","owners":[]}} + {"deployment":{"deployments":[],"params":{"deployment_min_deposit":{"denom":"uakt","amount":"5000000"}}},"market":{"orders":[],"leases":[],"params":{"bid_min_deposit":{"denom":"uakt","amount":"50000000"},"order_max_bids": 20}}} + {"provider":{"providers":[]}} + {"cert":{"certificates":[]}}' > new_genesis.json ``` 12. Verify the SHA256 of the final genesis JSON: ``` $ jq -S -c -M '' new_genesis.json | shasum -a 256 ``` 13. Creating a new home directory for `akash` ``` $ akash init <moniker> --chain-id akashnet-2-testnet-2 --overwrite ``` 14. Update the fast-sync option to `v2` in `config.toml` ``` version = "v2" ``` 15. Make the following changes in `app.toml` ``` # State sync snapshots allow other nodes to rapidly join the network without replaying historical # blocks, instead downloading and applying a snapshot of the application state at a given height. [state-sync] # snapshot-interval specifies the block interval at which local state sync snapshots are # taken (0 to disable). Must be a multiple of pruning-keep-every. snapshot-interval = 500 # snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). snapshot-keep-recent = 2 ``` 16. Copying the node and priv_val_key and new genesis to the new home directory ``` $ cp .akashd/config/node_key.json .akash/config/node_key.json $ cp .akashd/config/priv_validator_key.json .akash/config/priv_validator_key.json $ cp new_genesis.json .akash/config/genesis.json ``` 17. Add pers peer to `.akash/config/config.toml` ``` persistent_peers = "0cec5eebed869d8f5a9a7eaeb3c5133a2635cfff@161.35.124.66:26656,1f9bab3e3e870853fad59b432a1b3abe829bfaf8@165.227.144.223:26656" ``` 18. Update systemd Edit your systemd file and change Exec to use `akash` instead of `akashd` 19. Start your validator ``` akash start ``` 20. Migrate keys or recover using mnemonic `akashctl keys export <keyname>` `akash keys import <key_name> <key_file_json>` or `akash keys add <key-name> --recover`