Skip to content

Commit

Permalink
Merge pull request #260 from gnosischain/259-checkpoint-sync
Browse files Browse the repository at this point in the history
259 checkpoint sync
  • Loading branch information
alebanzas authored Nov 24, 2022
2 parents 5f94de9 + 51b84ef commit b059413
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 46 deletions.
64 changes: 57 additions & 7 deletions docs/node/guide/beacon/lighthouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,72 @@ title: Lighthouse

# Run Beacon Node: Lighthouse

:::danger
:::caution Version check

This client is not yet ready for public use. Validators are encouraged to run Teku or Lodestar in the interim.
This page's content is up-to-date for [Lighthouse v3.3.0](https://github.com/sigp/lighthouse/releases/tag/v3.3.0).

:::

:::caution Prerequisites

The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](../execution/) for more information.

:::

## Overview

Lighthouse is an Ethereum and Gnosis consensus layer client written in Rust by [Sigma Prime](https://lighthouse.sigmaprime.io/).

### Key Links

:::info Download Lighthouse

Visit Lighthouse's page on how to download Lighthouse.

https://lighthouse-book.sigmaprime.io/installation.html

:::

:::tip Learn More about Lighthouse

- Lighthouse Repo: [https://github.com/sigp/lighthouse](https://github.com/sigp/lighthouse)
- Lighthouse Documentation: [https://lighthouse-book.sigmaprime.io/](https://lighthouse-book.sigmaprime.io/)

:::

:::info
- Gnosis' Lighthouse repo has sample Dockerfiles and configs
- [https://github.com/gnosischain/lighthouse-client](https://github.com/gnosischain/lighthouse-client)
:::info
Gnosis maintains a repo with sample Lighthouse Dockerfiles and configs

[https://github.com/gnosischain/lighthouse-client](https://github.com/gnosischain/lighthouse-client)

:::

| Content | Link |
| --------------- | --------------------------------------------------------- |
| Release Page | https://github.com/sigp/lighthouse/releases/ |
| Docker Images | https://hub.docker.com/repository/docker/sigp/lighthouse/ |
| Lighthouse Docs | https://lighthouse-book.sigmaprime.io/ |
| Github Repo | https://github.com/sigp/lighthouse |

### Checkpoint Sync

We recommend the use of Checkpoint sync to sync your Beacon Node quickly, and avoid long range attacks.

Gnosis provides a checkpoint sync server at https://checkpoint.gnosischain.com/.

```shell
# Usage
$ lighthouse bn
--checkpointSyncUrl https://checkpoint.gnosischain.com/
```

:::info More about Checkpoint Sync

- Lighthouse's [Checkpoint Sync docs](https://lighthouse-book.sigmaprime.io/checkpoint-sync.html)
- Gnosis' [Checkpoint Sync server Status](https://checkpoint.gnosischain.com/)

:::

## Option 1: Run as a System Process

:::caution
Expand All @@ -39,7 +86,7 @@ Most users should use the `latest-modern` tag, which corresponds to the latest s

:::caution

The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](http://localhost:3000/node/guide/execution) for more information.
The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](../execution/) for more information.

:::

Expand Down Expand Up @@ -120,13 +167,16 @@ services:
expose:
- 4000 # http
volumes:
// highlight-start
- /home/$USER/gnosis/consensus/data:/data
- /home/$USER/gnosis/jwtsecret/jwt.hex:/jwt.hex
// highlight-end
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
command: |
lighthouse
beacon_node
// highlight-next-line
--network=gnosis
--disable-upnp
--datadir=/data
Expand All @@ -144,10 +194,10 @@ services:
--metrics
--metrics-port=5054
--metrics-address=0.0.0.0
// highlight-next-line
--checkpoint-sync-url=https://checkpoint.gnosischain.com/
logging:
driver: "local"
// highlight-end

networks:
gnosis_net:
Expand Down
78 changes: 61 additions & 17 deletions docs/node/guide/beacon/lodestar.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,79 @@ title: Lodestar

# Run Beacon Node: Lodestar

An Ethereum consensus client by [ChainSafe](https://lodestar.chainsafe.io/).
:::caution Version check

:::tip Learn more about Lodestar
This page's content is up-to-date for [Lodestar v1.2.2](https://github.com/ChainSafe/lodestar/releases/tag/v1.2.2).

- [General Docs](https://chainsafe.github.io/lodestar/)
- [CLI Reference](https://chainsafe.github.io/lodestar/reference/cli/)
:::

:::caution Prerequisites

The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](../execution/)) for more information.

:::

:::info
- Gnosis' Lodestar repo has sample Dockerfiles and configs
- [https://github.com/gnosischain/lodestar-client](https://github.com/gnosischain/lodestar-client)
## Overview

- An Ethereum consensus client by [ChainSafe](https://lodestar.chainsafe.io/).

### Key Links

:::info Download Lodestar

Visit Lodestar's docs on how to download Lodestar.

https://chainsafe.github.io/lodestar/

:::
## Option 1: Run as a System Process

:::caution
:::tip

In progress
Gnosis' maintains a repo with sample Lodestar Dockerfiles and configs

[https://github.com/gnosischain/lodestar-client](https://github.com/gnosischain/lodestar-client)

:::

## Option 2: Using Docker

Images are referenced under the following pattern `chainsafe/lodestar:{image-tag}` with the `image-tag` referring to the image available on [Docker Hub](https://hub.docker.com/r/chainsafe/lodestar/tags).
| Content | Link |
| ------------- | --------------------------------------------------- |
| Release Page | https://github.com/ChainSafe/lodestar/releases/ |
| Docker Images | https://hub.docker.com/r/chainsafe/lodestar/tags |
| General Docs | https://chainsafe.github.io/lodestar/ |
| CLI Reference | https://chainsafe.github.io/lodestar/reference/cli/ |

### Checkpoint Sync

We recommend the use of Checkpoint sync to sync your Beacon Node quickly, and avoid long range attacks.

Gnosis provides a checkpoint sync server at https://checkpoint.gnosischain.com/.

```shell
# Usage
$ lodestar beacon
--checkpointSyncUrl https://checkpoint.gnosischain.com/
```

:::info More about Checkpoint Sync

- Lodestar's [Checkpoint Sync docs](https://chainsafe.github.io/lodestar/usage/beacon-management/#checkpoint-sync)
- Gnosis' [Checkpoint Sync server Status](https://checkpoint.gnosischain.com/)

:::

## Option 1: Run as a System Process

:::caution

The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](http://localhost:3000/node/guide/execution) for more information.
In progress

:::

## Option 2: Run using Docker

Images are referenced under the following pattern `chainsafe/lodestar:{image-tag}` with the `image-tag` referring to the image available on [Docker Hub](https://hub.docker.com/r/chainsafe/lodestar/tags).

### 1. Folder Structure

Create new folders:
Expand Down Expand Up @@ -98,7 +140,6 @@ services:
logging:
driver: "local"

// highlight-start
consensus:
container_name: consensus
image: chainsafe/lodestar:latest
Expand All @@ -112,16 +153,20 @@ services:
expose:
- 4000
volumes:
// highlight-start
- /home/$USER/gnosis/consensus/data:/data
- /home/$USER/gnosis/jwtsecret/jwt.hex:/jwt.hex
// highlight-end
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- NODE_OPTIONS=--max-old-space-size=6144
command: |
beacon
// highlight-next-line
--network=gnosis
--dataDir=/data
// highlight-next-line
--preset=gnosis
--eth1=true
--execution.urls=http://execution:8551
Expand All @@ -137,11 +182,10 @@ services:
--targetPeers=50
--metrics=true
--metrics.port=5054
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
// highlight-next-line
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
logging:
driver: "local"
// highlight-end

networks:
gnosis_net:
name: gnosis_net
Expand Down
61 changes: 50 additions & 11 deletions docs/node/guide/beacon/teku.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,63 @@ title: Teku

# Run Beacon Node: Teku

:::caution Version check

This page's content is up-to-date for [Teku v22.11.0](https://github.com/ConsenSys/teku/releases/tag/22.11.0).

:::

:::caution
The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](../execution/) for more information.
:::

## Overview

Teku is a consensus client built to meet institutional needs and security requirements. Built by PegaSys, an arm of ConsenSys, who are dedicated to building enterprise-ready clients and tools for interacting with the core Ethereum platform. More information on [Teku](https://consensys.net/knowledge-base/ethereum-2/teku/).

:::tip Learn more about Teku
### Key Links

:::info Download Teku

- [Teku Docs](https://docs.teku.consensys.net/en/latest/)
- [Teku CLI Reference](https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/)
Visit Teku's page on how to download Lodestar.

https://docs.teku.consensys.net/en/latest/

:::

:::info
:::tip

- Gnosis' Teku repo has sample Dockerfiles and configs
Gnosis' maintains a repo with sample Teku Dockerfiles and configs
- [https://github.com/gnosischain/teku-client](https://github.com/gnosischain/teku-client)

:::

| Content | Link |
| ------------------ | ------------------------------------------------------------------- |
| Release Page | https://github.com/ConsenSys/teku/releases |
| Docker Images | https://hub.docker.com/r/consensys/teku |
| Teku Docs | https://docs.teku.consensys.net/en/latest/ |
| Teku CLI Reference | https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/ |

### Checkpoint Sync

We recommend the use of Checkpoint sync to sync your Beacon Node quickly, and avoid long range attacks.

Gnosis provides a checkpoint sync server at https://checkpoint.gnosischain.com/.

```shell
# Usage
$ teku
--initial-state https://checkpoint.gnosischain.com/
```

:::info More about Checkpoint Sync

- Teku's [Checkpoint Sync docs](https://docs.teku.consensys.net/en/latest/HowTo/Get-Started/Checkpoint-Start/)
- Gnosis' [Checkpoint Sync server Status](https://checkpoint.gnosischain.com/)

:::

## Option 1: Run as a System Process

:::caution
Expand All @@ -32,9 +73,6 @@ In progress

Images are referenced under the following pattern `consensys/teku:{image-tag}` with the `image-tag` referring to the image available on [Docker Hub](https://hub.docker.com/r/consensys/teku/tags).

:::caution
The Beacon Node requires an Execution client in order to operate. See [Step 2: Run Execution Client](http://localhost:3000/node/guide/execution) for more information.
:::

### 1. Folder Structure

Expand Down Expand Up @@ -99,7 +137,6 @@ services:
logging:
driver: "local"

// highlight-start
consensus:
user: "${PUID:-1000}"
container_name: consensus
Expand All @@ -114,13 +151,16 @@ services:
expose:
- 4000
volumes:
// highlight-start
- /home/$USER/gnosis/consensus:/data
- /home/$USER/gnosis/jwtsecret/jwt.hex:/jwt.hex
// highlight-end
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- JAVA_OPTS=-Xmx4g
command: |
// highlight-next-line
--network=gnosis
--data-base-path=/data
--data-storage-archive-frequency=2048
Expand All @@ -144,10 +184,10 @@ services:
--metrics-host-allowlist=*
--metrics-interface=0.0.0.0
--metrics-port=5055
// highlight-next-line
--initial-state=https://checkpoint.gnosischain.com/eth/v2/debug/beacon/states/finalized
logging:
driver: "local"
// highlight-end

networks:
gnosis_net:
Expand All @@ -162,7 +202,6 @@ Add an `.env` file with your user id (`id --user`) in `/home/$USER/gnosis/.env`.
PUID=1000
```


### 4. Start Containers

Start the consensus layer client listed in the compose file:
Expand Down
Loading

0 comments on commit b059413

Please sign in to comment.