Skip to content

Commit

Permalink
Documentation for --checkpoint-sync-url
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha committed Nov 6, 2023
1 parent 98c0f3e commit 967bb52
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/get-started/checkpoint-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ When starting from a recent checkpoint, Teku downloads historic chain data in th

You need access to a beacon node with [REST API enabled] (for example, Teku) to download the finalized checkpoint state file.

Alternatively, you can use a Checkpointz endpoint from [this community-maintained list of checkpoint state endpoints](https://eth-clients.github.io/checkpoint-sync-endpoints/).

:::

The following command downloads a recent finalized checkpoint state from a beacon node, and starts Teku:

```bash
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
--checkpoint-sync-url=https://beaconstate.ethstaker.cc
```

The command uses the [`--initial-state`](../reference/cli/index.md#initial-state) option to download the finalized checkpoint state from the [`/eth/v2/debug/beacon/states/`](https://consensys.github.io/teku/#operation/getEthV1DebugBeaconStatesWithState_id) endpoint on the beacon node (for example, Teku).
The command uses the [`--checkpoint-sync-url`](../reference/cli/index.md#checkpoint-sync-url) option to download the finalized checkpoint state.

:::note

Expand All @@ -34,11 +36,12 @@ You can also download a finalized checkpoint state file, and specify the locatio
curl -o state.ssz -H 'Accept: application/octet-stream' http://other-node:5051/eth/v2/debug/beacon/states/finalized
```

:::

:::tip

See [this community-maintained list of checkpoint state endpoints](https://eth-clients.github.io/checkpoint-sync-endpoints/).
And to start Teku:
```bash
teku --eth1-endpoint=http://localhost:8545 \
--validator-keys=/Users/me/mainnet/validator/keys:/Users/me/mainnet/validator/passwords \
--initial-state=state.ssz
```

:::

Expand Down
40 changes: 40 additions & 0 deletions docs/reference/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,46 @@ See [this community-maintained list of checkpoint state endpoints](https://eth-c

:::

### checkpoint-sync-url

<!--tabs-->

# Syntax

```bash
--checkpoint-sync-url=<URL>
```

# Example

```bash
--checkpoint-sync-url="https://beaconstate.ethstaker.cc"
```

# Environment variable

```bash
TEKU_CHECKPOINT_SYNC_URL="https://beaconstate.ethstaker.cc"
```

# Configuration file

```bash
checkpoint-sync-url: "https://beaconstate.ethstaker.cc"
```

<!--/tabs-->

URL of a Checkpointz endpoint used to boostrap the node.

By default, Teku will try to download the finalized state from the endpoint. If it can't download the finalized state, it will try to download the genesis state.

:::tip

See [this community-maintained list of checkpoint state endpoints](https://eth-clients.github.io/checkpoint-sync-endpoints/).

:::

### logging

<!--tabs-->
Expand Down

0 comments on commit 967bb52

Please sign in to comment.