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

Error while listing keys using v0.46.x #12093

Closed
4 tasks
kaustubhkapatral opened this issue May 31, 2022 · 3 comments · Fixed by #12122
Closed
4 tasks

Error while listing keys using v0.46.x #12093

kaustubhkapatral opened this issue May 31, 2022 · 3 comments · Fixed by #12122
Assignees

Comments

@kaustubhkapatral
Copy link
Contributor

Summary of Bug

If account keys are created using v0.45.4 and v0.46.x is used to list out the existing it gives a migrate error.

simd keys list

migrate err for key config: config.info: key not found
migrate err for key data: data.info: key not found
migrate err for key keyhash: keyhash.info: key not found
Enter keyring passphrase:
Successfully migrated key test.info.
Error: read /root/.simapp/config: is a directory
Usage:
  simd keys list [flags]

Flags:
  -h, --help         help for list
  -n, --list-names   List names only

Global Flags:
      --home string              The application home directory (default "/root/.simapp")
      --keyring-backend string   Select keyring's backend (os|file|test) (default "os")
      --keyring-dir string       The client Keyring directory; if omitted, the default 'home' directory will be used
      --log_format string        The logging format (json|plain) (default "plain")
      --log_level string         The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --output string            Output format (text|json) (default "text")
      --trace                    print out full stack trace on errors

If --keyring-backend test is provided as argument while creating using v0.45.4 then we get no error while listing it out using v0.46.x.

Version

release/v0.46.x

Steps to Reproduce

  • Build a binary using v0.45.4 tag.
  • Create a test account keys using simd keys add test
  • Build a binary using release/v0.46.x branch.
  • List the keys present in the keyring using simd keys list

Note: This error could not be reproduced on local system. It could only be produced on servers.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

I believe you need to run keys migrate first :)

@kaustubhkapatral
Copy link
Contributor Author

@alexanderbez I did run keys migrate first. This is the whole process trace

root@95746-keyring-test:~# simd version
0.45.4
root@95746-keyring-test:~# simd keys add test
Enter keyring passphrase:

- name: test
  type: local
  address: cosmos1el8240tr9vsan5kxccjepu3mdtzs7qxw8vtqm5
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Art4Zj73xmx50mP41EPCPneq5VlJ8lJcbW268jpI4eqz"}'
  mnemonic: ""


**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

root@95746-keyring-test:~# cp ~/go/src/github.com/cosmos/cosmos-sdk/build/simd ~/go/bin/simd 
root@95746-keyring-test:~# simd version
0.46.0-rc1-4-gf3db7e079
root@95746-keyring-test:~# simd keys migrate
migrate err for key config: config.info: key not found
migrate err for key data: data.info: key not found
migrate err for key keyhash: keyhash.info: key not found
Enter keyring passphrase:
Successfully migrated key test.info.
Keys migration has been successfully executed.
root@95746-keyring-test:~# simd keys list
migrate err for key config: config.info: key not found
migrate err for key data: data.info: key not found
migrate err for key keyhash: keyhash.info: key not found
Enter keyring passphrase:
Error: read /root/.simapp/config: is a directory
Usage:
  simd keys list [flags]

Flags:
  -h, --help         help for list
  -n, --list-names   List names only

Global Flags:
      --home string              The application home directory (default "/root/.simapp")
      --keyring-backend string   Select keyring's backend (os|file|test) (default "os")
      --keyring-dir string       The client Keyring directory; if omitted, the default 'home' directory will be used
      --log_format string        The logging format (json|plain) (default "plain")
      --log_level string         The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --output string            Output format (text|json) (default "text")
      --trace                    print out full stack trace on errors


@alexanderbez
Copy link
Contributor

I see. Then I'm not too sure what the error is. @AmauryM do you know who has the most knowledge on the keyring?

@atheeshp atheeshp self-assigned this Jun 1, 2022
@amaury1093 amaury1093 moved this to 📝 Todo in Cosmos-SDK Jun 1, 2022
@amaury1093 amaury1093 moved this from 📝 Todo to 💪 In Progress in Cosmos-SDK Jun 1, 2022
@atheeshp atheeshp mentioned this issue Jun 2, 2022
19 tasks
@atheeshp atheeshp moved this from 💪 In Progress to 👀 Needs Review in Cosmos-SDK Jun 2, 2022
@mergify mergify bot closed this as completed in #12122 Jun 2, 2022
Repository owner moved this from 👀 Needs Review to 👏 Done in Cosmos-SDK Jun 2, 2022
mergify bot pushed a commit that referenced this issue Jun 2, 2022
## Description

Closes: #12093



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
mergify bot pushed a commit that referenced this issue Jun 2, 2022
## Description

Closes: #12093

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit 0b5687b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants