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

Querying delegation with non-existent validator address causes CLI to panic #1907

Closed
4 tasks
gin opened this issue Aug 2, 2018 · 4 comments
Closed
4 tasks

Comments

@gin
Copy link
Contributor

gin commented Aug 2, 2018

Summary of Bug

Querying delegation with non-existent validator address causes CLI to panic
Running on 0.23.1-23e3d5ac

Related to #1831 and #870

Steps to Reproduce

$ gaiacli stake delegation \
  --address-validator=cosmosaccaddr10yx3zn39va2rdvcn76cljlzn7zmlyecc7wdtvq \
  --address-delegator=cosmosaccaddr10yx3zn39va2rdvcn76cljlzn7zmlyecc7wdtvq


panic: UnmarshalBinary cannot decode empty bytes

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/x/stake/types.MustUnmarshalDelegation(0xc42082e5b0, 0xc4208b4040, 0x29, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/x/stake/types/delegation.go:40 +0x170
github.com/cosmos/cosmos-sdk/x/stake/client/cli.GetCmdQueryDelegation.func1(0xc42084a6c0, 0xc420858300, 0x0, 0x2, 0x0, 0x0)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/x/stake/client/cli/query.go:135 +0x2b4
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).execute(0xc42084a6c0, 0xc4208582c0, 0x2, 0x2, 0xc42084a6c0, 0xc4208582c0)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:698 +0x46d
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1656ce0, 0xde9b47, 0x24, 0xc4207f1898)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:783 +0x2e4
github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra.(*Command).Execute(0x1656ce0, 0xc420858180, 0x1656dc0)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/spf13/cobra/command.go:736 +0x2b
github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli.Executor.Execute(0x1656ce0, 0xf33510, 0x2, 0xc4207e7da0)
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/vendor/github.com/tendermint/tendermint/libs/cli/setup.go:89 +0x4e
main.main()
        /home/luigi/go/src/github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiacli/main.go:146 +0xb88

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@gin gin changed the title Querying delegation to non-existent validator address causes CLI to panic Querying delegation with non-existent validator address causes CLI to panic Aug 2, 2018
@alexanderbez
Copy link
Contributor

Reference: #1831. This will be fixed with whatever PR resolves that. This should be resolved shortly 👍

@rigelrozanski
Copy link
Contributor

thanks for submitting this bug report! :)

@alexanderbez
Copy link
Contributor

@alessio you're tackling this via alessio/1831-avoid-panic-on-unbond-begin? Ideally we should tackle all of these at once. i.e. not panic when the validator does not exist and the like.

@alessio
Copy link
Contributor

alessio commented Aug 13, 2018

@alexanderbez Yes, I'll handle this as well

chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this issue Mar 1, 2024
* skip run the test CI for markdown files

* remove skip from the codeql ci

* only ignore md files for codeql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants