Skip to content

Commit

Permalink
Merge branch 'main' into update-alerts
Browse files Browse the repository at this point in the history
update with main
  • Loading branch information
anadi2311 committed May 13, 2024
2 parents 3fc4a12 + 5332175 commit fd5abbd
Show file tree
Hide file tree
Showing 77 changed files with 6,973 additions and 1,073 deletions.
23 changes: 15 additions & 8 deletions docs/advanced/obol-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,35 @@ You may have been provided with **Monitoring Credentials** used to push distribu

The provided credentials needs to be added in `prometheus/prometheus.yml` replacing `$PROM_REMOTE_WRITE_TOKEN` and will look like:
```
obol20!tnt8U!C...
obol20tnt8UC...
```

The updated `prometheus/prometheus.yml` file should look like:
```
```yaml
global:
scrape_interval: 30s # Set the scrape interval to every 30 seconds.
evaluation_interval: 30s # Evaluate rules every 30 seconds.

remote_write:
- url: https://vm.monitoring.gcp.obol.tech/write
authorization:
credentials: obol20!tnt8U!C...
credentials: obol20tnt8UC-your-credential-here...
write_relabel_configs:
- source_labels: [job]
regex: "charon"
action: keep # Keeps charon metrics and drop metrics from other containers.

scrape_configs:
- job_name: 'charon'
- job_name: "nethermind"
static_configs:
- targets: ["nethermind:8008"]
- job_name: "lighthouse"
static_configs:
- targets: ['charon:3620']
- targets: ["lighthouse:5054"]
- job_name: "charon"
static_configs:
- targets: ["charon:3620"]
- job_name: "lodestar"
static_configs:
- targets: [ "lodestar:5064" ]
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
```
2 changes: 1 addition & 1 deletion docs/advanced/quickstart-combine.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Run the following command:

```sh
# Combine a clusters private keys
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v0.19.1 combine --cluster-dir /opt/charon/cluster --output-dir /opt/charon/combined
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v0.19.2 combine --cluster-dir /opt/charon/cluster --output-dir /opt/charon/combined
```

This command will store the combined keys in the `output-dir`, in this case a folder named `combined`.
Expand Down
8 changes: 4 additions & 4 deletions docs/advanced/quickstart-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ At the end of this process, you should have a tree like this:
Run the following docker command to split the keys:

```shell
CHARON_VERSION= # E.g. v0.19.1
CHARON_VERSION= # E.g. v0.19.2
CLUSTER_NAME= # The name of the cluster you want to create.
WITHDRAWAL_ADDRESS= # The address you want to use for withdrawals.
FEE_RECIPIENT_ADDRESS= # The address you want to use for fee payments.
WITHDRAWAL_ADDRESS= # The address you want to use for withdrawals (this is just for accuracy in your lock file, you can't change a withdrawal address for a validator that has already been deposited)
FEE_RECIPIENT_ADDRESS= # The address you want to use for block reward and MEV payments.
NODES= # The number of nodes in the cluster.

