Closed uditvira closed 2 years ago
@alexanderbez you helped confirm this issue, is there a summary of what needs to be fixed in a future release to address the issue?
Yeah just to confirm this would be in Rho...we'd need to add two lines I think in SetUpgradeHandler
banktypes.DefaultGenesisState().DenomMetadata[0].Name = "Cosmos Hub Atom"
banktypes.DefaultGenesisState().DenomMetadata[0].Symbol = "ATOM"
hi, here is the fix for export to stdout, not stderr. https://github.com/cosmos/cosmos-sdk/pull/11844
@uditvira, can you please check the beginning of the genesis.json, if the JSON looks consistent or if there are any logs?
Can you also try it to export the JSON?
gaiad export --for-zero-height --height=9961097 2> mainnet-genesis.json
I found two bugs regarding the export
and validate-genesis
commands.
validate-genesis
will work:{
"app_state": {
"authz": {},
"packetfowardmiddleware": {
"params": {
"fee_percentage": "0.000000000000000000"
}
},
"interchainaccounts": {
"host_genesis_state": {
"port": "icahost"
}
},
"liquidity": {
"params": {
"pool_types": [
{
"id": 1,
"name": "StandardLiquidityPool",
"min_reserve_coin_num": 2,
"max_reserve_coin_num": 2,
"description": "Standard liquidity pool with pool price function X/Y, ESPM constraint, and two kinds of reserve coins"
}
],
"min_init_deposit_amount": "1000000",
"init_pool_coin_mint_amount": "1000000",
"max_reserve_coin_amount": "0",
"pool_creation_fee": [
{
"denom": "stake",
"amount": "40000000"
}
],
"swap_fee_rate": "0.003000000000000000",
"withdraw_fee_rate": "0.000000000000000000",
"max_order_amount_ratio": "0.100000000000000000",
"unit_batch_height": 1,
"circuit_breaker_enabled": false
},
"pool_records": []
},
"bank": {
"denom_metadata": [
{
"name": "Cosmos Hub Atom",
"symbol": "ATOM"
}
]
},
"ibc": {
"connection_genesis": {
"params": {
"max_expected_time_per_block": 30000000000
}
}
}
}
}
think we just need to hard code our bank metadata in our initgenesis or export genesis for gaia https://docs.cosmos.network/main/architecture/adr-024-coin-metadata.html
Summary of Bug
If you use
gaiad validate-genesis
to validate an exported genesis from the Cosmos Hub mainnet, you get the following error:This was reproduced by @ASoTNetworks
Version
I've reproduced this with gaiad 6.00 and 6.0.4
Steps to Reproduce
gaiad --for-zero-height --height=9961097 &> mainnet-genesis.json
(Notice I need to use&>
and not>
to dump contents into a file, because gaiad is writing output to stderr and not stdout. This is an unrelated issue)gaiad validate-genesis mainnet-genesis.json
For Admin Use