Skip to content
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

Returned denom-metadata does not match genesis #139

Open
mdyring opened this issue Sep 20, 2021 · 3 comments
Open

Returned denom-metadata does not match genesis #139

mdyring opened this issue Sep 20, 2021 · 3 comments
Assignees

Comments

@mdyring
Copy link
Contributor

mdyring commented Sep 20, 2021

Returned denom-metadata is not as expected:

% emd q bank denom-metadata                                                                                                                                                                                      metadatas:
- base: echf
  denom_units:
  - aliases: []
    denom: echf
    exponent: 6
  description: ""
  display: ""
- base: edkk
  denom_units:
  - aliases: []
    denom: edkk
    exponent: 6
  description: ""
  display: ""
- base: eeur
  denom_units:
  - aliases: []
    denom: eeur
    exponent: 6
  description: ""
  display: ""
- base: enok
  denom_units:
  - aliases: []
    denom: enok
    exponent: 6
  description: ""
  display: ""
- base: esek
  denom_units:
  - aliases: []
    denom: esek
    exponent: 6
  description: ""
  display: ""
- base: ungm
  denom_units:
  - aliases: []
    denom: ungm
    exponent: 0
  - aliases: []
    denom: ngm
    exponent: 6
  description: e-Money NGM staking token
  display: NGM

Above was ran against lilmermaid-16 where the genesis.json contains more information.

@blewater
Copy link
Contributor

blewater commented Sep 20, 2021

Consistent with https://lilmermaid.validator.network/api//cosmos/bank/v1beta1/denoms_metadata
So the display and description are missing from the SDK bank API response? We should check with the SDK whether raising an issue to the SDK team is warranted

{
  "metadatas": [
    {
      "description": "",
      "denom_units": [
        {
          "denom": "echf",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "echf",
      "display": ""
    },
    {
      "description": "",
      "denom_units": [
        {
          "denom": "edkk",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "edkk",
      "display": ""
    },
    {
      "description": "",
      "denom_units": [
        {
          "denom": "eeur",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "eeur",
      "display": ""
    },
    {
      "description": "",
      "denom_units": [
        {
          "denom": "enok",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "enok",
      "display": ""
    },
    {
      "description": "",
      "denom_units": [
        {
          "denom": "esek",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "esek",
      "display": ""
    },
    {
      "description": "e-Money NGM staking token",
      "denom_units": [
        {
          "denom": "ungm",
          "exponent": 0,
          "aliases": []
        },
        {
          "denom": "ngm",
          "exponent": 6,
          "aliases": []
        }
      ],
      "base": "ungm",
      "display": "NGM"
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "6"
  }
}

@blewater
Copy link
Contributor

blewater commented Sep 22, 2021

No idea as to what went wrong with the missing Display, Description values.

I copied metadata from https://github.com/e-money/networks/blob/master/lilmermaid-16/genesis.json for our local testnet
in branch 139-metadata
and build/emd q bank denom-metadata --node tcp://localhost:26657 --chain-id localnet_reuse | jq returns the metadata as expected.

when we feel this is a priority, an option is to add an authority API for updating the denomination meta-data.

@haasted
Copy link
Collaborator

haasted commented Sep 23, 2021

I've investigated the issue, and the metadata is loaded and stored correctly by the bank module.

Unfortunately, the genesis initialization of the issuer module subsequently overwrites the data in the bank keeper when issuers a loaded from genesis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants