Skip to content
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

Maeliosa/dappnode exit and backup #390

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 41 additions & 96 deletions docs/start/quickstart-exit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,102 +124,26 @@ It needs to be the validator client that is connected to your Charon client taki
</code>
</pre>
</TabItem>
</Tabs>
</TabItem>
<TabItem value="Goerli" label="Goerli" default>
<Tabs groupId="validator-clients">
<TabItem value="teku" label="Teku" default>
<pre>
<code>
{String.raw`docker exec -it 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=162304`}
</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/>
<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

/home/user/nimbus_beacon_node deposits exit --all --epoch=162304 --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 Lodestar VC container to exit all validators.
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-lodestar-1 node /usr/app/packages/cli/bin/lodestar validator voluntary-exit \
--beaconNodes="http://charon:3600" \
--dataDir=/opt/data \
--exitEpoch=162304 \
--network=goerli \
--yes`}
</code>
</pre>
</TabItem>
<TabItem value="lighthouse" label="Lighthouse" default>
The following executes an interactive command inside the Lighthouse VC container to exit all validators. The exit is submitted for the current epoch.
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-lighthouse-1 /bin/bash -c '\
for file in /opt/charon/keys/*; do \
filename=$(basename $file);
if [[ $filename == *".json"* ]]; then
`}
{String.raw` keystore=$`}
{String.raw`{filename%.*};
`}
{String.raw`lighthouse account validator exit \
--beacon-node http://charon:3600 \
--keystore /opt/charon/keys/$keystore.json \
--network goerli \
--password-file /opt/charon/keys/$keystore.txt \
--no-confirmation \
--no-wait;
fi;
done;'`}
</code>
</pre>
</TabItem>
<TabItem value="prysm" label="Prysm" default>
Currently voluntary exits through Prysm are not supported. This is because <a href="https://docs.prylabs.network/docs/wallet/exiting-a-validator" target="_blank">Prysm support voluntary exits only if both the validator client and the beacon node are running on Prysm</a>. Note that this is incompatible with Charon, as the Charon client intercepts the communication between the validator client and the consensus layer.
</TabItem>
<TabItem value="charon" label="Charon" default>
Voluntary exit can be submitted directly through Charon as well. The partially signed exit messages are stored (centrally) on Obol's infrastructure. Exits through Charon are submitted per validator. All active validators public keys for a given cluster lock can be listed with:
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-charon-1 /bin/sh -c 'charon exit active-validator-list \
--beacon-node-endpoints="http://lighthouse:5052"'`}
</code>
</pre>
Then a signed partial exit for validator can be submitted by:
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-charon-1 /bin/sh -c 'charon exit sign \
--beacon-node-endpoints="http://lighthouse:5052" \
--validator-public-key="<VALIDATOR_PUBLIC_KEY>" \
--publish-timeout="5m"'`}
</code>
</pre>
After a sufficient amount of signed partial exits from node operators in the cluster is cumulated, a full (complete) exit is created. The threshold is the same as the one submitted during the cluster creation. After a full exit message is created, any operator from the cluster can broadcast it to the beacon chain with:
<pre>
<code>
{String.raw`docker exec -it charon-distributed-validator-node-charon-1 /bin/sh -c 'charon exit broadcast \
--beacon-node-endpoints="http://lighthouse:5052" \
--validator-public-key="<VALIDATOR_PUBLIC_KEY>" \
--publish-timeout="5m"'`}
</code>
</pre>
</TabItem>
<TabItem value="Dappnode" label="Dappnode">
<h2>Exit a distributed validator using DappNode</h2>
<ol>
<li>
Navigate to the config tab of your Obol DappNode package. Click 'Packages', then click 'My Packages', and enter the Obol package. Go to the config tab. At the bottom right corner of the page, click on 'Show Advanced Editor'.
<img src="/img/ConfigTabExit.png" alt="Config Tab" />
</li>
<li>
The advanced editor config page provides ENV configs for each validator. Scroll to the validator number you want to exit and type “true” in the column opposite SIGN_EXIT.
<img src="/img/TypeTrue.png" alt="Config Tab" />
</li>
<li>
Scroll to the bottom of the page and click the 'update' button for the changes to take effect.
<img src="/img/ExitUpdate.png" alt="Config Tab" />
</li>
<li>
Check your logs to confirm the exit process has started.
</li>
</ol>
</TabItem>
</Tabs>
</TabItem>
<TabItem value="Mainnet" label="Mainnet">
Expand Down Expand Up @@ -316,6 +240,27 @@ It needs to be the validator client that is connected to your Charon client taki
</code>
</pre>
</TabItem>
<TabItem value="Dappnode" label="Dappnode">
<h2>Exit a distributed validator using DappNode</h2>
Below steps provide steps to exit a validator using DappNode.
<ol>
<li>
Navigate to the config tab of your Obol DappNode package. Click 'Packages', then click 'My Packages', and enter the Obol package. Go to the config tab. At the bottom right corner of the page, click on 'Show Advanced Editor'.
<img src="/img/ConfigTabExit.png" alt="Config Tab" />
</li>
<li>
The advanced editor config page provides ENV configs for each validator. Scroll to the validator number you want to exit and type “true” in the column opposite SIGN_EXIT.
<img src="/img/TypeTrue.png" alt="Config Tab" />
</li>
<li>
Scroll to the bottom of the page and click the 'update' button for the changes to take effect.
<img src="/img/ExitUpdate.png" alt="Config Tab" />
</li>
<li>
Check your logs to confirm the exit process has started.
</li>
</ol>
</TabItem>
</Tabs>
</TabItem>
</Tabs>
Expand Down
27 changes: 22 additions & 5 deletions docs/start/quickstart_group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ Before preparing the DappNode to take part in a Distributed Validator Cluster, y

