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

Pubkey info of app_state.auth.accounts is separated in genesis #515

Closed
4 tasks
zemyblue opened this issue Apr 27, 2022 · 1 comment · Fixed by #517
Closed
4 tasks

Pubkey info of app_state.auth.accounts is separated in genesis #515

zemyblue opened this issue Apr 27, 2022 · 1 comment · Fixed by #517
Assignees
Labels
A: bug Something isn't working

Comments

@zemyblue
Copy link
Member

Summary

Pubkey info of app_state.auth.accounts is separated in genesis like below.
This is not the common style of cosmos-sdk, also not lbm-sdk style.
So it need to be fixed.
Maybe I think this changes is made from bumping up cosmos-sdk 0.45.x PR.

Current format

       {
          "@type": "/lbm.auth.v1.BaseAccount",
          "address": "link1tfcuj70ssvwnxv9ryk4p9xywyq626asgfktaxv",
          "ed25519_pub_key": null,
          "secp256k1_pub_key": null,
          "secp256r1_pub_key": null,
          "multisig_pub_key": null,
          "account_number": "0",
          "sequence": "0"
        }

Right format

      {
          "@type": "/lbm.auth.v1.BaseAccount",
          "address": "link1tfcuj70ssvwnxv9ryk4p9xywyq626asgfktaxv",
          "pub_key": {
            "type": 0,
            "key": null
          },
          "sequence": "0"
        }

Problem Definition

Proposal


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@zemyblue zemyblue added the A: bug Something isn't working label Apr 27, 2022
@tnasu tnasu assigned tnasu and dudong2 and unassigned tnasu Apr 27, 2022
@zemyblue
Copy link
Member Author

The auth of genesis is cosmos-sdk's common account structure. And this is difference with lbm-sdk's account structure. Since the structure of genesis is the structure that must be maintained for a long time, it is necessary to maintain the existing structure without changing it like lbm-sdk. So the account structure of genesis is in cosmos-sdk format, but we need to convert it to BaseAccount structure of lbm-sdk when lbm start.
https://github.com/line/lbm-sdk/blob/77651c44aa683a8e64fe71016631c743e82cf11f/x/auth/types/auth.pb.go#L34-L42

In the past, there was a part to convert. It seems to have been corrected with the commit 0cde898. It needs to be corrected again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants