-
Notifications
You must be signed in to change notification settings - Fork 1k
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
prysmctl: validator exit #11515
prysmctl: validator exit #11515
Conversation
cmd/validator/accounts/backup.go
Outdated
@@ -16,7 +16,7 @@ import ( | |||
const backupPromptText = "Enter the directory where your backup.zip file will be written to" | |||
|
|||
func accountsBackup(c *cli.Context) error { | |||
w, km, err := walletWithKeymanager(c) | |||
w, km, err := walletWithKeymanager(c, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a bit weird to pass nil
into a function call like this, what is the purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree I was trying to think of a better way to clean this up but just had a hard time figuring out how I can pass the genesis validators root here.
at first, I had the node client abstracted away in the function. so that if web3signer was used it would make an API call to get the genesis information but I had a hard time unit testing it, but the more I think of it maybe I can just abstract the logic out into its own function, and not have the unit test run the connection...
I also tried doing something like walletWithKeymanager(c *cli.Context, conns ...*grpc.Connection)
but had a hard time mocking the genesis call. open for other suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using the connection i could also hardcode a map like potuz suggested and get it from the cli, but i was thinking other chains that use prysm like gnosis might want this capability too without having exclusive support
I see you trying to play with the capitalization of |
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This feature migrates the command to exit a validator to the prysmctl and is part of a greater effort to support message signing in the prysmctl.
Which issues(s) does this PR fix?
Fixes #11478
out of scope but related #11451
Other notes for review