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

[Bug]: v0.52 Init Lockup Account #23312

Open
1 task done
Senna46 opened this issue Jan 10, 2025 · 4 comments · May be fixed by #23397
Open
1 task done

[Bug]: v0.52 Init Lockup Account #23312

Senna46 opened this issue Jan 10, 2025 · 4 comments · May be fixed by #23397
Labels

Comments

@Senna46
Copy link

Senna46 commented Jan 10, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Genesis

  1. In README.md, incorrect type is shown. It should be written exactly as follows
    https://github.com/cosmos/cosmos-sdk/blob/main/x/accounts/README.md?plain=1#L550
      "init_account_msgs": [
        {
          "sender": "account_creator_address",
          "account_type": "lockup_account_type",
          "message": {
            "@type": "/cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount",
            "owner": "some_owner",
            "end_time": "2026-01-01T00:00:00Z",
            "start_time": "2025-01-01T00:00:00Z"
          },
          "funds": [
            {
              "denom": "stake",
              "amount": "1000"
            }
          ]
        }
  1. This message is executed in the genesis block. Therefore, the order of IntGenesis needs to be changed to auth, bank, and staking before accounts.
    https://github.com/cosmos/cosmos-sdk/blob/main/simapp/v2/app_config.go#L156

After Genesis

In CLI, there is no fund option. So, we cannot create funded lockup account
https://github.com/cosmos/cosmos-sdk/blob/main/x/accounts/cli/cli.go#L42

Cosmos SDK Version

0.52.0-rc1 and current main

How to reproduce?

Some issues appear when creating genesis.json and starting the chain.
I could be resolved by modifying genesis.json and changing the order of InitGenesis.

@Senna46 Senna46 added the T:Bug label Jan 10, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Jan 10, 2025
@Senna46
Copy link
Author

Senna46 commented Jan 10, 2025

There are several other places where v1 is missing from the type_url.

@julienrbrt
Copy link
Member

Hey! Would you like to submit a PR fixing those changes?

@Senna46
Copy link
Author

Senna46 commented Jan 10, 2025

If necessary, I can create a PR.

@Senna46 Senna46 linked a pull request Jan 15, 2025 that will close this issue
12 tasks
@Senna46
Copy link
Author

Senna46 commented Jan 15, 2025

I created a PR to fix these problems.

I don't think there is a query to get the lockup accounts owned, with the address as an argument.
If it really isn't there, I would like to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

2 participants