Skip to content

Commit

Permalink
fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Sep 24, 2024
1 parent c8689e9 commit f0443a8
Show file tree
Hide file tree
Showing 8 changed files with 15,062 additions and 41 deletions.
16 changes: 16 additions & 0 deletions docs/private-networks/concepts/private-network-syncing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,20 @@ When setting up a private network, consider the following:
- Set the network ID and bootnode(s) specific to your private network.
- Implement permissioning features to control network access.

:::warning Experimental feature

`--Xsnapsync-bft-enabled` is an experimental feature. It is not stable and is not fully supported in all versions of Besu. Use this option with caution.

Use `--Xsnapsync-bft-enabled` in private, permissioned networks that use BFT consensus mechanisms.
When enabled, this option allows Besu to use Snap sync on BFT networks. Use this option in combination with the `--sync-mode=SNAP` option. The default is `false`.

:::

Choose the appropriate sync mode based on your private network's requirements and node purposes.

| Sync Mode | Description | Requirements | Method | Limitations |
|-----------|-------------|--------------|--------|-------------|
| Snap | Recommended for fastest sync and lowest storage requirements on Mainnet.| Available as an _experimental feature_ in Besu version 24.7.1 or later | Downloads as many leaves of the trie as possible, reconstructs the trie locally. Snap is faster than Fast sync. | Cannot switch from fast sync to snap sync mid-process. |
| Checkpoint | Efficient sync from a specific checkpoint block configured in the genesis file. | Besu version 22.4.3 or later | Syncs from a checkpoint block defined in the genesis file. Is the fast sync and has the lowest storage requirements. | Not supported for QBFT or IBFT 2.0 networks without a checkpoint configuration. |
| Fast | Default for named networks except the dev development network. | None | Downloads block headers and transaction receipts, verifies chain from genesis block. | Not supported with private transactions. |
| Full | Downloads and verifies the entire blockchain and state from the genesis block. This builds an archive node, with full state history.| None | Downloads entire blockchain, verifies all states from genesis block. | Slowest sync mode, requires the most disk space. |
2 changes: 1 addition & 1 deletion docs/private-networks/get-started/start-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You might need to set [`--tx-pool-limit-by-account-percentage`](../../public-net

:::note Sync nodes for BFT

If you're running a node on a [QBFT](../how-to/configure/consensus/qbft.md) or [IBFT 2.0](../how-to/configure/consensus/ibft.md) network, your node must use [fast sync](../../public-networks/get-started/connect/sync-node.md#fast-synchronization) or [full sync](../../public-networks/get-started/connect/sync-node.md#run-an-archive-node).
If you're running a node on a [QBFT](../how-to/configure/consensus/qbft.md) or [IBFT 2.0](../how-to/configure/consensus/ibft.md) network, your node must use [fast sync](../../public-networks/concepts/sync-node.md#fast-synchronization) or [full sync](../../public-networks/concepts/sync-node.md#run-an-archive-node).
Full sync is set by default.
Expand Down
10 changes: 5 additions & 5 deletions docs/public-networks/concepts/data-storage-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To run a node with Bonsai Tries data storage format, use the command line option
</p>

:::caution important
Do not run an [archive node](../concepts/sync-node.md#run-an-archive-node) with Bonsai Tries.
Do not run an [archive node](sync-node.md#run-an-archive-node) with Bonsai Tries.
Bonsai is designed for retrieving recent data only.
:::

Expand All @@ -35,7 +35,7 @@ You can read more about Bonsai in [Consensys' Guide to Bonsai Tries](https://con

## Forest of Tries

Forest of Tries, also called forest mode, is another method of representing the world state, and is more suitable for [archive nodes](../concepts/sync-node.md#run-an-archive-node).
Forest of Tries, also called forest mode, is another method of representing the world state, and is more suitable for [archive nodes](sync-node.md#run-an-archive-node).

In forest mode, each node in the trie is saved in a key-value store by hash. For each block, the world state is updated with new nodes, leaf nodes, and a new state root. Old leaf nodes remain in the underlying data store. Data is accessed and stored by hash, which increases the size of the database and increases the resources and time needed to access account data.

Expand All @@ -55,9 +55,9 @@ We recommend using [Bonsai Tries](#bonsai-tries) to save disk space.
### Storage requirements

Forest mode uses significantly more memory than Bonsai.
With a [full node](../../concepts/sync-node.md#run-a-full-node), forest mode uses an
With a [full node](sync-node.md#run-a-full-node), forest mode uses an
estimated 750 GB of storage, while Bonsai uses an estimated 650 GB of storage.
[Archive nodes](../../concepts/sync-node.md#run-an-archive-node) must use forest mode, which
[Archive nodes](sync-node.md#run-an-archive-node) must use forest mode, which
uses an estimated 12 TB of storage.

### Accessing data
Expand All @@ -74,7 +74,7 @@ Using `--bonsai-historical-block-limit` doesn't affect the size of the database

### Syncing nodes

The following table shows the ways you can [sync a full node](../../concepts/sync-node.md#run-a-full-node) with the different data storage formats using [fast](../../concepts/sync-node.md#fast-synchronization) and [snap](../../concepts/sync-node.md#snap-synchronization) sync.
The following table shows the ways you can [sync a full node](sync-node.md#run-a-full-node) with the different data storage formats using [fast](sync-node.md#fast-synchronization) and [snap](sync-node.md#snap-synchronization) sync.

| Data storage format | Sync mode | Storage estimate | Can other nodes sync to your node? |
| --- | --- | --- | --- |
Expand Down
69 changes: 38 additions & 31 deletions docs/public-networks/concepts/sync-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Besu supports two node types, commonly referred to as [full nodes](#run-a-full-n
[archive nodes](#run-an-archive-node).

A full node consists of an
[execution and consensus client](../../concepts/node-clients.md#execution-and-consensus-clients),
[execution and consensus client](node-clients.md#execution-and-consensus-clients),
and stores a local copy of the blockchain.
With a full node, you can check current balances, sign and send transactions, and look at current
dapp data.
Expand All @@ -28,7 +28,7 @@ Archive nodes can do everything full nodes do, and they can also access historic
This means that archive nodes require more disk space than full nodes.

Besu must connect with other peers to sync with the network. If your node is having trouble peering,
try [troubleshooting peering](../../how-to/troubleshoot/peering.md).
try [troubleshooting peering](../how-to/troubleshoot/peering.md).

Besu supports several synchronization options for different network types and use cases:

Expand All @@ -41,23 +41,30 @@ For public networks, Besu offers the following sync modes:
- [Fast synchronization](#fast-synchronization)
- [Full synchronization](#run-an-archive-node)

::: note
:::tip

We recommend Snap sync because it follows the Ethereum specification and enables you to serve full historical data, making you a valuable network peer.
We recommend snap sync because it follows the Ethereum specification and enables you to serve full historical data.

:::

| Sync Mode | Description | Requirements | Method | Limitations |
|-----------|-------------|--------------|--------|-------------|
| Snap synchronization | Recommended for fastest sync and lowest storage requirements on Mainnet.| Besu version 22.4.0 or later | Downloads as many leaves of the trie as possible, reconstructs the trie locally. Snap is faster than Fast sync. | Cannot switch from fast sync to snap sync mid-process. |
| Checkpoint synchronization | Efficient sync from a specific checkpoint block configured in the genesis file. | Besu version 22.4.3 or later | Syncs from a checkpoint block defined in the genesis file. Is the fast sync and has the lowest storage requirements. | Not supported for QBFT or IBFT 2.0 networks without a checkpoint configuration. |
| Fast synchronization | Default for named networks except the dev development network. | None | Downloads block headers and transaction receipts, verifies chain from genesis block. | Might become impossible to sync Ethereum mainnet in the future; not supported with private transactions. |
| Full synchronization | Downloads and verifies the entire blockchain and state from the genesis block. This builds an archive node, with full state history.| None | Downloads entire blockchain, verifies all states from genesis block. | Slowest sync mode, requires the most disk space. |
| Snap | Recommended for fastest sync and lowest storage requirements on Mainnet.| Besu version 22.4.0 or later | Downloads as many leaves of the trie as possible, reconstructs the trie locally. Snap is faster than Fast sync. | Cannot switch from fast sync to snap sync mid-process. |
| Checkpoint | Efficient sync from a specific checkpoint block configured in the genesis file. | Besu version 22.4.3 or later | Syncs from a checkpoint block defined in the genesis file. Is the fast sync and has the lowest storage requirements. | |
| Fast | Default for named networks except the dev development network. | None | Downloads block headers and transaction receipts, verifies chain from genesis block. | Might become impossible to sync Ethereum Mainnet in the future. |
| Full | Downloads and verifies the entire blockchain and state from the genesis block. This builds an archive node, with full state history.| None | Downloads entire blockchain, verifies all states from genesis block. | Slowest sync mode, requires the most disk space. |

:::note

Ethereum nodes sync two types of data: chain data (blocks) and world state data. Snap and Checkpoint syncs handle chain data like Fast sync does.
They differ in how they process world state data.
Ethereum nodes sync two types of data: chain data (blocks) and world state data.
Snap and Checkpoint syncs handle chain data similarly to Fast sync, but differ in how they process world state data.

:::

:::note Private network syncing

Private networks can use the same sync methods as public networks, but require differnt configurations.
See [Private network syncing](../../private-networks/concepts/private-network-syncing.md) for more information.

:::

Expand Down Expand Up @@ -86,15 +93,15 @@ Each sync mode also has its own world state database size.

:::note Notes
- As of late 2023, an average Mainnet snap sync consumes around 1000 GB using Bonsai Tries.
Read more about [storage requirements](../../concepts/data-storage-formats.md#storage-requirements)
Read more about [storage requirements](data-storage-formats.md#storage-requirements)
across data storage formats and sync modes.
- Testnets take significantly less time and space to sync.
:::

## Storage

You can store the world state using [Forest of Tries](../../concepts/data-storage-formats.md#forest-of-tries)
or [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries).
You can store the world state using [Forest of Tries](data-storage-formats.md#forest-of-tries)
or [Bonsai Tries](data-storage-formats.md#bonsai-tries).

If you're [running a full node](#run-a-full-node), we recommend using Bonsai Tries for the lowest
storage requirements.
Expand All @@ -109,8 +116,8 @@ You can run a full node using [snap synchronization (snap sync)](#snap-synchroni
:::note Sync nodes for BFT

Snap sync and checkpoint sync are not supported for
[QBFT](../../../private-networks/how-to/configure/consensus/qbft.md) or
[IBFT 2.0](../../../private-networks/how-to/configure/consensus/ibft.md) networks.
[QBFT](../../private-networks/how-to/configure/consensus/qbft.md) or
[IBFT 2.0](../../private-networks/how-to/configure/consensus/ibft.md) networks.

:::

Expand All @@ -121,15 +128,15 @@ Snap sync and checkpoint sync are not supported for
We recommend using snap sync over fast sync because snap sync can be faster than fast sync by
several days (for Mainnet).

We recommend using snap sync with the [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries)
We recommend using snap sync with the [Bonsai](data-storage-formats.md#bonsai-tries)
data storage format for the fastest sync and lowest storage requirements.

:::

Enable snap sync using [`--sync-mode=SNAP`](../../reference/cli/options.md#sync-mode). You need Besu
Enable snap sync using [`--sync-mode=SNAP`](../reference/cli/options.md#sync-mode). You need Besu
version 22.4.0 or later to use snap sync.

Instead of downloading the [state trie](../../concepts/data-storage-formats.md) node by node, snap
Instead of downloading the [state trie](data-storage-formats.md) node by node, snap
sync downloads as many leaves of the trie as possible, and reconstructs the trie locally.

You can't switch from fast sync to snap sync. If your node is blocked in the middle of a fast sync,
Expand All @@ -140,16 +147,16 @@ You can restart Besu during a snap sync in case of hardware or software problems
from the last valid world state and continues to download blocks starting from the last downloaded
block.

See [how to read the Besu metrics charts](../../how-to/monitor/understand-metrics.md) when using
See [how to read the Besu metrics charts](../how-to/monitor/understand-metrics.md) when using
snap sync.

### Checkpoint synchronization

Enable checkpoint sync using [`--sync-mode=CHECKPOINT`](../../reference/cli/options.md#sync-mode).
Enable checkpoint sync using [`--sync-mode=CHECKPOINT`](../reference/cli/options.md#sync-mode).
You need Besu version 22.4.3 or later to use checkpoint sync.

Checkpoint sync behaves like [snap sync](#snap-synchronization), but instead of syncing from the
genesis block, it syncs from a specific checkpoint block configured in the [Besu genesis file](../../concepts/genesis-file.md).
genesis block, it syncs from a specific checkpoint block configured in the [Besu genesis file](genesis-file.md).

Ethereum Mainnet and the Holesky testnet configurations already define default checkpoints, so you
don't have to add this yourself.
Expand All @@ -167,7 +174,7 @@ number, and total difficulty as in the following example.

:::note

If using [Clique](../../../private-networks/how-to/configure/consensus/clique.md) consensus, the
If using [Clique](../../private-networks/how-to/configure/consensus/clique.md) consensus, the
checkpoint must be the beginning of an epoch.

:::
Expand All @@ -188,7 +195,7 @@ the first time or ever need to re-sync, update Besu to a version that supports n

:::

Enable fast sync using [`--sync-mode=FAST`](../../reference/cli/options.md#sync-mode).
Enable fast sync using [`--sync-mode=FAST`](../reference/cli/options.md#sync-mode).

Fast sync downloads the block headers and transaction receipts, and verifies the chain of block
headers from the genesis block.
Expand All @@ -197,16 +204,16 @@ When starting fast sync, Besu first downloads the world state for a recent block
peers (referred to as a pivot block), and then begins fast sync from the genesis block.

Fast sync is the default for named networks specified using the
[`--network`](../../reference/cli/options.md#network) option, except for the `dev` development
[`--network`](../reference/cli/options.md#network) option, except for the `dev` development
network. It's also the default if connecting to Ethereum Mainnet by not specifying the
[`--network`](../../reference/cli/options.md#network) or
[`--genesis-file`](../../reference/cli/options.md#genesis-file) options.
[`--network`](../reference/cli/options.md#network) or
[`--genesis-file`](../reference/cli/options.md#genesis-file) options.

Using fast sync with [private transactions](../../../private-networks/concepts/privacy/index.md)
Using fast sync with [private transactions](../../private-networks/concepts/privacy/index.md)
isn't supported.

You can observe the `besu_synchronizer_fast_sync_*` and `besu_synchronizer_world_state_*`
[metrics](../../how-to/monitor/metrics.md#metrics-list) to monitor fast sync.
[metrics](../how-to/monitor/metrics.md#metrics-list) to monitor fast sync.

:::note

Expand Down Expand Up @@ -247,7 +254,7 @@ In the following example, the pivot block is 0 and the pending state nodes value
means the node isn't syncing against any peers. The fact that state nodes have been downloaded means
at some stage it was syncing.

![Fast synchronization](../../../assets/images/fastsync.png)
![Fast synchronization](../../assets/images/fastsync.png)

The easiest solution in this scenario is to restart fast sync to obtain a new pivot block.

Expand All @@ -257,12 +264,12 @@ The easiest solution in this scenario is to restart fast sync to obtain a new pi

An archive node stores all historical states of the blockchain.
To run an archive node, enable full synchronization (full sync) using
[`--sync-mode=FULL`](../../reference/cli/options.md#sync-mode).
[`--sync-mode=FULL`](../reference/cli/options.md#sync-mode).

Full sync starts from the genesis block and reprocesses all transactions.

:::caution important
Do not run an archive node with the [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries)
Do not run an archive node with the [Bonsai Tries](data-storage-formats.md#bonsai-tries)
data storage format.
Bonsai is designed for retrieving recent data only.
:::
2 changes: 1 addition & 1 deletion docs/public-networks/get-started/migrate-to-besu.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Migrate from a different Ethereum [execution client](../concepts/node-clients.md

To migrate from a different client, [configure Besu as an execution client](connect/mainnet.md#2-start-besu) and connect your [consensus client](../concepts/node-clients.md#consensus-clients) to Besu instead of your original execution client.

To minimize downtime while [Besu syncs](connect/sync-node.md) and avoid downtime penalties, you can sync Besu with a new consensus layer instance. Once Besu has fully synced you can connect it to your existing consensus client.
To minimize downtime while [Besu syncs](../concepts/sync-node.md) and avoid downtime penalties, you can sync Besu with a new consensus layer instance. Once Besu has fully synced you can connect it to your existing consensus client.

Find guides to switch from specific clients on the [client diversity website](https://clientdiversity.org/#switch).
4 changes: 2 additions & 2 deletions docs/public-networks/get-started/start-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ To define a genesis configuration, create a genesis file (for example, `genesis.

## Syncing and storage

By default, Besu syncs to the current state of the blockchain using [fast sync](connect/sync-node.md#fast-synchronization) in:
By default, Besu syncs to the current state of the blockchain using [fast sync](../concepts/sync-node.md#fast-synchronization) in:

- Networks specified using [`--network`](../reference/cli/options.md#network) except for the `dev` development network.
- Ethereum Mainnet.

We recommend using [snap sync](connect/sync-node.md#snap-synchronization) for a faster sync, by starting Besu with [`--sync-mode=SNAP`](../reference/cli/options.md#sync-mode).
We recommend using [snap sync](../concepts/sync-node.md#snap-synchronization) for a faster sync, by starting Besu with [`--sync-mode=SNAP`](../reference/cli/options.md#sync-mode).

By default, Besu stores data in the [Forest of Tries](../concepts/data-storage-formats.md#forest-of-tries) format. We recommend using [Bonsai Tries](../concepts/data-storage-formats.md#bonsai-tries) for lower storage requirements, by starting Besu with [`--data-storage-format=BONSAI`](../reference/cli/options.md#data-storage-format).

Expand Down
2 changes: 1 addition & 1 deletion docs/public-networks/how-to/connect/manage-peers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ In detail, the P2P discovery process is as follows:
as network details, what the peer believes to be the current chain head, and its list of neighbors.
From this point on any traffic to that peer is only done using TCP.

5. Depending on the [synchronization method](../../concepts/connect/sync-node.md), a common block
5. Depending on the [synchronization method](../../concepts/sync-node.md), a common block
(the pivot block) is selected that all connected peers (default of 5) have, and Besu syncs from
that block till it gets to chain head.
Log messages look like `Downloading world state from peers for pivot block .......`.
Expand Down
Loading

0 comments on commit f0443a8

Please sign in to comment.