From 683259dbaa2ce515ce229bb18e9764e715fe0cf9 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Fri, 24 Jan 2025 09:59:06 +0800 Subject: [PATCH] udpate doc and flags --- book/src/help_vm.md | 3 ++- book/src/validator-manager-api.md | 16 ++++++++-------- validator_manager/src/exit_validators.rs | 8 +++++--- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 24fb88da53..347300f441 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -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) diff --git a/book/src/validator-manager-api.md b/book/src/validator-manager-api.md index deb155e368..e7a82a2ae4 100644 --- a/book/src/validator-manager-api.md +++ b/book/src/validator-manager-api.md @@ -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 @@ -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 @@ -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. diff --git a/validator_manager/src/exit_validators.rs b/validator_manager/src/exit_validators.rs index 781fffbd1e..adf8f569d6 100644 --- a/validator_manager/src/exit_validators.rs +++ b/validator_manager/src/exit_validators.rs @@ -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) @@ -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)