docker run --rm -v $(pwd):/opt/charon obolnetwork/charon:${CHARON_VERSION} create cluster --name="${CLUSTER_NAME}" --withdrawal-addresses="${WITHDRAWAL_ADDRESS}" --fee-recipient-addresses="${FEE_RECIPIENT_ADDRESS}" --split-existing-keys --split-keys-dir=/opt/charon/split_keys --nodes ${NODES} --network goerli
docker run --rm -v $(pwd):/opt/charon obolnetwork/charon:${CHARON_VERSION} create cluster --name="${CLUSTER_NAME}" --withdrawal-addresses="${WITHDRAWAL_ADDRESS}" --fee-recipient-addresses="${FEE_RECIPIENT_ADDRESS}" --split-existing-keys --split-keys-dir=/opt/charon/split_keys --nodes ${NODES} --network mainnet
```

The above command will create `validator_keys` along with `cluster-lock.json` in `./cluster` for each node.
Expand Down
4 changes: 3 additions & 1 deletion docs/charon/charon-cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `charon` client is under heavy development, interfaces are subject to change

:::

The following is a reference for charon version [`v0.19.1`](https://github.com/ObolNetwork/charon/releases/tag/v0.19.1). Find the latest release on [our Github](https://github.com/ObolNetwork/charon/releases).
The following is a reference for charon version [`v0.19.2`](https://github.com/ObolNetwork/charon/releases/tag/v0.19.2). Find the latest release on [our Github](https://github.com/ObolNetwork/charon/releases).

The following are the top-level commands available to use.

Expand Down Expand Up @@ -92,6 +92,7 @@ Usage:
Flags:
--cluster-dir string The target folder to create the cluster in. (default "./")
--definition-file string Optional path to a cluster definition file or an HTTP URL. This overrides all other configuration flags.
--deposit-amounts ints List of partial deposit amounts (integers) in ETH. Values must sum up to exactly 32ETH.
--fee-recipient-addresses strings Comma separated list of Ethereum addresses of the fee recipient for each validator. Either provide a single fee recipient address or fee recipient addresses for each validator.
-h, --help Help for cluster
--insecure-keys Generates insecure keystore files. This should never be used. It is not supported on mainnet.
Expand Down Expand Up @@ -125,6 +126,7 @@ Usage:
charon create dkg [flags]

Flags:
--deposit-amounts ints List of partial deposit amounts (integers) in ETH. Values must sum up to exactly 32ETH.
--dkg-algorithm string DKG algorithm to use; default, frost (default "default")
--fee-recipient-addresses strings Comma separated list of Ethereum addresses of the fee recipient for each validator. Either provide a single fee recipient address or fee recipient addresses for each validator.
-h, --help Help for dkg
Expand Down
105 changes: 94 additions & 11 deletions docs/faq/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ sidebar_position: 1
description: Frequently asked questions
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Frequently asked questions

## General
Expand All @@ -22,17 +25,97 @@ Have you checked out our [blog site](https://blog.obol.tech) and [twitter](https
### What are the hardware requirements for running a Charon node?
Charon alone uses negligible disk space of not more than a few MBs. However, if you are running your consensus client and execution client on the same server as charon, then you will typically need the same hardware as running a full Ethereum node:

At minimum:
- A CPU with 2+ physical cores (or 4 vCPUs)
- 8GB RAM
- 1.5TB+ free SSD disk space (for mainnet)
- 10mb/s internet bandwidth

Recommended specifications:
- A CPU with 4+ physical cores
- 16GB+ RAM
- 2TB+ free disk on a high performance SSD (e.g. NVMe)
- 25mb/s internet bandwidth
<Tabs groupId="Hardware">
<TabItem value="Minimum" label="Minimum">
<table>
<tr>
<th></th>
<th>Charon + VC</th>
<th>Beacon Node</th>
</tr>
<tr>
<td><strong>CPU*</strong></td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td><strong>RAM</strong></td>
<td>2</td>
<td>16</td>
</tr>
<tr>
<td><strong>Storage</strong></td>
<td>100 MB</td>
<td>2 TB</td>
</tr>
<tr>
<td><strong>Internet Bandwidth</strong></td>
<td>10 Mb/s</td>
<td>10 Mb/s</td>
</tr>
</table>
</TabItem>
<TabItem value="Recommended" label="Recommended" default>
<table>
<tr>
<th></th>
<th>Charon + VC</th>
<th>Beacon Node</th>
</tr>
<tr>
<td><strong>CPU*</strong></td>
<td>2</td>
<td>4</td>
</tr>
<tr>
<td><strong>RAM</strong></td>
<td>3</td>
<td>24</td>
</tr>
<tr>
<td><strong>Storage</strong></td>
<td>100 MB</td>
<td>2 TB</td>
</tr>
<tr>
<td><strong>Internet Bandwidth</strong></td>
<td>25 Mb/s</td>
<td>25 Mb/s</td>
</tr>
</table>
</TabItem>
<TabItem value="High # of Validators" label="High # of Validators (>200)" default>
<table>
<tr>
<th></th>
<th>Charon + VC</th>
<th>Beacon Node</th>
</tr>
<tr>
<td><strong>CPU*</strong></td>
<td>2</td>
<td>8</td>
</tr>
<tr>
<td><strong>RAM</strong></td>
<td>4</td>
<td>32</td>
</tr>
<tr>
<td><strong>Storage</strong></td>
<td>100 MB</td>
<td>2 TB</td>
</tr>
<tr>
<td><strong>Internet Bandwidth</strong></td>
<td>100 Mb/s</td>
<td>100 Mb/s</td>
</tr>
</table>
</TabItem>
</Tabs>

*if using vCPU, aim for 2x the above amounts

For more hardware considerations, check out the [ethereum.org guides](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/#environment-and-hardware) which explores various setups and trade-offs, such as running the node locally or in the cloud.

Expand Down
2 changes: 1 addition & 1 deletion docs/faq/risks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following non-Obol entities run relays that you can consider adding to your
| Entity | Relay URL |
|-----------|---------------------------------------|
| [DSRV](https://www.dsrvlabs.com/) | https://charon-relay.dsrvlabs.dev |
| [Infstones](https://infstones.com/) | https://obol-relay.infstones.com:3640/ |
| [Infstones](https://infstones.com/) | https://obol-relay.infstones.com/ |
| [Hashquark](https://www.hashquark.io/) | https://relay-2.prod-relay.721.land/ |
| [Figment](https://figment.io/) | https://relay-1.obol.figment.io/ |
| [Node Guardians](https://nodeguardians.io/) | https://obol-relay.nodeguardians.io/ |
Expand Down
2 changes: 1 addition & 1 deletion docs/sec/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The completed audits reports are linked [here](https://github.com/ObolNetwork/ob

- A [security assessment](https://github.com/ObolNetwork/obol-security/blob/f9d7b0ad0bb8897f74ccb34cd4bd83012ad1d2b5/audits/Sigma_Prime_Obol_Network_Charon_Security_Assessment_Report_v2_1.pdf) of Charon by [Sigma Prime](https://sigmaprime.io/) resulting in version [`v0.16.0`](https://github.com/ObolNetwork/charon/releases/tag/v0.16.0).

- A second [assessment of Charon](https://obol.tech/charon_quantstamp_assessment.pdf) by [QuantStamp](https://quantstamp.com/) resulting in version [`v0.19.1`](https://github.com/ObolNetwork/charon/releases/tag/v0.19.1).
- A second [assessment of Charon](https://obol.tech/charon_quantstamp_assessment.pdf) by [QuantStamp](https://quantstamp.com/) resulting in version [`v0.19.2`](https://github.com/ObolNetwork/charon/releases/tag/v0.19.2).

- A [solidity audit](./smart_contract_audit) of the Obol Splits contracts by [Zach Obront](https://zachobront.com/).

Expand Down
58 changes: 29 additions & 29 deletions docs/start/quickstart_alone.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,53 +29,53 @@ The private key shares can be created centrally and distributed securely to each

<Tabs groupId="Launchpad-other">
<TabItem value="Launchpad" label="Launchpad" default>
Go to the the <a href="/docs/dvl/intro#dv-launchpad-links">DV Launchpad</a> and select <code>Create a distributed validator alone</code>. Follow the steps to configure your DV cluster. The Launchpad will give you a docker command, which you should run in your terminal.
</TabItem>
<TabItem value="CLI" label="CLI">


1. Clone the <a href="https://github.com/ObolNetwork/charon-distributed-validator-cluster.git">Quickstart Alone</a> demo repo and `cd` into the directory.
Go to the the <a href="/docs/dvl/intro#dv-launchpad-links">DV Launchpad</a> and select <code>Create a distributed validator alone</code>. Follow the steps to configure your DV cluster. The Launchpad will give you a docker command to create your cluster. <br/>Before you run the command, checkout the <a href="https://github.com/ObolNetwork/charon-distributed-validator-cluster.git">Quickstart Alone</a> demo repo and <code>cd</code> into the directory.

```bash
# Clone the repo
git clone https://github.com/ObolNetwork/charon-distributed-validator-cluster.git

