akash validate-genesis fails after 0.16.3 upgrade
~/.akash/config$ akash validate-genesis
and get the following => Error: error validating genesis file /home/ubuntu/.akash/config/genesis.json: failed to unmarshal authz genesis state: EOF
Ref. https://discord.com/channels/747885925232672829/751246770885099533/969096619255545896
and in my case as well:
# akash validate-genesis
Error: error validating genesis file /root/.akash/config/genesis.json: failed to unmarshal authz genesis state: EOF
# akash version
v0.16.3
# sha256sum /root/.akash/config/genesis.json
e15a7a57f856f602a8ebce131df453db047b3d4d3abaa00b44b821384b9c9726 /root/.akash/config/genesis.json
I got this
$ ~/akash_0.16.3_linux_amd64/akash validate-genesis ./genesis.json.1
Error: error validating genesis file ./genesis.json.1: MaxExpectedTimePerBlock cannot be zero
it's probably a new field that isn't in our genesis.
is it on a freshly generated genesis via akash init or current mainnet?
Interesting, the very first time I & Scott were getting a "failed to unmarshal inflation ..." error:
Error: error validating genesis file /root/.akash/config/genesis.json: failed to unmarshal inflation genesis state: EOF
is it on a freshly generated genesis via
akash initor current mainnet?
current mainnet. sha256 of the genesis in the OP above (e15a7a57f856f602a8ebce131df453db047b3d4d3abaa00b44b821384b9c9726)
Haven't checked the freshly generated genesis.
Update on 12 August 2022
The freshly generated genesis checks without issues as it contains authz & inflation there:
$ cat ~/.akash/config/genesis.json|jq | jq -r '.app_state.authz'
{
"authorization": []
}
$ cat ~/.akash/config/genesis.json|jq | jq -r '.app_state.inflation'
{
"params": {
"inflation_decay_factor": "2.000000000000000000",
"initial_inflation": "100.000000000000000000",
"variance": "0.050000000000000000"
}
}
$ akash validate-genesis
File at /home/arno/.akash/config/genesis.json is a valid genesis file
Ours mainnet one - does not:
$ cat ~/.akash/config/genesis.json|jq | jq -r '.app_state.inflation'
null
$ cat ~/.akash/config/genesis.json|jq | jq -r '.app_state.authz'
null
(just guessing)
Could it be that genesis.json needs to be exported so to contain the authz & inflation there since https://github.com/ovrclk/akash/blob/v0.16.3/app/app.go#L496 ?
Similarly to like we've been hard forking before when were getting from 0.8.3 -> 0.10.1
Update on 12 August 2022
FWIW, when syncing the entire blockchain starting with height=0, akash 0.10.1 -> 0.14.1 -> 0.16.3, the new modules (authz, inflation) are getting added:
10:56PM INF ABCI Handshake App Info hash="���\rSZld��W���&�ת��q��'��J�\x0e���" height=5629649 module=consensus protocol-version=0 software-version=0.16.3
10:56PM INF ABCI Replay Blocks appHeight=5629649 module=consensus stateHeight=5629649 storeHeight=5629650
10:56PM INF Replay last block using real app module=consensus
10:56PM INF applying upgrade "akash_v0.15.0_cosmos_v0.44.x" at height: 5629650
10:56PM INF migrating module audit from version 1 to version 2
10:56PM INF adding a new module: authz
10:56PM INF migrating module bank from version 1 to version 2
10:58PM INF migrating module cert from version 1 to version 2
10:58PM INF migrating module deployment from version 1 to version 2
10:58PM INF migrating module distribution from version 1 to version 2
11:02PM INF migrating module escrow from version 1 to version 2
11:04PM INF migrating module gov from version 1 to version 2
11:04PM INF migrating module ibc from version 1 to version 2
11:05PM INF adding a new module: inflation
11:05PM INF migrating module market from version 1 to version 2
11:06PM INF migrating module provider from version 1 to version 2
11:06PM INF migrating module slashing from version 1 to version 2
11:12PM INF migrating module staking from version 1 to version 2
11:13PM INF migrating module auth from version 1 to version 2
11:13PM INF minted coins from module account amount=8084199uakt from=mint module=x/bank
11:13PM INF executed block height=5629650 module=consensus num_invalid_txs=0 num_valid_txs=0