Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/pages/cli/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: Download chain snapshots for faster initial sync of a Tempo node.

Download chain snapshots for faster initial sync. Fetches MDBX state and static files, and generates a `reth.toml` prune config for the target data directory.

By default, `tempo download` downloads a minimal snapshot, which is recommended for validators to save disk space. Use archive snapshots for RPC providers, indexers, and other workloads that need complete historical data.

## Usage

```bash
Expand All @@ -19,23 +21,30 @@ tempo download [flags]
| --- | --- |
| `--chain <network>` | Target network (`mainnet`, `moderato`) |
| `--datadir <path>` | Data directory for downloaded state |
| `-u, --url <url>` | Download a specific snapshot URL |
| `--manifest-url <url>` | Download a specific modular snapshot manifest URL |
| `--list` | List available snapshots |
| `--resumable` | Resume an interrupted download |
| `--archive` | Download an archive snapshot. Recommended for partner validators and RPC nodes. |
| `--minimal` | Download a minimal snapshot. This is the default and is recommended for validators. |
| `--archive` | Download an archive snapshot. Recommended for RPC providers and indexers. |

## Examples

Download the latest recommended mainnet snapshot:
Download the latest mainnet validator snapshot:

```bash
tempo download --chain mainnet --archive
tempo download --chain mainnet
```

Download the latest testnet validator snapshot:

```bash
tempo download --chain moderato
```

Download the latest recommended testnet snapshot:
Download an archive snapshot for an RPC node:

```bash
tempo download --chain moderato --archive
tempo download --chain mainnet --archive
```

List available snapshots:
Expand All @@ -53,7 +62,9 @@ tempo download --list --chain moderato
Resume an interrupted download:

```bash
tempo download --archive --resumable
tempo download --resumable
```

Use the [snapshots viewer](https://snapshots.tempo.xyz/) to compare snapshot profiles and copy generated commands.

Then start your node with [`tempo node`](/cli/node).
14 changes: 11 additions & 3 deletions src/pages/guide/node/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,25 @@ docker logs tempo

## Snapshots

Downloading a snapshot lets your node skip syncing from genesis and start participating much faster. This is recommended for both RPC nodes and validators.
Downloading a snapshot lets your node skip syncing from genesis and start participating much faster. By default, `tempo download` downloads a minimal snapshot, which is recommended for validators to save disk space. RPC providers, indexers, and other workloads that need complete historical data should use archive snapshots.

::::code-group
```bash [Mainnet]
```bash [Validator mainnet]
tempo download --chain mainnet
```
```bash [Validator testnet]
tempo download --chain moderato
```
```bash [Archive mainnet]
tempo download --chain mainnet --archive
```
```bash [Testnet]
```bash [Archive testnet]
tempo download --chain moderato --archive
```
::::

Use [snapshots.tempo.xyz](https://snapshots.tempo.xyz/) to compare minimal and archive sizes, copy generated commands, or copy a snapshot manifest URL for manual downloads.

## Verifying Releases

All release artifacts are cryptographically signed. We recommend verifying signatures before running any binary.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/guide/node/rpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RPC nodes provide API access to the Tempo network without participating in conse

```bash /dev/null/quickstart.sh#L1-15
# Download snapshot (this will help you sync much faster)
tempo download --archive
tempo download --chain mainnet --archive

# Run node
tempo node \
Expand Down
34 changes: 31 additions & 3 deletions src/pages/guide/node/validator-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,45 @@ Once the Tempo team adds your validator on-chain, it will enter the active set i

The process for running a validator node is very similar to [running a full node](/guide/node/rpc).

You should start by downloading the latest snapshot. Downloading the snapshot allows your validator to start participating in consensus much faster.
You should start by downloading the latest snapshot. By default, `tempo download` downloads a minimal snapshot, which allows your validator to start participating in consensus much faster while avoiding archive data that validators do not need.

::::code-group
```bash [Mainnet]
tempo download --chain mainnet --archive
tempo download --chain mainnet
```
```bash [Testnet]
tempo download --chain moderato --archive
tempo download --chain moderato
```
::::

If you cannot use `tempo download`, copy the manifest URL from [snapshots.tempo.xyz](https://snapshots.tempo.xyz/) and download only the minimal components: `state` and `headers`. This example requires `curl`, `jq`, `zstd`, and `tar`.

```bash
SNAPSHOT_MANIFEST_URL="<SNAPSHOT_MANIFEST_URL>"
DATADIR="<datadir>"

mkdir -p "$DATADIR"
SNAPSHOT_BASE_URL="${SNAPSHOT_MANIFEST_URL%/manifest.json}"
curl -fsSL "$SNAPSHOT_MANIFEST_URL" -o manifest.json

# Download and extract state.
state_file="$(jq -r '.components.state.file' manifest.json)"
curl -fLO "$SNAPSHOT_BASE_URL/$state_file"
zstd -dc "$state_file" | tar -xf - -C "$DATADIR"

# Download and extract every headers chunk.
jq -r '
.components.headers as $headers
| ($headers.blocks_per_file) as $blocks_per_file
| ((($headers.total_blocks - 1) / $blocks_per_file | floor) + 1) as $chunks
| range(0; $chunks)
| "headers-\(. * $blocks_per_file)-\(((. + 1) * $blocks_per_file) - 1).tar.zst"
' manifest.json | while read -r chunk; do
curl -fLO "$SNAPSHOT_BASE_URL/$chunk"
zstd -dc "$chunk" | tar -xf - -C "$DATADIR"
done
```

Once you've downloaded the snapshot and have been whitelisted on-chain, you can proceed to run the validator node:

::::code-group
Expand Down
Loading