# Change directory
cd charon-distributed-validator-cluster/
```

2. Prepare the environment variables
# Run the command provided in the DV Launchpad "Create a cluster alone" flow
docker run -u $(id -u):$(id -g) --rm -v "$(pwd)/:/opt/charon" obolnetwork/charon:v0.19.2 create cluster --definition-file=...
```
</TabItem>

`.env.sample` is a sample environment file that allows overriding default configuration defined in `docker-compose.yml`. Setup the desired settings for the DV, including the network you wish to operate on. Check the [Charon CLI reference](../charon/charon-cli-reference.md) for additional optional flags to set.
<TabItem value="CLI" label="CLI">

<pre>
<code>
WITHDRAWAL_ADDR=[ENTER YOUR WITHDRAWAL ADDRESS HERE]
<br/>
FEE_RECIPIENT_ADDR=[ENTER YOUR FEE RECIPIENT ADDRESS HERE]
<br/>
NETWORK="holesky"
</code>
</pre>
1. Clone the <a href="https://github.com/ObolNetwork/charon-distributed-validator-cluster">Quickstart Alone</a> demo repo and <code>cd</code> into the directory.
```bash
# Clone the repo
git clone https://github.com/ObolNetwork/charon-distributed-validator-cluster.git


3. Once you have set the values you wish to use. Make a copy of this file called `.env`.
# Change directory
cd charon-distributed-validator-cluster/
```
2. Run the cluster creation command, setting required flag values.

