-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(export-genesis): fix export genesis command for missing values #1800
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1800 +/- ##
=======================================
Coverage 43.13% 43.13%
=======================================
Files 15 15
Lines 1340 1340
=======================================
Hits 578 578
Misses 742 742
Partials 20 20 |
return nil, errors.New("atom denom not found") | ||
} | ||
atomMetaData.Name = "Cosmos Hub Atom" | ||
atomMetaData.Symbol = "ATOM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, when i query the node in public net, denom-metadata is already there.
{"metadatas":[{"description":"The native staking token of the Cosmos Hub.","denom_units":[{"denom":"uatom","exponent":0,"aliases":["microatom"]},{"denom":"matom","exponent":3,"aliases":["milliatom"]},{"denom":"atom","exponent":6,"aliases":[]}],"base":"uatom","display":"atom","name":"","symbol":""}],"pagination":{"next_key":null,"total":"1"}}
also, the denom is uatom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is different than the actual denom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can confirm the parameter through mainnet API (http://<rpc...>:1317/cosmos/bank/v1beta1/denoms_metadata
) . The parameter the SDK use as a key index is base
, and we are using uatom
:
$ curl http://<RPC_ADDRESS>:1317/cosmos/bank/v1beta1/denoms_metadata
{
"metadatas": [
{
"description": "The native staking token of the Cosmos Hub.",
"denom_units": [
{
"denom": "uatom",
"exponent": 0,
"aliases": [
"microatom"
]
},
{
"denom": "matom",
"exponent": 3,
"aliases": [
"milliatom"
]
},
{
"denom": "atom",
"exponent": 6,
"aliases": [
]
}
],
"base": "uatom",
"display": "atom",
"name": "",
"symbol": ""
}
],
"pagination": {
"next_key": null,
"total": "1"
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that Name and Symbol were left empty when the rest was populated. They have us listed as
Either we update the chain registry or update here so that name = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change "Name" to "Cosmos" or change registry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests are timing out but I checked them locally and they pass e2e : )
part of #1384
Description
Some values are missing in the genesis JSON when we are exporting it. So we can't validate the genesis after export.
Most of the values should be upgraded based on default genesis parameters, but maybe we should also add the
liquidityPoolRecords
parameter from the liquidity module