You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/src/validator_manager_api.md
+77Lines changed: 77 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,54 @@
2
2
3
3
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`. By default, the validator client HTTP address is `http://localhost:5062`. If a different IP address or port is used, add the flag `--vc-url http://IP:port_number` to the command below.
4
4
5
+
## Exit
6
+
7
+
The `exit` command exits one or more validators from the validator client. To `exit`:
8
+
9
+
> **Important note: Once the --beacon-node flag is used, it will publish the voluntary exit to the network. This action is irreversible.**
10
+
11
+
```bash
12
+
lighthouse vm exit --vc-token <API-TOKEN-PATH> --validators pubkey1,pubkey2 --beacon-node http://beacon-node-url:5052
13
+
```
14
+
15
+
Example:
16
+
17
+
```bash
18
+
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4,0xa262dae3dcd2b2e280af534effa16bedb27c06f2959e114d53bd2a248ca324a018dc73179899a066149471a94a1bc92f --beacon-node http://localhost:5052
19
+
```
20
+
21
+
If successful, the following log will be returned:
22
+
23
+
```text
24
+
Successfully validated and published voluntary exit for validator 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4
25
+
Successfully validated and published voluntary exit for validator
To exit all validators on the validator client, use the keyword `all`:
30
+
31
+
```bash
32
+
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --beacon-node http://localhost:5052
33
+
```
34
+
35
+
To check the voluntary exit status, refer to [the list command](./validator_manager_api.md#list).
36
+
37
+
The following command will only generate a presigned voluntary exit message and save it to a file named `{validator_pubkey}.json`. It **will not** publish the voluntary exit to the network.
38
+
39
+
To generate a presigned exit message and save it to a file, use the flag `--presign`:
40
+
41
+
```bash
42
+
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --presign
43
+
```
44
+
45
+
To generate a presigned exit message for a particular (future) epoch, use the flag `--exit-epoch`:
46
+
47
+
```bash
48
+
lighthouse vm exit --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all --presign --exit-epoch 1234567
49
+
```
50
+
51
+
The generated presigned exit message will only be valid at or after the specified exit-epoch, in this case, epoch 1234567.
52
+
5
53
## Delete
6
54
7
55
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`:
@@ -16,6 +64,12 @@ Example:
16
64
lighthouse vm delete --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8885c29b8f88ee9b9a37b480fd4384fed74bda33d85bc8171a904847e65688b6c9bb4362d6597fd30109fb2def6c3ae4,0xa262dae3dcd2b2e280af534effa16bedb27c06f2959e114d53bd2a248ca324a018dc73179899a066149471a94a1bc92f
17
65
```
18
66
67
+
To delete all validators on the validator client, use the keyword `all`:
68
+
69
+
```bash
70
+
lighthouse vm delete --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators all
71
+
```
72
+
19
73
## Import
20
74
21
75
The `import` command imports validator keystores generated by the `ethstaker-deposit-cli`. To import a validator keystore:
@@ -37,3 +91,26 @@ To list the validators running on the validator client:
37
91
```bash
38
92
lighthouse vm list --vc-token ~/.lighthouse/mainnet/validators/api-token.txt
39
93
```
94
+
95
+
The `list` command can also be used to check the voluntary exit status of validators. To do so, use both `--beacon-node` and `--validators` flags. The `--validators` flag accepts a comma-separated list of validator public keys, or the keyword `all` to check the voluntary exit status of all validators attached to the validator client.
96
+
97
+
```bash
98
+
lighthouse vm list --vc-token ~/.lighthouse/mainnet/validators/api-token.txt --validators 0x8de7ec501d574152f52a962bf588573df2fc3563fd0c6077651208ed20f24f3d8572425706b343117b48bdca56808416 --beacon-node http://localhost:5052
99
+
```
100
+
101
+
If the validator voluntary exit has been accepted by the chain, the following log will be returned:
102
+
103
+
```text
104
+
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.
105
+
Current epoch: 2, Exit epoch: 7, Withdrawable epoch: 263
106
+
Please keep your validator running till exit epoch
107
+
Exit epoch in approximately 480 secs
108
+
```
109
+
110
+
When the exit epoch is reached, querying the status will return:
111
+
112
+
```text
113
+
Validator 0x8de7ec501d574152f52a962bf588573df2fc3563fd0c6077651208ed20f24f3d8572425706b343117b48bdca56808416 has exited at epoch: 7
114
+
```
115
+
116
+
You can safely shut down the validator client at this point.
Copy file name to clipboardExpand all lines: book/src/validator_voluntary_exit.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ A validator can initiate a voluntary exit provided that the validator is current
10
10
It takes at a minimum 5 epochs (32 minutes) for a validator to exit after initiating a voluntary exit.
11
11
This number can be much higher depending on how many other validators are queued to exit.
12
12
13
+
You can also perform voluntary exit for one or more validators using the validator manager, see [Managing Validators](./validator_manager_api.md#exit) for more details.
14
+
13
15
## Initiating a voluntary exit
14
16
15
17
In order to initiate an exit, users can use the `lighthouse account validator exit` command.
0 commit comments