```bash
# Copy the sample environment variables
cp .env.sample .env
```
Run the below command to create the validator private key shares and cluster artifacts locally, replacing the example values for `nodes`, `network`, `num-validators`, `fee-recipient-addresses`, and `withdrawal-addresses`.
Check the [Charon CLI reference](../charon/charon-cli-reference.md#create-a-full-cluster-locally) for additional, optional flags to set.
```bash
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v0.19.2 create cluster --nodes=4 --network=holesky --num-validators=1 --name="Quickstart Guide Cluster" --cluster-dir="cluster" --fee-recipient-addresses=0x000000000000000000000000000000000000dead --withdrawal-addresses=0x000000000000000000000000000000000000dead
```

4. Then, run this command to create all the key shares and cluster artifacts locally:
:::tip
If you would like your cluster to appear on the [DV Launchpad](../dvl/intro), add the `--publish` flag to the command.
:::

<pre>
docker run --rm -v "$(pwd):/opt/charon" --env-file .env obolnetwork/charon:v0.19.0 create cluster
</pre>
</TabItem>
</Tabs>
<br />

You should now have multiple folders within `./cluster/`, one for each node created. Backup the `./cluster/` folder, then move on to deploying the cluster physically.
After the `create cluster` command is run, you should have multiple subfolders within the newly created `./cluster/` folder, one for each node created.

**Backup the `./cluster/` folder, then move on to deploying the cluster.**

:::info
Make sure your backup is secure and private, someone with access to these files could get the validators slashed.
:::

## Step 2: Deploy and start the nodes

Expand Down
8 changes: 4 additions & 4 deletions docs/start/quickstart_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ git clone https://github.com/ObolNetwork/charon-distributed-validator-node.git
cd charon-distributed-validator-node/

# Use docker to create an ENR. Backup the file `.charon/charon-enr-private-key`.
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v0.19.1 create enr
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v0.19.2 create enr
```

You should expect to see a console output like this:
Expand Down Expand Up @@ -224,11 +224,11 @@ For the next step, select the _Creator_ tab if you are coordinating the creation
<li>
Run the <code>charon create dkg</code> command that generates DKG
cluster-definition.json file. (Note: in the "docker run" command,
you may have to change the version from v0.19.0 to the correct
you may have to change the version from v0.19.2 to the correct
version of the repo you are using)
<pre>
docker run --rm -v "$(pwd):/opt/charon"
obolnetwork/charon:v0.19.0 create dkg --name="Quickstart"
obolnetwork/charon:v0.19.2 create dkg --name="Quickstart"
--num-validators=1
--fee-recipient-addresses="0x0000000000000000000000000000000000000000"
--withdrawal-addresses="0x0000000000000000000000000000000000000000"
Expand Down Expand Up @@ -347,7 +347,7 @@ For the [DKG](../charon/dkg.md) to complete, all operators need to be running th

</TabItem>
<TabItem value="CLI" label="CLI">
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:v0.19.0 dkg --publish</pre> and the DKG process should begin.
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:v0.19.2 dkg --publish</pre> and the DKG process should begin.
</TabItem>
</Tabs>

Expand Down
Loading

0 comments on commit fd5abbd

Please sign in to comment.