Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add node snapshots page with providers #1906

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export default {
content:
pageData.description || "The first modular blockchain network.",
},
],
]
);
},
};
Expand Down Expand Up @@ -533,6 +533,7 @@ function sidebarHome() {
],
},
{ text: "SystemD", link: "/how-to-guides/systemd" },
{ text: "Snapshots", link: "/how-to-guides/snapshots" },
{
text: "Network upgrade process",
link: "/how-to-guides/network-upgrade-process",
Expand Down
13 changes: 12 additions & 1 deletion how-to-guides/consensus-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"
```

:::

</details>

## Storage and pruning configurations
Expand Down Expand Up @@ -196,7 +197,7 @@ min-retain-blocks = 0 # this is the default setting
## Sync types

| Sync mode | Time | Notes |
|------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------|
| ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Block sync | ~3 weeks | Downloads and executes all blocks from genesis to the tip |
| State sync | ~1 hour | Downloads a snapshot of the state then downloads and executes all blocks after that snapshot to the tip. |
| Quick sync | ~5 hours | Downloads the data directory from a node. Time depends on your download speed because the data being downloaded can exceed 1 TB for mainnet. |
Expand Down Expand Up @@ -299,6 +300,16 @@ tar xf celestia-snap.tar -C ~/.celestia-app/data/

:::

::: tip

The [Node Snapshots guide](/how-to-guides/snapshots.md) provides everything you need to quick sync your node:

- Details about pruned and archive snapshots
- A list of snapshot providers for different node types
- Installation and usage instructions for `celestia-snapshot-finder` - a tool that automatically finds and downloads the fastest snapshot for your server location

:::

## Start the consensus node

If you are running celestia-app v1.x.x:
Expand Down
132 changes: 132 additions & 0 deletions how-to-guides/snapshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
description: A guide to using node snapshots and snapshot providers for quick node setup, including how to use the celestia-snapshot-finder tool
---

# Node Snapshots
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Node Snapshots
# Node snapshots


## What are Node Snapshots?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## What are Node Snapshots?
## What are node snapshots?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use sentence case on rest of doc for headings below! I tried to push but hit perms issues.


Node snapshots are pre-synced copies of the blockchain state that allow you to get your node up and running quickly without having to sync from genesis. Think of them as checkpoints - instead of processing every single block since the beginning of the chain, you can start from a recent, verified state.

Among various options for setting up your node, snapshots offer one of the fastest ways to get started. Instead of syncing the entire chain history from the beginning, you can use a snapshot to start from a recent state.

Using snapshots can save you significant time and resources, especially as the blockchain grows larger.

## Pruned vs Archive Snapshots

There are two main types of snapshots available:

### Pruned Snapshots

Pruned snapshots contain only the essential state needed to run a node. They exclude historical data that isn't necessary for current operations, making them much smaller in size. These are ideal for:

- Validator nodes that only need recent state to participate in consensus
- Consensus nodes that don't need complete historical data
- Users who want to get started quickly and aren't concerned with historical queries

### Archive Snapshots

Archive snapshots contain the complete blockchain history, including all historical states. They're larger in size but provide access to the entire chain history. You'll need an archive snapshot if you're:

- Running a DA node that needs to serve historical block data
- Operating a consensus node that needs to support historical queries
- Building an application that requires access to past states

## Available Snapshot Providers

### Mainnet Beta

| Provider | Consensus Node | Bridge Node |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Stake Town | [Pruned](https://services.stake-town.com/home/mainnet/celestia/sync) | - |
| ITRocket | [Pruned](https://itrocket.net/services/mainnet/celestia/) • [Archive](https://itrocket.net/services/mainnet/celestia/) | [Archive](https://itrocket.net/services/mainnet/celestia/) |
| Polkachu | [Pruned](https://polkachu.com/tendermint_snapshots/celestia) • [Archive](https://polkachu.com/archive_snapshots/celestia/) | - |
| kjnodes | [Pruned](https://services.kjnodes.com/mainnet/celestia/snapshot/) • [Archive](https://services.kjnodes.com/mainnet/celestia/snapshot-archive/) | - |
| Tienthuattoan | [Pruned](https://services.tienthuattoan.com/mainnet/celestia/snapshot) | - |
| Noders | [Pruned](https://noders.services/mainnet-networks/celestia/snapshot/) | - |
| QubeLabs | [Archive](https://snaps.qubelabs.io/celestia/) | - |
| CitizenWeb3 | [Pruned](https://staking.citizenweb3.com/chains/celestia?tab=snapshot) | - |
| BlackBlocks | [Archive](https://wiki.blackblocks.io/en/public/services/mainnet/celestia) | [Archive](https://wiki.blackblocks.io/en/public/services/mainnet/celestia) |

### Mocha Testnet

| Provider | Consensus Node | Bridge Node |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Stake Town | [Pruned](https://services.stake-town.com/home/testnet/celestia/sync) | - |
| ITRocket | [Pruned](https://itrocket.net/services/mainnet/celestia/) • [Archive](https://itrocket.net/services/mainnet/celestia/) | [Archive](https://itrocket.net/services/mainnet/celestia/) |
| Polkachu | [Pruned](https://polkachu.com/testnets/celestia/snapshots) | - |
| kjnodes | [Pruned](https://services.kjnodes.com/testnet/celestia/snapshot/) | - |
| Tienthuattoan | [Pruned](https://services.tienthuattoan.com/testnet/celestia/snapshot) | - |
| Noders | [Pruned](https://noders.services/testnet-networks/celestia/snapshot) | - |
| QubeLabs | [Archive](https://snaps.qubelabs.io/celestia/) | - |
| BlackBlocks | [Archive](https://wiki.blackblocks.io/en/public/services/testnet/celestia) | [Archive](https://wiki.blackblocks.io/en/public/services/testnet/celestia) |

## Using celestia-snapshot-finder

The `celestia-snapshot-finder` is a community tool that automatically finds and downloads the fastest available snapshot for your node. It tests download speeds from verified providers and selects the fastest available snapshot based on your location and network conditions.

### Features

- Automatically finds the optimal snapshot from verified providers
- Selects the best option based on file size and download speed
- Supports both consensus and bridge nodes (pruned and archive snapshots)
- Available for multiple platforms (Linux, macOS) with ARM and AMD64 support
- Includes download progress tracking and resume capability

### Installation

You can download pre-built binaries from the [latest release](https://github.com/21state/celestia-snapshot-finder/releases/latest) page:

- Linux: `celestia-snapshot-finder-linux-amd64` or `celestia-snapshot-finder-linux-arm64`
- macOS: `celestia-snapshot-finder-darwin-amd64` or `celestia-snapshot-finder-darwin-arm64`

Or build from source:

```bash
git clone https://github.com/21state/celestia-snapshot-finder.git
cd celestia-snapshot-finder
./build.sh
```

### Usage Examples

A CLI tool for downloading Celestia node snapshots with direct URLs. Supports different node types and snapshot types with automatic or manual selection.

Basic usage:

```bash
celestia-snapshot-finder [node-type] [snapshot-type] [flags]
```

Examples:

```bash
# Download pruned consensus node snapshot
celestia-snapshot-finder consensus pruned

# Download archive bridge node snapshot with manual selection
celestia-snapshot-finder bridge archive --manual
```

Available flags:

```bash
-n, --chain-id string Chain ID (default "celestia")
--debug Enable debug mode with extra information
-h, --help help for celestia-snapshot-finder
-m, --manual Enable manual selection
-v, --version version for celestia-snapshot-finder
```

In automatic mode (default), the tool will:

1. Test download speeds and verify snapshots from all providers
2. Automatically select and use the fastest available option
3. Start downloading from the selected provider

In manual mode (`--manual` flag), the tool will:

1. Test download speeds and verify snapshots from all providers
2. Show you a list of providers with their download speed, snapshot size, and estimated download time
3. Let you select your preferred provider from the list
4. Start downloading from your selected provider
Loading