Skip to content

Commit

Permalink
Add fast sync configuration note (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock authored Jan 31, 2024
1 parent 953618b commit bc1c6bd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 47 deletions.
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 @@ -37,7 +37,7 @@ Note, `Xp2p-peer-lower-bound` is an early access option.

## Limit remote connections

Prevent eclipse attacks when using [`--sync-mode`](../../reference/cli/options.md#sync-mode) and [`--fast-sync-min-peers`](../../reference/cli/options.md#fast-sync-min-peers) on public networks by enabling the [remote connection limits](../../reference/cli/options.md#remote-connections-limit-enabled).
Prevent eclipse attacks when using [`--sync-mode`](../../reference/cli/options.md#sync-mode) and [`--fast-sync-min-peers`](../../reference/cli/options.md##sync-min-peers-fast-sync-min-peers) on public networks by enabling the [remote connection limits](../../reference/cli/options.md#remote-connections-limit-enabled).

In private and permissioned networks with only trusted peers, enabling the remote connection limits is unnecessary and might adversely affect the speed at which nodes can join the network. Limiting remote connections can cause a closed group of peers to form when the number of nodes in the network is slightly higher than [`--max-peers`](../../reference/cli/options.md#max-peers). The nodes in this closed group are all connected to each other and can't accept more connections.

Expand Down
92 changes: 46 additions & 46 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -966,52 +966,6 @@ ethstats-contact="[email protected]"

Contact email address to send to the Ethstats server specified by [`--ethstats`](#ethstats).

### `sync-min-peers`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
--sync-min-peers=<INTEGER>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--sync-min-peers=8
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_FAST_SYNC_MIN_PEERS=8
```

</TabItem>

<TabItem value="Example configuration file" label="Example configuration file">

```bash
sync-min-peers=8
```

</TabItem>

</Tabs>

The minimum number of peers required before starting [sync](../../get-started/connect/sync-node.md). The default is 5.

:::info

This option does not apply to PoS networks.

:::

### `genesis-file`

<Tabs>
Expand Down Expand Up @@ -4555,6 +4509,52 @@ strict-tx-replay-protection-enabled=false

Enables or disables replay protection, in accordance with [EIP-155](https://eips.ethereum.org/EIPS/eip-155), on transactions submitted using JSON-RPC. The default is `false`.

### `sync-min-peers`, `fast-sync-min-peers`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
--sync-min-peers=<INTEGER>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--sync-min-peers=8
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_SYNC_MIN_PEERS=8
```

</TabItem>

<TabItem value="Example configuration file" label="Example configuration file">

```bash
sync-min-peers=8
```

</TabItem>

</Tabs>

The minimum number of peers required before starting [sync](../../get-started/connect/sync-node.md). The default is `5`. Set to `1` to enable static peers to contribute to the initial sync.

:::info

This option does not apply to Proof of Stake networks.

:::

### `sync-mode`

<Tabs>
Expand Down

0 comments on commit bc1c6bd

Please sign in to comment.