vega
vega copied to clipboard
[Bug]: `vega verify genesis` is broken
Problem encountered
Frontend use vegacapsule for end to end tests. The validator nodes in the test set fail to start up with an error in the genesis file. I have tried to use the vega
subcommand verify genesis
to ensure I have a working configuration (https://github.com/vegaprotocol/frontend-monorepo/blob/develop/vegacapsule/genesis.tmpl
is the template that vegacapsule template genesis.tmp
will generate a genesis json file from):
Inconsistent deprecated / required parameters
warn: app_state.network_parameters missing parameter `reward.staking.delegation.maxPayoutPerEpoch`, default value will be used `7000000000000000000000`
Adding this to the file:
"reward.staking.delegation.maxPayoutPerEpoch": "7000000000000000000000",
results in
error: appstate.network_parameters deprecated parameter `reward.staking.delegation.maxPayoutPerEpoch`
Testnet's genesis is invalid
✖ vega version
Vega CLI v0.73.3 (f76796a4a8c1f60650f35cf907a7d6ac492d7f97)
/tmp
❯ curl http://n00.testnet.vega.xyz:26657/genesis -s | jq -r '.result.genesis' > genesis.json
/tmp
❯ vega verify genesis genesis.json
genesis.json: NOT OK
error: unable to unmarshal app_state in genesis file, json: unknown field "total_supply"
error: one or more files are malformed or invalid
Mainnet genesis is invalid
✖ vega version
Vega CLI v0.73.3 (f76796a4a8c1f60650f35cf907a7d6ac492d7f97)
/tmp
❯ curl http://darling.network:26657/genesis -s | jq -r '.result.genesis' > genesis.json
/tmp
❯ vega verify genesis genesis.json
genesis.json: NOT OK
...
Observed behaviour
vega verify genesis
is impossible to pass without warnings or errors
Expected behaviour
-
vega verify genesis
can return a positive result for a genesis file exported from tendermint for the appropriate vega version (i.e. testnet is v0.73.2,vega
versionv0.73.2
returns valid for the genesis) -
reward.staking.delegation.maxPayoutPerEpoch
is either deprecated or missing, not both -
market.stake.target.scalingFactor
is either deprecated or missing, not both -
market.stake.target.timeWindow
is either deprecated or missing, not both
Steps to reproduce
1. Checkout and run this script: https://github.com/vegaprotocol/frontend-monorepo/blob/fix/e2e-test-update/vegacapsule/verify-genesis.sh
2. Observe the failures in the output
3. Edit `genesis.tmpl` to address the failures
4. Observe new errors on those fields you just added
Software version
v0.73.3
Failing test
No response
Jenkins run
No response
Configuration used
No response
Relevant log output
No response