Skip to content

Commit

Permalink
Document system requirements (#421)
Browse files Browse the repository at this point in the history
* Document system requirements

* simplify

* update system reqs

* fix link errors

* more lint fixes

* adjust ups requirement
  • Loading branch information
alexandratran authored Dec 4, 2024
1 parent a490f08 commit 0c2591a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 21 deletions.
8 changes: 6 additions & 2 deletions docs/get-started/checkpoint-start.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Start Teku from a recent state
description: Start Teku from a recent finalized state using checkpoint sync.
sidebar_position: 4
sidebar_position: 5
---

# Start Teku from a recent state
Expand Down Expand Up @@ -30,9 +30,12 @@ teku --eth1-endpoint=http://localhost:8545 \
```

The command uses the [`--checkpoint-sync-url`](../reference/cli/index.md#checkpoint-sync-url) option
to download the finalized checkpoint state. When using this option, you must delete your existing beacon node database, for example `<data-path>/beacon/db`, to enable Teku to download the new, finalized state for your node.
to download the finalized checkpoint state.
When using this option, you must delete your existing beacon node database, for example
`<data-path>/beacon/db`, to enable Teku to download the new, finalized state for your node.

:::note

You can also download a finalized checkpoint state file, and specify the location using the
[`--initial-state`](../reference/cli/index.md#initial-state) option.
To download the file and name it `state.ssz` run:
Expand All @@ -57,6 +60,7 @@ teku --eth1-endpoint=http://localhost:8545 \
--validator-keys=/Users/me/mainnet/validator/keys:/Users/me/mainnet/validator/passwords \
--initial-state=http://other-node:5051/eth/v2/debug/beacon/states/finalized
```

:::

<!--links-->
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/connect/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Connect to a network",
"position": 3,
"position": 4,
"link": {
"type": "generated-index",
"slug": "/get-started/connect"
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/install/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Install Teku",
"position": 1,
"position": 2,
"link": {
"type": "generated-index",
"slug": "/get-started/install"
Expand Down
6 changes: 4 additions & 2 deletions docs/get-started/manage-memory.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Manage memory
description: Manage Teku's JVM memory usage.
sidebar_position: 5
sidebar_position: 6
---

import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -40,7 +40,9 @@ The node uses more RAM to perform better if it’s available, especially during

## Manage the heap dump

If an out of memory error occurs, the heap dump file is placed in the directory that Teku runs from. The heap dump file is potentially large (1-2GB), to specify the directory to place the file, set the `-XX:HeapDumpPath` Java option to the required path.
If an out of memory error occurs, the heap dump file is placed in the directory that Teku runs from.
The heap dump file can be 1-2 GB in size.
To specify the directory to place the file, set the `-XX:HeapDumpPath` Java option to the required path.

<Tabs>
<TabItem value="Environment variable" label="Environment variable" default>
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/migrate-to-teku.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Migrate to Teku
description: Migrate to Teku from a different Ethereum consensus client.
sidebar_position: 6
sidebar_position: 7
---

# Migrate to Teku
Expand Down
32 changes: 18 additions & 14 deletions docs/get-started/start-teku.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Start Teku
description: Run Teku as a beacon node and/or validator.
sidebar_position: 2
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -67,15 +67,17 @@ Don't pass the validator keys as a command line option to both the beacon node a

:::

By default, [validator clients] can connect to the beacon node at `http://127.0.0.1:5051`. Use the [`--rest-api-interface`](../reference/cli/index.md#rest-api-interface) and [`--rest-api-port`](../reference/cli/index.md#rest-api-port) options to update the address.
By default, [validator clients] can connect to the beacon node at `http://127.0.0.1:5051`.
Use the [`--rest-api-interface`](../reference/cli/index.md#rest-api-interface) and [`--rest-api-port`](../reference/cli/index.md#rest-api-port) options to update the address.

You can specify [`--rest-api-host-allowlist`](../reference/cli/index.md#rest-api-host-allowlist) to allow access to the REST API from specific hostnames.

### Start the validator

To run a validator, connect to a [running beacon node].

Use the [`validator-client`](../reference/cli/subcommands/validator-client.md#validator-client-vc) or [`vc`](../reference/cli/subcommands/validator-client.md#validator-client-vc) subcommand to run a Teku as a validator.
Use the [`validator-client`](../reference/cli/subcommands/validator-client.md#validator-client-vc) or
[`vc`](../reference/cli/subcommands/validator-client.md#validator-client-vc) subcommand to run a Teku as a validator.

```title="Example"
teku validator-client \
Expand Down Expand Up @@ -125,32 +127,36 @@ Content-Length: 0
</TabItem>
</Tabs>

## Exit Codes
## Exit codes

**Exit Code 1**
### Exit code 1

This code indicates a scenario where Teku has exited with a fatal error; however, restarting Teku without changes is a logical step in correcting it. This code represents the error is related to something external to Teku.
This code indicates a scenario where Teku has exited with a fatal error; however, restarting Teku without changes is a logical step in correcting it.
This code represents the error is related to something external to Teku.

Example: If the beacon chain controller has issues starting P2P services on a particular port, the system will exit with a fatal error code of 1. This could correct itself with a restart.

Example 2: If the migrate database command does not successfully migrate the database, Teku will exit with a code 1 fatal error. Restarting the system could correct this.

**Exit Code 2**
### Exit code 2

This code indicates a scenario where Teku has exited with a fatal error. Restarting Teku will not correct this.

Note that most user configuration errors fall into this category.

Example: If you specify an invalid database version in the migrate database command, Teku will exit with a code 2 fatal error. To correct this, make the appropriate changes to the setup and then restart Teku.
Example: If you specify an invalid database version in the migrate database command, Teku will exit with a code 2 fatal error.
To correct this, make the appropriate changes to the setup and then restart Teku.

**Usages**
### Usages

The exit codes for Teku are important to understand so that you know how to approach a restart and mitigate the issue.

The **service unit configuration** file is an example of how status codes can be used. `RestartPreventExitStatus=` and `RestartForceExitStatus=` can be used to automatically restart Teku or stop it in case of failure.
The **service unit configuration** file is an example of how status codes can be used.
`RestartPreventExitStatus=` and `RestartForceExitStatus=` can be used to automatically restart Teku or stop it in case of failure.

[systemd.service](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html) File Example
```
The following is an example of a [`systemd.service`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html) file:

```text
RestartForceExitStatus=1
RestartPreventExitStatus=2
```
Expand All @@ -159,7 +165,5 @@ RestartPreventExitStatus=2

[validator clients]: #start-the-validator
[running beacon node]: #start-the-beacon-node
[Validator keystores]: connect/testnet.md#generate-the-validators-and-send-the-deposits
[password files]: connect/testnet.md#create-a-password-file-for-each-validator-key
[slashable offense]: ../concepts/slashing-protection.md
[single process]: #start-the-clients-in-a-single-process
23 changes: 23 additions & 0 deletions docs/get-started/system-requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: System requirements
description: System requirements to sync and run Teku
sidebar_position: 1
---

# System requirements

The following are the minimum system requirements for running a full node, with Teku as a beacon node and validator client:

- CPU: 4 cores at 2.8 GHz
- Memory: 16 GB RAM
- Storage: SSD with 2 TB free space
- Operating system: 64-bit Linux, Mac OS X, or Windows
- Internet: Broadband internet connection (10 Mbps)

:::note
We also recommend that you have an uninterrupted power supply (UPS) to ensure your node is always available.
However, this is not required.
:::

You can use [Prometheus](../how-to/monitor/use-metrics.md) to check CPU and disk space requirements for Teku.
Grafana provides a [sample Teku dashboard](https://grafana.com/grafana/dashboards/13457).

0 comments on commit 0c2591a

Please sign in to comment.