-
Notifications
You must be signed in to change notification settings - Fork 740
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
Validator manager commands for the Keymanager APIs #6261
Open
chong-he
wants to merge
113
commits into
sigp:unstable
Choose a base branch
from
chong-he:vm
base: unstable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
0fa74cd
Validator manager commands for standard key-manager APIs
pahor167 f6d11bc
Merge latest unstable
chong-he 83967a5
Fix Some in lib.rs
chong-he bf6e3b7
Replace Arg::with_name with Arg::new
chong-he 1337a2f
Update takes_value
chong-he 1082426
Remove clap::App
chong-he 526603c
Change App to Command
chong-he 0075fdd
Add command in use
chong-he 6803092
Remove generic in ArgMatches
chong-he 1630435
Fix matches.get_flag
chong-he 1c8b3b3
Fixes
chong-he b80d16e
fix error handling
chong-he 509d590
SetTrue in import
chong-he bb283a2
Fix
chong-he e1452f8
Fix builder-proposal flag (will delete the flag later)
chong-he e0918a8
Minor fix
chong-he 97afc09
Fix prefer_builder_proposals
chong-he 2212dd4
Remove unwrap
chong-he 47382a7
Error handling from Michael
chong-he 5f56ba5
Add cli help text
chong-he c6c8954
Use None in import to simplify
chong-he 82d578f
Delete unwrap
chong-he d71cca9
Revert flags option
chong-he 98ac81b
Simplify help command code
chong-he ad7cb23
Remove flag header in move
chong-he 2f9f0dd
Merge remote-tracking branch 'origin/unstable' into pahor/validator-m…
michaelsproul 6069c94
Add log in VC when keystore is deleted
chong-he ff0c841
Delete duplicated log when validator does not exist
chong-he 0e4e9a4
Simplify log code
chong-he eadec07
Rename remove to delete
chong-he 97196cc
cargo-fmt
chong-he 6fb9f83
Try to remove a function
chong-he bed168c
make-cli
chong-he a55cc5b
Error handling
chong-he b5b9537
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he 100ee22
Update CLI hel text
chong-he 610f971
make-cli
chong-he 64a4f67
Fix checks
chong-he 9ba60be
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he e079eb4
Try to fix check errors
chong-he 2228463
Fix test
chong-he e101583
Remove changes
chong-he 617273f
Update flag name
chong-he 369bae5
CLI display order
chong-he c24e779
Move builde_proposals flag
chong-he 3e6c8cb
Add doc
chong-he 7a21d40
mdlint
chong-he 794aa39
Update validator_manager/src/list_validators.rs
chong-he ce7e573
Delete empty line
chong-he 5f0c4ee
Fix list
chong-he a874551
Simplify delete
chong-he 4726501
Add support to delete more validators
chong-he 062613e
Fix test
chong-he 7d727e9
Rename response
chong-he 3df5a37
Add (s)
chong-he f4ecc33
Add test to delete multiple validators
chong-he a0f8599
Book and cli
chong-he 894d8f9
Make cli
chong-he f6f6d16
Only log when keystore is deleted
chong-he d8b6142
Revise deletion log
chong-he 9ad2e64
Add validator pubkey to error message
chong-he da6a100
Merge import
chong-he 2d7858c
Thank you Mac
chong-he 5de071e
Test
chong-he 061f0d8
Add flags
chong-he 184e28f
Error handling for password
chong-he 7f2152b
make cli
chong-he 7d978ac
Merge remote-tracking branch 'origin/unstable' into vm
chong-he 65e93c8
make cli
chong-he b62bc49
Fix test
chong-he a2d9e29
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he 9daff6f
Fix test
chong-he 3f97acd
vm test
chong-he 795e1df
Debug trait thank you Michael
chong-he 8fba16a
Fix test
chong-he 8a3aa07
Merge branch 'unstable' into vm
chong-he 10883a5
test
chong-he 858dac5
testing
chong-he 0e37ad8
Combine import validator(s)
chong-he aeb91c7
make cli
chong-he e81dfa3
Add requires
chong-he 4c6ae73
Update book
chong-he 779eca1
mdlint
chong-he 3e97c75
Only show import log when import is successful
chong-he df599ca
delete testing
chong-he 895c6cd
Test for standard format
chong-he 8f84d4a
Test standard format
chong-he 4afb92e
Test
chong-he 5783614
fix builder_proposals flag
chong-he 67a7d0a
Fix test for standard format
chong-he 7d9346a
Add requires
chong-he b71d0e4
Fix vm test
chong-he 25bdf3c
make cli
chong-he 0d368cb
Remove flag header
chong-he 64b60bf
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he 00a65bb
make cli
chong-he 218559e
Delete space
chong-he 13a4cce
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he 7ef7f3a
Merge branch 'unstable' into vm
chong-he cfdfc90
Rename delete_validator to delete_validators
chong-he a6ee551
Rearrange
chong-he 0e049c3
Remove pub in run function
chong-he d2c8e82
Fix grammar
chong-he 224f401
Apply suggestions from code review
chong-he e5a618c
Remove description
chong-he 87352fa
Merge branch 'vm' of https://github.com/chong-he/lighthouse into vm
chong-he fa831ce
Close bracket
chong-he 3e431e0
make cli
chong-he c652724
Revise list code and test
chong-he aa110d5
Revise import flag
chong-he f1c0b5f
make cli
chong-he dd697ae
Comment out test
chong-he ebd0725
Update vm test
chong-he File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Managing Validators | ||
|
||
The `lighthouse validator-manager` uses the [Keymanager API](https://ethereum.github.io/keymanager-APIs/#/) to list, import and delete keystores via the HTTP API. This requires the validator client running with the flag `--http`. | ||
|
||
## Delete | ||
|
||
The `delete` command deletes one or more validators from the validator client. It will also modify the `validator_definitions.yml` file automatically so there is no manual action required from the user after the delete. To `delete`: | ||
|
||
```bash | ||
lighthouse vm delete --vc-token <API-TOKEN-PATH> --validators pubkey1,pubkey2 | ||
``` | ||
|
||
Example: | ||
|
||
```bash | ||
lighthouse vm delete --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4,0xa262dae3dcd2b2e280af534effa16bedb27c06f2959e114d53bd2a248ca324a018dc73179899a066149471a94a1bc92f | ||
``` | ||
|
||
## Import | ||
|
||
The `import` command imports validator keystores generated by the staking-deposit-cli/ethstaker-deposit-cli. To import a validator keystore: | ||
|
||
```bash | ||
lighthouse vm import --vc-token <API-TOKEN-PATH> --keystore-file /path/to/json --password keystore_password | ||
``` | ||
|
||
Example: | ||
|
||
``` | ||
lighthouse vm import --standard-format --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators-file keystore.json --password keystore_password | ||
``` | ||
|
||
## List | ||
|
||
To list the validators running on the validator client: | ||
|
||
```bash | ||
lighthouse vm list --vc-token ~/.lighthouse/mainnet/validators/api-token.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 test is failing: https://github.com/sigp/lighthouse/actions/runs/11404357702/job/31733366200
I found that this is because the
.required(true)
for thevalidators-file
flag is removed: https://github.com/sigp/lighthouse/pull/6261/files#diff-e54fe894fb02bdd0c2175fbb4d7cc6d04fa7c8b460b30e9512edb814f569f97eL41(as it now requires either
--validators-file
or--keystore-file
)The test caught it because now that the hard requirement for
--validators-file
is dropped, so missing the validators file flag will not return afalse
from the test. I change this test to testing that if both flags are used, then the test fails.Not sure if this is good?