-
Notifications
You must be signed in to change notification settings - Fork 951
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: output proposer settings #12181
Conversation
} | ||
|
||
// Client provides a collection of helper methods for calling the Eth Beacon Node API endpoints. | ||
type Client struct { |
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.
This is already namespaced by its package. Renaming it to BeaconClient
is not necessary and causes the package + type name to stutter.
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.
validateIsExecutionAddress
has a bug
api/client/client.go
Outdated
"github.com/pkg/errors" | ||
) | ||
|
||
// Client provides a collection of helper methods for calling the Eth Beacon Node API endpoints. |
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.
This is more generic and can be used outside of Beacon API. I would describe this type as an HTTP wrapper.
api/client/errors.go
Outdated
"github.com/pkg/errors" | ||
) | ||
|
||
// ErrMalformedHostname is used to indicate if a host name's format is incorrect while providing the port. |
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.
This sentence is unclear to me. Wouldn't ErrMalformedHostname is used to indicate if a host name's format is incorrect
be enough?
return nil | ||
} | ||
|
||
func validateIsExecutionAddress(input string) error { |
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.
This function is incorrect because 0xpppp...
with the correct length will pass. You should use bytesutil.IsHex
+ the length check. It would be nice to add some unit tests too.
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
cmd/prysmctl/validator/error.go
Outdated
import "fmt" | ||
|
||
// ErrNoFlag takes a flag name and returns a formatted error representing no flag was provided. | ||
func ErrNoFlag(flagName string) error { |
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 think it can be unexported
return nil | ||
} | ||
|
||
func ValidateIsExecutionAddress(input string) error { |
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 think it can be unexported.
* wip proposer settings * WIP validator client APIs * adding proposer settings output * adding unit tests * fixing linting * fixing deepsource issues * fixing e2e * fixing deep source issue * updating naming to not stutter * updating bazel * fixing linting error * reverting comment * adding builder settings * gaz * Update validator/client/validator.go Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com> * adding comments * adding some tests * gaz * Update cmd/prysmctl/validator/proposer_settings.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/prysmctl/validator/proposer_settings.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/prysmctl/validator/proposer_settings.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/prysmctl/validator/proposer_settings.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/options.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/options.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/errors.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/options.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/options.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/validator/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/prysmctl/validator/cmd.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/validator/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/validator/client.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update cmd/prysmctl/validator/proposer_settings.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update api/client/errors.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * fixing feedback * fixing unit test * addressign comments --------- Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
introduces a new command under prysmctl to query the validator client against the keymanagerAPIs and get the proposer settings ( namely the fee recipient) registered on the validator client. optionally you can output a proposer settings file which would be useful for webui migrations.
prysm currently requires
--web
flag against the validator client to enable its apis, in this process of startup an oauth token is created which is used in the--token
flag below.example command line:
example of a successful run: