Skip to content

Commit

Permalink
Improve migrate docs, fix a typo, add more mev relays
Browse files Browse the repository at this point in the history
  • Loading branch information
OisinKyne committed Sep 4, 2024
1 parent f03c85e commit a589f09
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 37 deletions.
4 changes: 0 additions & 4 deletions docs/advanced/quickstart-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import TabItem from '@theme/TabItem';

# Create a DV using the SDK

:::warning
The Obol-SDK is in a beta state and should be used with caution on testnets only.
:::

This is a walkthrough of using the [Obol-SDK](https://www.npmjs.com/package/@obolnetwork/obol-sdk) to propose a four-node distributed validator cluster for creation using the [DV Launchpad](../dvl/intro.md).

## Pre-requisites
Expand Down
38 changes: 22 additions & 16 deletions docs/advanced/quickstart-split.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
---
sidebar_position: 7
description: Split existing validator keys
description: Migrate an existing validator by splitting its private key into shares
---

# Split validator private keys
# Migrate a validator

:::warning
This process should only be used if you want to split an *existing validator private key* into multiple private key shares for use in a Distributed Validator Cluster. If your existing validator is not properly shut down before the Distributed Validator starts, your validator may be slashed.
This process should only be used if you want to split an *existing validator private key* into multiple private key shares for use in a Distributed Validator Cluster. **If your existing validator is not properly shut down before the Distributed Validator starts, your validator may be slashed**.

If you are starting a new validator, you should follow a [quickstart guide](../start/quickstart_overview.md) instead.

If you use MEV-Boost, make sure you turned off your MEV-Boost service for the time of splitting the keys, otherwise you may hit [this issue](https://github.com/ObolNetwork/charon/issues/2770).
:::

Split an existing Ethereum validator key into multiple key shares for use in an [Obol Distributed Validator Cluster](../int/key-concepts.md#distributed-validator-cluster).
Expand All @@ -20,23 +18,20 @@ Split an existing Ethereum validator key into multiple key shares for use in an
- Ensure you have the existing validator keystores (the ones to split) and passwords.
- Ensure you have [docker](https://docs.docker.com/engine/install/) installed.
- Make sure `docker` is running before executing the commands below.
- If you use MEV-Boost, you must either:
- Turn off your MEV-Boost client before you split your keys, or;
- Temporarily use a relay you won't be using when running the Distributed Validator; to prevent registering for MEV with a timestamp more recent than the one Charon prepares at the moment of key splitting.

## Step 1. Clone the charon repo and copy existing keystore files
## Step 1. Prepare the existing keystore files

Clone the [Charon](https://github.com/ObolNetwork/charon) repo.
Create a folder to hold the encrypted keystores, along with the passwords to decrypt them.

```shell
# Clone the repo
git clone https://github.com/ObolNetwork/charon.git

# Change directory
cd charon/

# Create a folder within this checked out repo
# Create a folder
mkdir split_keys
```

Copy the existing validator `keystore.json` files into this new folder. Alongside them, with a matching filename but ending with `.txt` should be the password to the keystore (e.g.: `keystore-0.json`, `keystore-0.txt`).
Copy the existing validator `keystore.json` files into this new folder. Alongside them, with a matching filename but ending with `.txt` should be the password to the keystore (e.g.: `keystore-0.json`, `keystore-0.txt`). The files must start with `keystore*`.

At the end of this process, you should have a tree like this:

Expand All @@ -53,7 +48,7 @@ At the end of this process, you should have a tree like this:

## Step 2. Split the keys using the charon docker command

Run the following docker command to split the keys:
Run the following docker command to split the keys (for mainnet):

```shell
CHARON_VERSION= # E.g. v1.1.0
Expand Down Expand Up @@ -96,3 +91,14 @@ Created Charon cluster:
```

These split keys can now be used to start a Charon cluster.

## Step 3. (Optional) Encrypt artifacts for distribution

Within each folder are the encrypted [private key shares](../int/key-concepts.md#distributed-validator-key-share), along with the decryption passwords. To transmit these folders to the operators/machines where they will run, it might be prudent to encrypt the folder as a `.zip` to transport them.

```shell
# For each folder in ./cluster/ encrypt it with a different password
zip -er node1.zip ./cluster/node1/

# Repeat for node2,...,nodeN.
```
9 changes: 3 additions & 6 deletions docs/advanced/test-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,22 @@ At least 1 endpoint is required to be supplied to the `--endpoints` flag.

```shell
charon alpha test mev \
--endpoints="https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net"
--endpoints="https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,https://0xb0b07cd0abef743db4260b0ed50619cf6ad4d82064cb4fbec9d3ec530f7c5e6793d9f286c4e082c0244ffb9f2658fe88@bloxroute.regulated.blxrbdn.com,https://0xb3ee7afcf27f1f1259ac1787876318c6584ee353097a50ed84f51a1f21a323b3736f271a895c7ce918c038e4265918be@relay.edennetwork.io,https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@titanrelay.xyz"
```

### Run with Docker

```shell
docker run obolnetwork/charon:v1.1.0 alpha test mev \
--endpoints="https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net"
docker run -it obolnetwork/charon:v1.1.0 alpha test mev --endpoints="https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,https://0xb0b07cd0abef743db4260b0ed50619cf6ad4d82064cb4fbec9d3ec530f7c5e6793d9f286c4e082c0244ffb9f2658fe88@bloxroute.regulated.blxrbdn.com,https://0xb3ee7afcf27f1f1259ac1787876318c6584ee353097a50ed84f51a1f21a323b3736f271a895c7ce918c038e4265918be@relay.edennetwork.io,https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@titanrelay.xyz"
```

## Test your machine and network performance

Run tests towards your machine and network, to evaluate its effectiveness for a Distributed Validator cluster. While Charon does not require highly performant hardware, the network connectivity of the machine it is running on should be good. In comparison, the beacon node requires not only good connectivity, but also performant storage with high input-output operations per second, enough memory and also good network connectivity. This test aims to address all those requirements and give a good overview of the system.

Note that the storage tests require `fio` installed. `fio` is already pre-installed in the Docker images. Read more about `fio` [here](https://fio.readthedocs.io/en/latest/fio_doc.html).

### Pre-requisites

None.
The storage tests require `fio` to be installed. `fio` is already pre-installed in the charon Docker image if you choose to [run with Docker](#run-with-docker-4). Read more about `fio` [here](https://fio.readthedocs.io/en/latest/fio_doc.html).

### Run

Expand Down
2 changes: 1 addition & 1 deletion docs/charon/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size

Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)

BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
CFT #: max number of unavailable (crashed) nodes given size n
crashed(n) = n - Quarom(n)
crashed(n) = n - Quorum(n)
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size
Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)
BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size

Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)

BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ following formulas from [this](https://arxiv.org/pdf/1909.10194.pdf) paper:
n = cluster size

Threshold: min number of honest nodes required to reach quorum given size n
Quarom(n) = ceiling(2n/3)
Quorum(n) = ceiling(2n/3)

BFT #: max number of faulty (byzantine) nodes given size n
f(n) = floor((n-1)/3)
Expand Down

0 comments on commit a589f09

Please sign in to comment.