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

beacond comet show-validator is broken #2123

Open
chuck-bear opened this issue Nov 1, 2024 · 3 comments
Open

beacond comet show-validator is broken #2123

chuck-bear opened this issue Nov 1, 2024 · 3 comments
Assignees

Comments

@chuck-bear
Copy link
Collaborator

beacond comet show-validator is broken since maybe alpha.5.

How to reproduce?

In the main branch, run:

make build
build/bin/beacond comet show-validator

Output:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x48 pc=0x10162a2a0]

goroutine 1 [running]:
github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/cli.ShowValidatorCmd.func1(0x14000c4db08, {0x101819d30?, 0x4?, 0x101819bfc?})
	github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/cli/commands.go:161 +0x170
github.com/spf13/cobra.(*Command).execute(0x14000c4db08, {0x1036e62a0, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:985 +0x834
github.com/spf13/cobra.(*Command).ExecuteC(0x14000c4d208)
	github.com/spf13/[email protected]/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:1041
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/[email protected]/command.go:1034
github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/cmd.Execute(0x14000c4d208, {0x0, 0x0}, {0x14000292f60, 0x1d})
	github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/cmd/execute.go:56 +0x244
github.com/berachain/beacon-kit/mod/cli/pkg/commands.(*Root).Run(0x14000c39080?, {0x14000292f60?, 0x18?})
	github.com/berachain/beacon-kit/mod/cli/pkg/commands/root.go:92 +0x34
main.run()
	github.com/berachain/beacon-kit/beacond/cmd/main.go:86 +0x334
main.main()
	github.com/berachain/beacon-kit/beacond/cmd/main.go:91 +0x1c

What should be the output here?

{"type":"cometbft/PubKeyBls12_381","value":"ghfsdgfjsdfgjasghjsfahgjsdfghj"}

This is basically the pub_key part in the priv_validator_key.json.

The bet-cli has an example of "fix".

@abi87
Copy link
Collaborator

abi87 commented Nov 1, 2024

@chuck-bear thanks for filing the issue.
I don't know what the bet-cli is.
I don't have a solution yet, but I have been able to repro the issue and can provide some preliminary details.
Crash is due to nil pointer exception. We are not specifying a codec for the command at hand.
For context see difference among:

The missing bit is figuring out how to duly initialize the codec so that it can work with currently used types.

@abi87 abi87 self-assigned this Nov 1, 2024
@chuck-bear
Copy link
Collaborator Author

bet-cli is a branch here

@chuck-bear
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants