hdac-io / friday

Development repository for friday mainnet
Apache License 2.0
2 stars 2 forks source link

Runtime error in querying validator set #100

Open psy2848048 opened 4 years ago

psy2848048 commented 4 years ago

How to reproduce

Run clif query tendermint-validator-set

Environment

Chain Monday-0007 of Friday release v0.7.0

Reporter

@slee208 (Engenius) & @liangzhiyuan (hashquark) from Discord

Additional info

Stack trace

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xc9bdb5]

goroutine 1 [running]:
github.com/hdac-io/tendermint/lite/proxy.GetCertifiedCommit(0x363c5, 0x140e400, 0xc0001198f0, 0x0, 0x0, 0xa, 0xc00022ca80, 0xedd860, 0xc0002401a0)
    /home/shawnjzlee/.gvm/pkgsets/go1.14/global/pkg/mod/github.com/hdac-io/tendermint@v0.0.0-20200102054348-9a58be0e600b/lite/proxy/query.go:140 +0x105
github.com/hdac-io/friday/client/context.CLIContext.Verify(0xc000187730, 0x140e400, 0xc0001198f0, 0x0, 0x0, 0x13d7f40, 0xc000010018, 0x109fe5e, 0x4, 0x0, ...)
    /home/shawnjzlee/Desktop/friday/client/context/query.go:116 +0x66
github.com/hdac-io/friday/client/rpc.GetValidators(0xc000187730, 0x140e400, 0xc0001198f0, 0x0, 0x0, 0x13d7f40, 0xc000010018, 0x109fe5e, 0x4, 0x0, ...)
    /home/shawnjzlee/Desktop/friday/client/rpc/validators.go:130 +0x33c
github.com/hdac-io/friday/client/rpc.ValidatorCommand.func1(0xc000b23b80, 0x1ddde40, 0x0, 0x0, 0x0, 0x0)
    /home/shawnjzlee/Desktop/friday/client/rpc/validators.go:48 +0xf5
github.com/spf13/cobra.(*Command).execute(0xc000b23b80, 0x1ddde40, 0x0, 0x0, 0xc000b23b80, 0x1ddde40)
    /home/shawnjzlee/.gvm/pkgsets/go1.14/global/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001ae280, 0x89e770, 0xc0001ae280, 0x109ee63)
    /home/shawnjzlee/.gvm/pkgsets/go1.14/global/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
    /home/shawnjzlee/.gvm/pkgsets/go1.14/global/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/hdac-io/tendermint/libs/cli.Executor.Execute(0xc0001ae280, 0x1299328, 0x2, 0xc000b25580)
    /home/shawnjzlee/.gvm/pkgsets/go1.14/global/pkg/mod/github.com/hdac-io/tendermint@v0.0.0-20200102054348-9a58be0e600b/libs/cli/setup.go:89 +0x3c
main.main()
    /home/shawnjzlee/Desktop/friday/cmd/clif/main.go:79 +0x613

Didn't occur in clif of v0.8.0 candidate

wlsaud619 commented 4 years ago

This can be solved by using the --trust-node flag.