Skip to content

Commit

Permalink
add exit tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeHackett12 committed Oct 26, 2023
1 parent 9559d31 commit 1310146
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions docs/int/quickstart/quickstart-exit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: Exit a validator

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';

# Exit a DV

Expand Down Expand Up @@ -95,6 +96,130 @@ It needs to be the validator client that is connected to your charon client taki
</TabItem>
</Tabs>
</TabItem>
<TabItem value="Holesky" label="Holesky">
<Tabs groupId="validator-clients">
<TabItem value="teku" label="Teku" default>
<pre>
<code>
{String.raw`docker exec -ti charon-distributed-validator-node-teku-1 /opt/teku/bin/teku voluntary-exit \
--beacon-node-api-endpoint="http://charon:3600/" \
--confirmation-enabled=false \
--validator-keys="/opt/charon/validator_keys:/opt/charon/validator_keys" \
--epoch=256`}
</code>
</pre>
</TabItem>
<TabItem value="nimbus" label="Nimbus">
The following executes an interactive command inside the Nimbus VC container. It copies all files and directories from the Keystore path <code>/home/user/data/charon</code> to the newly created <code>/home/user/data/wd</code> directory.
<br/><br/>
For each file in the <code>/home/user/data/wd/secrets</code> directory, it:
<li>Extracts the filename without the extension as the file name is the public key</li>
<li>Appends <code>{String.raw`--validator=<filename>`}</code> to the <code>command</code> variable.</li>
<li>Executes a program called <code>nimbus_beacon_node</code> with the following arguments:</li>
<ul>
<li><code>deposits exit</code> : Exits validators</li>
<li><code>$command</code> : The generated command string from the loop.</li>
<li><code>--epoch=256</code> : The epoch upon which to submit the voluntary exit.</li>
<li><code>--rest-url=http://charon:3600/</code> : Specifies the Charon <code>host:port</code></li>
<li><code>--data-dir=/home/user/charon/</code> : Specifies the <code>Keystore path</code> which has all the validator keys. There will be a <code>secrets</code> and a <code>validators</code> folder inside it.</li>
</ul>
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-nimbus-1 /bin/bash -c '\
mkdir /home/user/data/wd
cp -r /home/user/data/charon/ /home/user/data/wd
command=""; \
for file in /home/user/data/wd/secrets/*; do \
filename=$(basename "$file" | cut -d. -f1); \
command+=" --validator=$filename"; \
done; \
/home/user/nimbus_beacon_node deposits exit $command --epoch=256 --rest-url=http://charon:3600/ --data-dir=/home/user/data/wd/'`}
</code>
</pre>
</TabItem>
<TabItem value="lodestar" label="Lodestar" default>
The following executes an interactive command inside the Loestar VC container to exit all validators. It executes
<code>node /usr/app/packages/cli/bin/lodestar validator voluntary-exit</code> with the arguments:
<ul>
<li><code>--beaconNodes="http://charon:3600"</code> : Specifies the Charon <code>host:port</code>.</li>
<li><code>--data-dir=/opt/data</code> : Specifies the folder where the key stores were imported.</li>
<li><code>--exitEpoch=256</code> : The epoch upon which to submit the voluntary exit.</li>
<li><code>--network=holesky</code> : Specifies the network.</li>
<li><code>--yes</code> : Skips confirmation prompt.</li>
</ul>
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-lodestar-1 /bin/sh -c 'node /usr/app/packages/cli/bin/lodestar validator voluntary-exit --beaconNodes="http://charon:3600" --dataDir=/opt/data --exitEpoch=256 --network=holesky --yes'`}
</code>
</pre>
</TabItem>
</Tabs>
</TabItem>
<TabItem value="Mainnet" label="Mainnet">
<Tabs groupId="validator-clients">
<TabItem value="teku" label="Teku" default>
<pre>
<code>
{String.raw`docker exec -ti charon-distributed-validator-node-teku-1 /opt/teku/bin/teku voluntary-exit \
--beacon-node-api-endpoint="http://charon:3600/" \
--confirmation-enabled=false \
--validator-keys="/opt/charon/validator_keys:/opt/charon/validator_keys" \
--epoch=194048`}
</code>
</pre>
</TabItem>
<TabItem value="nimbus" label="Nimbus">
The following executes an interactive command inside the Nimbus VC container. It copies all files and directories from the Keystore path <code>/home/user/data/charon</code> to the newly created <code>/home/user/data/wd</code> directory.
<br/><br/>
For each file in the <code>/home/user/data/wd/secrets</code> directory, it:
<li>Extracts the filename without the extension as the file name is the public key</li>
<li>Appends <code>{String.raw`--validator=<filename>`}</code> to the <code>command</code> variable.</li>
<li>Executes a program called <code>nimbus_beacon_node</code> with the following arguments:</li>
<ul>
<li><code>deposits exit</code> : Exits validators</li>
<li><code>$command</code> : The generated command string from the loop.</li>
<li><code>--epoch=194048</code> : The epoch upon which to submit the voluntary exit.</li>
<li><code>--rest-url=http://charon:3600/</code> : Specifies the Charon <code>host:port</code></li>
<li><code>--data-dir=/home/user/charon/</code> : Specifies the <code>Keystore path</code> which has all the validator keys. There will be a <code>secrets</code> and a <code>validators</code> folder inside it.</li>
</ul>
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-nimbus-1 /bin/bash -c '\
mkdir /home/user/data/wd
cp -r /home/user/data/charon/ /home/user/data/wd
command=""; \
for file in /home/user/data/wd/secrets/*; do \
filename=$(basename "$file" | cut -d. -f1); \
command+=" --validator=$filename"; \
done; \
/home/user/nimbus_beacon_node deposits exit $command --epoch=194048 --rest-url=http://charon:3600/ --data-dir=/home/user/data/wd/'`}
</code>
</pre>
</TabItem>
<TabItem value="lodestar" label="Lodestar" default>
The following executes an interactive command inside the Loestar VC container to exit all validators. It executes
<code>node /usr/app/packages/cli/bin/lodestar validator voluntary-exit</code> with the arguments:
<ul>
<li><code>--beaconNodes="http://charon:3600"</code> : Specifies the Charon <code>host:port</code>.</li>
<li><code>--data-dir=/opt/data</code> : Specifies the folder where the key stores were imported.</li>
<li><code>--exitEpoch=194048</code> : The epoch upon which to submit the voluntary exit.</li>
<li><code>--network=mainnet</code> : Specifies the network.</li>
<li><code>--yes</code> : Skips confirmation prompt.</li>
</ul>
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-lodestar-1 /bin/sh -c 'node /usr/app/packages/cli/bin/lodestar validator voluntary-exit --beaconNodes="http://charon:3600" --dataDir=/opt/data --exitEpoch=194048 --network=mainnet --yes'`}
</code>
</pre>
</TabItem>
</Tabs>
</TabItem>
</Tabs>

Once a threshold of exit signatures has been received by any single charon client, it will craft a valid voluntary exit message and will submit it to the beacon chain for inclusion. You can monitor partial exits stored by each node in the [Grafana Dashboard](https://github.com/ObolNetwork/charon-distributed-validator-node).
Expand Down

0 comments on commit 1310146

Please sign in to comment.