#### Install the Obol DappNode package

With a fully synced Ethereum node now running on the DappNode, the below steps will walk through installing the Obol Holesky package via an IPFS hash and preparing for a Distributed Key Generation ceremony. Future versions of this guide will download the package from the official DappNode DappStore once a stable 1.0 release is made.
With a fully synced Ethereum node now running on the DappNode, the below steps will walk through installing the Obol package via an IPFS hash and preparing for a Distributed Key Generation ceremony. Future versions of this guide will download the package from the official DappNode DappStore once a stable 1.0 release is made.

<p>
<ol>
<li>
Before installing the package, go to the Obol DappNode Repo in order to get the latest IPFS hash.
Before installing the package, make sure you are installing the correct one, this depends on which network your creator configures the cluster on, Holesky or Mainnet. You can find the link to both packages below:
<ul>
<li><a href="https://github.com/dappnode/DAppNodePackage-holesky-obol/releases" target="_blank">Holesky Repo</a></li>
<li><a href="https://github.com/dappnode/DAppNodePackage-obol/releases" target="_blank">Mainnet Repo</a></li>
<li><a href="http://my.dappnode/installer/dnp/holesky-obol.dnp.dappnode.eth" target="_blank">Holesky Repo</a></li>
<li><a href="http://my.dappnode/installer/dnp/obol.dnp.dappnode.eth" target="_blank">Mainnet Repo</a></li>
</ul>
</li>
<li>
Expand Down Expand Up @@ -430,7 +430,7 @@ For the [DKG](../charon/dkg.md) to complete, all operators need to be running th
Once the creator gives you the <code>cluster-definition.json</code> file and you place it in a <code>.charon</code> subdirectory, run: <pre>docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v1.0.0 dkg --publish</pre> and the DKG process should begin.
</TabItem>
<TabItem value="DappnodeTab" label="Dappnode">
Follow this step you are signing through the DV Launchpad, importing the cluster definition URL into the DappNode package's config & then running the DKG inside the DappNode, followed by cluster run.<br/>
Follow this step if you are signing through the DV Launchpad, importing the cluster definition URL into the DappNode package's config & then running the DKG inside the DappNode, followed by cluster run.<br/>
<img src="/img/StartDKG.png" alt="Start DKG" />
<ol>
<li>
Expand All @@ -456,6 +456,23 @@ For the [DKG](../charon/dkg.md) to complete, all operators need to be running th
<img src="/img/DKGExample.png" alt="Connect to peers in logs tab" />
</li>
</ol>
<h2>Create a DV Node Backup</h2>
It is important to back up all artefacts generated by the DKG ceremony, and your node ENR private key. The below steps will show you how to download your keys & node artefacts.
<ol>
<li>
Navigate to the backup tab inside the Obol package.
<img src="/img/createBackup.png" alt="Backup Tab" />
</li>
<li>
Click on the 'Backup now' button and it will open a new chrome window with a 'file save' option. Select the path where you want to save the Backup tar file.
<img src="/img/saveBackup.png" alt="Save Backup" />
</li>
<li>
Double click to extract the tar file. There will be folders for each charon node (max 5). Navigate to each node folder, and all artefacts related to each node will be present.
<img src="/img/ExtractFile.png" alt="Extract File" />
<img src="/img/Node.png" alt="artefacts" />
</li>
</ol>

</TabItem>
</Tabs>
Expand Down
Binary file added static/img/ConfigTabExit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/ExitUpdate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/ExtractFile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/Node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/TypeTrue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/createBackup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/saveBackup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading