# Test a Cluster

Charon test commands are designed to help you evaluate the performance and readiness of your candidate cluster. It allows you to test your connection to other Charon peers, the performance of your beacon node(s), the readiness of your validator client, the performance of the MEV relays you will be using and the infrastructure on which you will run the cluster. It prints a performance report to the standard output (which can be omitted with the `--quiet` flag) and a machine-readable JSON format of the report if the `--output-json` flag is set.

{% hint style="success" %}
Adding the `--publish` flag to the below commands, and running the command from the directory containing your `.charon` folder, will submit the test results to the [Obol API](https://docs.obol.org/api/what-is-this-api). Publishing your performance reports grows the staking node dataset, and allows Obol and Ethereum development teams to make data-driven choices regarding the required specs for validating Ethereum. We hope you will consider opting in.
{% endhint %}

{% tabs %}
{% tab title="Executable" %}
**Test all**

Intended for running tests across all categories. Each flag should have a prefix for its category (i.e.: the flag `--endpoints` from the beacon tests becomes `--beacon-endpoints`). For details about each category refer to their respective sections.

{% tabs %}
{% tab title="Regular Test" %}
Regular tests intended for relatively fast run, without putting any major load on any tested system. Based on which stage you are with your cluster creation, some steps are eased.

{% tabs %}
{% tab title="Just starting" %}
**Pre-requisites**

* [ENR private key](https://docs.obol.org/learn/charon/charon-cli-reference#creating-an-enr-for-charon).
* Peers' ENRs, supplied to the `--peers-enrs` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
charon alpha test all \
  --peers-enrs="enr:-HW4QMno_MB_ID6GFVxoIQAHHVHZZZjzFctxtX2tm9D95tvaPbHathi8YUP8jh8v2YUAVu2fYWEOB_BT14pt8QgiGg2AgmlkgnY0iXNlY3AyNTZrMaECdpnK83s0dbBwCaEfDIkQ-3nJkkC93STvv6Vmi0bYlzg,enr:-HW4QO2vefLueTBEUGly5hkcpL7NWdMKWx7Nuy9f7z6XZInCbFAc0IZj6bsnmj-Wi4ElS6jNa0Mge5Rkc2WGTVemas2AgmlkgnY0iXNlY3AyNTZrMaECR9SmYQ_1HRgJmNxvh_ER2Sxx78HgKKgKaOkCROYwaDY" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz"
```

{% endtab %}

{% tab title="Completed cluster creation" %}
**Pre-requisites**

* Cluster definition file, supplied to the `--peers-definition-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
charon alpha test all \
  --peers-definition-file="./.charon/cluster-definition.json" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz"
```

{% endtab %}

{% tab title="Completed DKG" %}
**Pre-requisites**

* Cluster lock file, supplied to the `--peers-lock-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
charon alpha test all \
  --peers-lock-file="./.charon/cluster-lock.json" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz"
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="Load Test" %}
Load tests intended for more time consuming run. Beacon nodes are put under heavy load. MEV relays are required to create real blocks. Based on which stage you are with your cluster creation, some steps are eased.

{% tabs %}
{% tab title="Just starting" %}
**Pre-requisites**

* [ENR private key](https://docs.obol.org/learn/charon/charon-cli-reference#creating-an-enr-for-charon).
* Peers' ENRs, supplied to the `--peers-enrs` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
charon alpha test all \
  --peers-enrs="enr:-HW4QMno_MB_ID6GFVxoIQAHHVHZZZjzFctxtX2tm9D95tvaPbHathi8YUP8jh8v2YUAVu2fYWEOB_BT14pt8QgiGg2AgmlkgnY0iXNlY3AyNTZrMaECdpnK83s0dbBwCaEfDIkQ-3nJkkC93STvv6Vmi0bYlzg,enr:-HW4QO2vefLueTBEUGly5hkcpL7NWdMKWx7Nuy9f7z6XZInCbFAc0IZj6bsnmj-Wi4ElS6jNa0Mge5Rkc2WGTVemas2AgmlkgnY0iXNlY3AyNTZrMaECR9SmYQ_1HRgJmNxvh_ER2Sxx78HgKKgKaOkCROYwaDY" \
  --beacon-endpoints="http://127.0.0.1:5052/" \
  --beacon-load-test \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test
```

{% endtab %}

{% tab title="Completed cluster creation" %}
**Pre-requisites**

* Cluster definition file, supplied to the `--peers-definition-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
charon alpha test all \
  --peers-definition-file="./.charon/cluster-definition.json" \
  --beacon-endpoints="http://127.0.0.1:5052/" \
  --beacon-load-test \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test

```

{% endtab %}

{% tab title="Completed DKG" %}
**Pre-requisites**

* Cluster lock file, supplied to the `--peers-lock-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
charon alpha test all \
  --peers-lock-file="./.charon/cluster-lock.json" \
  --beacon-endpoints="http://127.0.0.1:5052/" \
  --beacon-load-test \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="Docker" %}
{% hint style="info" %}
If you are running Charon using the [charon-distributed-validator-node repository](https://github.com/ObolNetwork/charon-distributed-validator-node/), services like the beacon node and validator client are hosted locally. To run the `beacon` node and `validator` client tests, you need to point them toward the correct Docker container, this includes specifying the Docker container’s network. Check your docker networks with the command `docker network ls`. When you run the test command, specify the Docker network with `--network <name>`.

Read more about docker networking [here](https://docs.docker.com/engine/network/).
{% endhint %}

**Test all**

Intended for running tests across all categories. Each flag should have a prefix for its category (i.e.: the flag `--endpoints` from the beacon tests becomes `--beacon-endpoints`). For details about each category refer to their respective sections.

{% tabs %}
{% tab title="Regular Test" %}
Regular tests intended for relatively fast run, without putting any major load on any tested system. Based on which stage you are with your cluster creation, some steps are eased.

{% tabs %}
{% tab title="Just starting" %}
**Pre-requisites**

* [ENR private key](https://docs.obol.org/learn/charon/charon-cli-reference#creating-an-enr-for-charon).
* Peers' ENRs, supplied to the `--peers-enrs` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
docker run -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-enrs="enr:-HW4QMno_MB_ID6GFVxoIQAHHVHZZZjzFctxtX2tm9D95tvaPbHathi8YUP8jh8v2YUAVu2fYWEOB_BT14pt8QgiGg2AgmlkgnY0iXNlY3AyNTZrMaECdpnK83s0dbBwCaEfDIkQ-3nJkkC93STvv6Vmi0bYlzg,enr:-HW4QO2vefLueTBEUGly5hkcpL7NWdMKWx7Nuy9f7z6XZInCbFAc0IZj6bsnmj-Wi4ElS6jNa0Mge5Rkc2WGTVemas2AgmlkgnY0iXNlY3AyNTZrMaECR9SmYQ_1HRgJmNxvh_ER2Sxx78HgKKgKaOkCROYwaDY" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz" \
  --infra-disk-io-test-file-dir="/opt/charon/test"
```

{% endtab %}

{% tab title="Completed cluster creation" %}
**Pre-requisites**

* Cluster definition file, supplied to the `--peers-definition-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
docker run -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-definition-file="/opt/charon/test/.charon/cluster-definition.json" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz" \
  --infra-disk-io-test-file-dir="/opt/charon/test"
```

{% endtab %}

{% tab title="Completed DKG" %}
**Pre-requisites**

* Cluster lock file, supplied to the `--peers-lock-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.

**Example run**

```sh
docker run -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-lock-file="/opt/charon/test/.charon/cluster-lock.json" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com" \
  --mev-endpoints="\
https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae87129945ec206ec2dc16933f31d983f8225772b6@hoodi-helix.aestus.live,\
https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.hoodi.blxrbdn.com,\
https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-hoodi.flashbots.net,\
https://0xb1559beef7b5ba3127485bbbb090362d9f497ba64e177ee2c8e7db74746306efad687f2cf8574e38d70067d40ef136dc@relay-hoodi.ultrasound.money,\
https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@hoodi.titanrelay.xyz" \
  --infra-disk-io-test-file-dir="/opt/charon/test"
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="Load Test" %}
Load tests intended for more time consuming run. Beacon nodes are put under heavy load. MEV relays are required to create real blocks. Based on which stage you are with your cluster creation, some steps are eased.

{% tabs %}
{% tab title="Just starting" %}
**Pre-requisites**

* [ENR private key](https://docs.obol.org/learn/charon/charon-cli-reference#creating-an-enr-for-charon).
* Peers' ENRs, supplied to the `--peers-enrs` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
docker run --network="charon-distributed-validator-node_dvnode" -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-enrs="enr:-HW4QMno_MB_ID6GFVxoIQAHHVHZZZjzFctxtX2tm9D95tvaPbHathi8YUP8jh8v2YUAVu2fYWEOB_BT14pt8QgiGg2AgmlkgnY0iXNlY3AyNTZrMaECdpnK83s0dbBwCaEfDIkQ-3nJkkC93STvv6Vmi0bYlzg,enr:-HW4QO2vefLueTBEUGly5hkcpL7NWdMKWx7Nuy9f7z6XZInCbFAc0IZj6bsnmj-Wi4ElS6jNa0Mge5Rkc2WGTVemas2AgmlkgnY0iXNlY3AyNTZrMaECR9SmYQ_1HRgJmNxvh_ER2Sxx78HgKKgKaOkCROYwaDY" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="http://lighthouse:5052/" \
  --beacon-simulation-file-dir="/opt/charon/test" \
  --beacon-load-test \
  --validator-api-address="lodestar:5064" \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test \
  --infra-disk-io-test-file-dir="/opt/charon/test"

```

{% endtab %}

{% tab title="Completed cluster creation" %}
**Pre-requisites**

* Cluster definition file, supplied to the `--peers-definition-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
docker run --network="charon-distributed-validator-node_dvnode" -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-definition-file="/opt/charon/test/.charon/cluster-definition.json" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="http://lighthouse:5052/" \
  --beacon-simulation-file-dir="/opt/charon/test" \
  --beacon-load-test \
  --validator-api-address="lodestar:5064" \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test \
  --infra-disk-io-test-file-dir="/opt/charon/test"
```

{% endtab %}

{% tab title="Completed DKG" %}
**Pre-requisites**

* Cluster lock file, supplied to the `--peers-lock-file` flag.
* Running beacon node(s) towards which tests will be executed, supplied to `--beacon-endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.
* Running validator client towards which tests will be executed.
* Running MEV relay(s) towards which tests will be executed, supplied to `--mev-endpoints` flag.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--mev-beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
docker run --network="charon-distributed-validator-node_dvnode" -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test all \
  --peers-lock-file="/opt/charon/test/.charon/cluster-lock.json" \
  --peers-private-key-file="/opt/charon/test/.charon/charon-enr-private-key" \
  --beacon-endpoints="http://lighthouse:5052/" \
  --beacon-simulation-file-dir="/opt/charon/test" \
  --beacon-load-test \
  --validator-api-address="lodestar:5064" \
  --mev-endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --mev-beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com" \
  --mev-load-test \
  --infra-disk-io-test-file-dir="/opt/charon/test"
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Test connection to peers

Run tests towards other Charon peers to evaluate the effectiveness of a potential cluster setup. The command sets up a libp2p node, similarly to what Charon normally does. This test command **has to be run simultaneously with the other peers**. After the node is up it waits for other peers to get their nodes up and running, retrying the connection every 3 seconds. The libp2p node connects to relays (configurable with `p2p-relays` flag) and to other libp2p nodes via TCP. Other peer nodes are discoverable by using their ENRs. Note that for a peer to be successfully discovered, it needs to be connected to the same relay. After completion of the test suite the libp2p node stays alive (duration configurable with `keep-alive` flag) for other peers to continue testing against it. The node can be forcefully stopped as well.

To be able to establish direct connection, you have to ensure:

* Your machine is publicly accessible on the internet or at least a specific port is.
* You add flag `p2p-tcp-address` (i.e.: `127.0.0.1:9001`) flag and the port specified in it is free and publicly accessible.
* You add the flag `p2p-external-ip` (i.e.: `8.8.8.8`) and specify your public IP.

If all points are satisfied by you and the other peers, you should be able to establish a direct TCP connection between each other. Note that a relay is still required, as it is used for peer discovery.

Based on which stage you are with your cluster creation, some steps are eased.

{% tabs %}
{% tab title="Just starting" %}
**Pre-requisites**

* [ENR private key](https://docs.obol.org/learn/charon/charon-cli-reference#creating-an-enr-for-charon).
* Peers' ENRs, supplied to the `--enrs` flag.

**Example run**

```sh
charon alpha test peers \
  --enrs="enr:-HW4QMno_MB_ID6GFVxoIQAHHVHZZZjzFctxtX2tm9D95tvaPbHathi8YUP8jh8v2YUAVu2fYWEOB_BT14pt8QgiGg2AgmlkgnY0iXNlY3AyNTZrMaECdpnK83s0dbBwCaEfDIkQ-3nJkkC93STvv6Vmi0bYlzg,enr:-HW4QO2vefLueTBEUGly5hkcpL7NWdMKWx7Nuy9f7z6XZInCbFAc0IZj6bsnmj-Wi4ElS6jNa0Mge5Rkc2WGTVemas2AgmlkgnY0iXNlY3AyNTZrMaECR9SmYQ_1HRgJmNxvh_ER2Sxx78HgKKgKaOkCROYwaDY"
```

{% endtab %}

{% tab title="Completed cluster creation" %}
**Pre-requisites**

* Cluster definition file, supplied to the `--definition-file` flag.

**Example run**

```sh
charon alpha test peers \
  --definition-file="./.charon/cluster-definition.json"
```

{% endtab %}

{% tab title="Completed DKG" %}
**Pre-requisites**

* Cluster lock file, supplied to the `--lock-file` flag.

**Example run**

```sh
charon alpha test peers \
  --lock-file="./.charon/cluster-lock.json"
```

{% endtab %}
{% endtabs %}

### Test beacon node

Run tests on beacon node(s), to evaluate their effectiveness for a Distributed Validator cluster. The beacon node is usually the client doing the most work in a validating stack, especially with a high number of validators being serviced by the validator client(s) and Charon(s) that depend on it.

{% tabs %}
{% tab title="Regular test" %}
Regular tests intended for relatively fast run, without putting any major load on any tested system.

**Pre-requisites**

* Running beacon node(s) towards which tests will be executed, supplied to `--endpoints` flag.

**Example run**

```sh
charon alpha test beacon \
  --endpoints="https://ethereum-hoodi-beacon-api.publicnode.com,https://ethereum-sepolia-beacon-api.publicnode.com"
```

{% endtab %}

{% tab title="Load test" %}
Load tests intended for more time consuming run. Beacon nodes are put under heavy load.

These tests include simulated workloads for an increasing number of validators, and the process takes some time (approximately \~33 minutes). It is normal to observe some warnings during the simulations.

A file with detailed results about simulations done is saved at the current working directory (configurable by `--simulation-file-dir` flag).

**Pre-requisites**

* Running beacon node(s) towards which tests will be executed, supplied to `--endpoints` flag. It is important that the node is expecting to handle huge load and that it is **not** a publicly accessible one, which can block you.

**Example run**

```sh
charon alpha test beacon \
  --endpoints="http://127.0.0.1:5052/" \
  --load-test
```

{% endtab %}
{% endtabs %}

### Test validator client

Run tests towards your validator client, to evaluate its effectiveness for a Distributed Validator cluster.

Default endpoint for validator and port is used at `127.0.0.1:3600`. This can be changed by supplying different endpoint to the `--validator-api-address` flag.

#### Pre-requisites

* Running validator client towards which tests will be executed.

#### Example run

```sh
charon alpha test validator
```

### Test MEV relay

Run tests towards MEV relays, to evaluate their effectiveness for a Distributed Validator cluster. If MEV-Boost clients are configured for the distributed validator nodes, it is of utmost importance that the relays they connect to are fast and reliable. If not, the chance of missing a block proposal increases significantly. Supplying `--beacon-node-endpoint` and `--load-test` flags allows the test to ask relays for real MEV headers, increasing the accuracy (and duration) of this test.

At least 1 endpoint is required to be supplied to the `--endpoints` flag.

{% tabs %}
{% tab title="Executable" %}
{% tabs %}
{% tab title="Regular Test" %}
**Pre-requisites**

* Running MEV relay(s) towards which tests will be executed.

**Example run**

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

{% endtab %}

{% tab title="Load Test" %}
**Pre-requisites**

* Running MEV relay(s) towards which tests will be executed.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
charon alpha test mev \
  --endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --load-test \
  --beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com"
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="Docker" %}
{% tabs %}
{% tab title="Regular Test" %}
**Pre-requisites**

* Running MEV relay(s) towards which tests will be executed.

**Example run**

```sh
docker run obolnetwork/charon:v1.9.0 alpha test mev \
  --endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz"
```

{% endtab %}

{% tab title="Load Test" %}
**Pre-requisites**

* Running MEV relay(s) towards which tests will be executed.
* Running beacon node which will be used for fetching data required by the MEV relay for block creation, supplied to `--beacon-node-endpoint`. There is no restrictions on the node and a public one can be used.

**Example run**

```sh
docker run obolnetwork/charon:v1.9.0 alpha test mev \
  --endpoints="\
https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b1cb359caa092c71bbded0bae5b5ea401aab7e@aestus.live,\
https://0xa7ab7a996c8584251c8f925da3170bdfd6ebc75d50f5ddc4050a6fdc77f2a3b5fce2cc750d0865e05d7228af97d69561@agnostic-relay.net,\
https://0x8b5d2e73e2a3a55c6c87b8b6eb92e0149a125c852751db1422fa951e42a09b82c142c3ea98d0d9930b056a3bc9896b8f@bloxroute.max-profit.blxrbdn.com,\
https://0xac6e77dfe25ecd6110b8e780608cce0dab71fdd5ebea22a16c0205200f2f8e2e3ad3b71d3499c54ad14d6c21b41a37ae@boost-relay.flashbots.net,\
https://0xa1559ace749633b997cb3fdacffb890aeebdb0f5a3b6aaa7eeeaf1a38af0a8fe88b9e4b1f61f236d2e64d95733327a62@relay.ultrasound.money,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz,\
https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz" \
  --load-test \
  --beacon-node-endpoint="https://ethereum-beacon-api.publicnode.com"
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Test machine and network performance

Run tests of your machine and network, to evaluate their effectiveness for a Distributed Validator cluster. Distributed Validators need stable, low-latency, internet, a reasonable amount of RAM, and a highly performant disk drive for storage. This test aims to analyse these requirements to give an overview of the systems suitability.

{% tabs %}
{% tab title="Executable" %}
**Pre-requisites**

The executable storage tests require `fio` to be installed on your host machine. Read more about `fio` [here](https://fio.readthedocs.io/en/latest/fio_doc.html).

**Example run**

```sh
charon alpha test infra
```

{% endtab %}

{% tab title="Docker" %}
**Example run**

```sh
docker run -u $(id -u):$(id -g) --rm -v "$(pwd):/opt/charon/test" obolnetwork/charon:v1.9.0 alpha test infra \
        --disk-io-test-file-dir=/opt/charon/test
```

{% endtab %}
{% endtabs %}
