Skip to content

Commit

Permalink
udpate doc and flags
Browse files Browse the repository at this point in the history
  • Loading branch information
chong-he committed Jan 24, 2025
1 parent 4fb9f53 commit 683259d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion book/src/help_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Commands:
API.
exit
Exits one or more validators using the HTTP API. It can also be used
to generate voluntary exit message for a particular future epoch.
to generate a presign voluntary exit message for a particular future
epoch.
help
Print this message or the help of the given subcommand(s)
Expand Down
16 changes: 8 additions & 8 deletions book/src/validator-manager-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Example:
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4,0xa262dae3dcd2b2e280af534effa16bedb27c06f2959e114d53bd2a248ca324a018dc73179899a066149471a94a1bc92f --beacon-node http://localhost:5052
```

If successful, the following message will be returned:
If successful, the following log will be returned:

```text
Successfully validated and published voluntary exit for validator 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4
Expand All @@ -34,21 +34,21 @@ lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --v

To check the voluntary exit status, refer to [the list command](./validator-manager-api.md#list).

The following command will only generate the voluntary exit message and save it to a file named `{validator_pubkey}.json`. It will not publish the message to the network, i.e., there will be no voluntary exit.
The following command will only generate a presign voluntary exit message and save it to a file named `{validator_pubkey}.json`. It **will not** publish the voluntary exit to the network.

To generate the exit message and save it to a file, use the flag `--signature`:
To generate a presign exit message and save it to a file, use the flag `--presign`:

```bash
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --signature
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --presign
```

To generate the exit message for a particular (future) epoch, use the flag `--exit-epoch`:
To generate a presign exit message for a particular (future) epoch, use the flag `--exit-epoch`:

```bash
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --signature --exit-epoch 1234567
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --presign --exit-epoch 1234567
```

The generated exit message will only be valid at or after the specified exit-epoch, in this case, epoch 1234567.
The generated presign exit message will only be valid at or after the specified exit-epoch, in this case, epoch 1234567.

## Delete

Expand Down Expand Up @@ -98,7 +98,7 @@ The `list` command can also be used to check the voluntary exit status of valida
lighthouse vm list --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8de7ec501d574152f52a962bf588573df2fc3563fd0c6077651208ed20f24f3d8572425706b343117b48bdca56808416 --beacon-node http://localhost:5052
```

If the validator voluntary exit has been accepted by the chain, the following message will be returned:
If the validator voluntary exit has been accepted by the chain, the following log will be returned:

```text
Voluntary exit for validator 0x8de7ec501d574152f52a962bf588573df2fc3563fd0c6077651208ed20f24f3d8572425706b343117b48bdca56808416 has been accepted into the beacon chain, but not yet finalized. Finalization may take several minutes or longer. Before finalization there is a low probability that the exit may be reverted.
Expand Down
8 changes: 5 additions & 3 deletions validator_manager/src/exit_validators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn cli_app() -> Command {
Command::new(CMD)
.about(
"Exits one or more validators using the HTTP API. It can \
also be used to generate voluntary exit message for a particular future epoch.",
also be used to generate a presign voluntary exit message for a particular future epoch.",
)
.arg(
Arg::new(BEACON_URL_FLAG)
Expand Down Expand Up @@ -71,11 +71,13 @@ pub fn cli_app() -> Command {
.value_name("EPOCH")
.help(
"Provide the minimum epoch for processing voluntary exit. \
This flag is typically used in combination with `--presign` to \
This flag is required to be used in combination with `--presign` to \
save the voluntary exit presign to a file for future use.",
)
.action(ArgAction::Set)
.display_order(0),
.display_order(0)
.requires(PRESIGN_FLAG)
.conflicts_with(BEACON_URL_FLAG),
)
.arg(
Arg::new(PRESIGN_FLAG)
Expand Down

0 comments on commit 683259d

Please sign in to comment.