-
Notifications
You must be signed in to change notification settings - Fork 90
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
cmd: add exit commands #2934
cmd: add exit commands #2934
Conversation
This PR adds exit-related commands under the `exit` subcommand: - `submit-partial-exit`, which signs and submit to an instance of Obol API a partial exit for a given DV in a given cluster lock - `broadcast`, which downloads a full exit from an instance of Obol API for a given validator if available, and broadcasts it to the configured beacon node - `active-validator-list`, which returns the list of validators which are `ACTIVE_ONGOING` contained in the specified cluster lock (useful for scripting). Moved `obolapi` mock implementation to `testutil/obolapimock` so other tests can use it. Added a few utility functions in `eth2util/keystore`, taken from `lido-dv-exit`: since it depends on Charon, we can migrate them.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2934 +/- ##
==========================================
- Coverage 54.16% 53.96% -0.21%
==========================================
Files 195 200 +5
Lines 27564 28100 +536
==========================================
+ Hits 14930 15164 +234
- Misses 10876 11134 +258
- Partials 1758 1802 +44 ☔ View full report in Codecov by Sentry. |
…and enr privkey paths
need to adapt `broadcast` to read from a static file
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.
Not all suggestions are musts. There might be some slight contradictions between them, use best judgement :)
"github.com/obolnetwork/charon/app/z" | ||
) | ||
|
||
func newListActiveValidatorsCmd(runFunc func(context.Context, exitConfig) error) *cobra.Command { |
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.
Should we consider not adding this if we intend to remove (move) it under the get
command?
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'd rather have it here for now, ops and support requested such function for a while now.
@@ -225,3 +240,86 @@ func checkDir(dir string) error { | |||
|
|||
return nil | |||
} | |||
|
|||
// KeysharesToValidatorPubkey maps each share in cl to the associated validator private key. | |||
// It returns an error if a keyshare does not appear in cl, or if there's a validator public key associated to no |
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.
// It returns an error if a keyshare does not appear in cl, or if there's a validator public key associated to no | |
// It returns an error if a keyshare does not appear in cl, or if there's a validator public key associated to no |
Will we get pushback if charon needs all partials private keys returned to it, to broadcast the exit of a subset of them? This looks like it needs the full clusters worth to work? Whereas technically a user might bring back only the online keys to a charon command to sign exits for?
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.
Hmm not really, this function maps a partial key share to its full validator pubkey by looking into the cluster lock, not by doing aggregation or any operation with the private key.
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Co-authored-by: Oisín Kyne <[email protected]>
Quality Gate passedIssues Measures |
Seems to me we fixed all wording issues and the code looks okay. Merging! 🎉 |
This PR adds exit-related commands under the
exit
subcommand:submit-partial-exit
, which signs and submit to an instance of Obol API a partial exit for a given DV in a given cluster lockbroadcast
, which downloads a full exit from an instance of Obol API for a given validator if available, and broadcasts it to the configured beacon nodeactive-validator-list
, which returns the list of validators which areACTIVE_ONGOING
contained in the specified cluster lock (useful for scripting).Moved
obolapi
mock implementation totestutil/obolapimock
so other tests can use it.Added a few utility functions in
eth2util/keystore
, taken fromlido-dv-exit
: since it depends on Charon, we can migrate them.category: feature
ticket: #2848
Closes #2848.