Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@ This happens when the IPv6 support in Docker is disabled while connecting to an

:::

### Run a node for testing

To run a node for testing purposes with WebSocket enabled:

```bash
docker run -p 8546:8546 --mount type=bind,source=/<myvolume/besu/testnode>,target=/var/lib/besu hyperledger/besu:latest --rpc-ws-enabled --network=dev --data-path=/var/lib/besu
```

## Stop Besu and clean up resources

When done running nodes, you can shut down the node container without deleting resources or you can delete the container after stopping it. Run `docker container ls` and `docker volume ls` to get the container and volume names.
Expand Down
39 changes: 9 additions & 30 deletions docs/private-networks/get-started/start-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ To delete the local block data, delete the `database` directory in the `besu/bui

To define a genesis configuration, create a [genesis file](../../public-networks/concepts/genesis-file.md) (for example, `genesis.json`) and specify the file using the [`--genesis-file`](../../public-networks/reference/options.md#genesis-file) option.

When you specify [`--network=dev`](../../public-networks/reference/options.md#network), Besu uses the development mode genesis configuration with a fixed low difficulty. A node started with [`--network=dev`](../../public-networks/reference/options.md#network) has an empty bootnodes list by default.

Predefined genesis configurations for named networks are in the [Besu source files](https://github.com/besu-eth/besu/tree/master/config/src/main/resources).

## Confirm node is running
Expand Down Expand Up @@ -56,24 +54,21 @@ If you started Besu with the [`--rpc-http-enabled`](../../public-networks/refere
}
```

## Run a node for testing
## Run a node on a private network

To run a node for testing purposes:
To run a node on your private network specifying a genesis file and data directory:

```bash
besu --network=dev --rpc-http-cors-origins="all" --host-allowlist="*" --rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir
besu --genesis-file=<path>/genesis.json --data-path=<data-path> --rpc-http-enabled --bootnodes=<bootnodes>
```

You can also use the following [configuration file](../../public-networks/how-to/configure-besu/index.md) on the command line to start a node with the same options as above:
Where `<data-path>` is the path to the directory to save the chain data to. Ensure you configure a peer discovery method, such as [bootnodes](../how-to/configure/bootnodes.md).

```toml
network="dev"
rpc-http-cors-origins=["all"]
host-allowlist=["*"]
rpc-ws-enabled=true
rpc-http-enabled=true
data-path="/tmp/tmpdata-path"
```
:::note

You might need to set [`--tx-pool-limit-by-account-percentage`](../../public-networks/reference/options.md#tx-pool-limit-by-account-percentage) to 1. The default value is suitable for Mainnet, but may cause issues on private networks.

:::

:::caution

Expand All @@ -85,22 +80,6 @@ The following settings are a security risk in production environments:

:::

## Run a node on a private network

To run a node on your private network specifying a genesis file and data directory:

```bash
besu --genesis-file=<path>/genesis.json --data-path=<data-path> --rpc-http-enabled --bootnodes=<bootnodes>
```

Where `<data-path>` is the path to the directory to save the chain data to. Ensure you configure a peer discovery method, such as [bootnodes](../how-to/configure/bootnodes.md).

:::note

You might need to set [`--tx-pool-limit-by-account-percentage`](../../public-networks/reference/options.md#tx-pool-limit-by-account-percentage) to 1. The default value is suitable for Mainnet, but may cause issues on private networks.

:::

:::info 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,
Expand Down
9 changes: 6 additions & 3 deletions docs/private-networks/how-to/monitor/opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,25 @@ You can also install exporters that send system metrics to OpenTelemetry to moni

</Tabs>

2. Start Besu with the [`--metrics-enabled`](../../../public-networks/reference/options.md#metrics-enabled) and [`--metrics-protocol=opentelemetry`](../../../public-networks/reference/options.md#metrics-protocol) options. For example, run the following command to start a single node:
2. Start Besu with the [`--metrics-enabled`](../../../public-networks/reference/options.md#metrics-enabled) and [`--metrics-protocol=opentelemetry`](../../../public-networks/reference/options.md#metrics-protocol) options.
Specify the [genesis file](../../../public-networks/reference/options.md#genesis-file) for your private network.
If you don't have a private network yet, create one using the [Developer Quickstart](../../tutorials/quickstart.md).
For example:

<Tabs>

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

```bash
OTEL_EXPORTER_OTLP_ENDPOINT=https://<host>:<port> besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry
OTEL_EXPORTER_OTLP_ENDPOINT=https://<host>:<port> besu --genesis-file=<path>/genesis.json --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry
```

</TabItem>

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

```bash
OTEL_EXPORTER_OTLP_ENDPOINT=https://localhost:4317 besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry
OTEL_EXPORTER_OTLP_ENDPOINT=https://localhost:4317 besu --genesis-file=/opt/besu/genesis.json --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry
```

</TabItem>
Expand Down
5 changes: 3 additions & 2 deletions docs/private-networks/how-to/monitor/splunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,16 @@ If running [Besu as a Docker container](../../get-started/install/run-docker-ima
3. Leave other fields with the default values.
4. Save the `besu` index.

3. Run Besu. To start a Besu node running in development mode, run the following command:
3. Run Besu. To start a Besu node on your private network, run the following command.
If you don't have a private network yet, create one using the [Developer Quickstart](../../tutorials/quickstart.md):

```bash
LOGGER=Splunk \
SPLUNK_URL=https://localhost:8088 \
SPLUNK_TOKEN=11111111-1111-1111-1111-1111111111113 \
SPLUNK_SKIPTLSVERIFY=true \
besu \
--network=dev \
--genesis-file=<path>/genesis.json \
--logging=trace
```

Expand Down
9 changes: 4 additions & 5 deletions docs/private-networks/reference/accounts-for-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import TestAccounts from '../../global/test_accounts.md';

# Accounts for testing

You can use existing accounts for testing by including them in the genesis file for a private network. Besu also provides predefined accounts for use in development mode.
You can use existing accounts for testing by including them in the genesis file for a private network. Besu provides predefined test accounts in its `dev.json` genesis file.

## Development mode
## Predefined test accounts

When you start Besu with the [`--network=dev`](../../public-networks/reference/options.md#network) command line option, Besu uses the `dev.json` genesis file by default.

The `dev.json` genesis file defines the following accounts used for testing.
Besu's `dev.json` genesis file defines the following test accounts.
To use them, copy the account entries into the `alloc` section of the genesis file for your test network.

<TestAccounts />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ This happens when the IPv6 support in Docker is disabled while connecting to an

:::

### Run a node for testing

To run a node that mines blocks at a rate suitable for testing purposes with WebSocket enabled:

```bash
docker run -p 8546:8546 --mount type=bind,source=/<myvolume/besu/testnode>,target=/var/lib/besu hyperledger/besu:latest --rpc-ws-enabled --network=dev --data-path=/var/lib/besu
```

### Run a node on Sepolia testnet

To run a node on Sepolia:
Expand Down
4 changes: 1 addition & 3 deletions docs/public-networks/get-started/start-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ To delete the local block data, delete the `database` directory in the `besu/bui

Besu specifies the genesis configuration, and sets the network ID and bootnodes when connecting to [ETH testnets](#run-a-node-on-an-ethereum-testnet), and [Mainnet](#run-a-node-on-ethereum-mainnet).

When you specify [`--network=dev`](../reference/options.md#network), Besu uses the development network genesis configuration, which is intended for local development and testing. A node started with [`--network=dev`](../reference/options.md#network) has an empty bootnodes list by default.

The genesis files defining the genesis configurations are in the [Besu source files](https://github.com/besu-eth/besu/tree/master/config/src/main/resources).

To define a genesis configuration, create a genesis file (for example, `genesis.json`) and specify the file using the [`--genesis-file`](../reference/options.md#genesis-file) option.
Expand All @@ -37,7 +35,7 @@ To define a genesis configuration, create a genesis file (for example, `genesis.

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

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

We recommend using [snap sync](../concepts/node-sync.md#snap-synchronization) for a faster sync, by starting Besu with [`--sync-mode=SNAP`](../reference/options.md#sync-mode).
Expand Down
16 changes: 12 additions & 4 deletions docs/public-networks/how-to/monitor/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,27 @@ To configure Prometheus and run with Besu:
<TabItem value="Syntax">

```bash
besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled
besu --network=ephemery --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled
```

</TabItem>
<TabItem value="Example">

```bash
besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled
besu --network=ephemery --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled
```

</TabItem>
</Tabs>

:::note

Ephemery is a public testnet, so Besu needs a
[consensus client](../../concepts/node-clients.md#consensus-clients) to sync.
See [Run Besu and Teku on a testnet](../../tutorials/besu-teku-testnet.md).

:::

To specify the host and port on which Prometheus accesses Besu, use the
[`--metrics-host`](../../reference/options.md#metrics-host) and
[`--metrics-port`](../../reference/options.md#metrics-port) options.
Expand Down Expand Up @@ -162,14 +170,14 @@ To configure Prometheus and run with Besu pushing to a push gateway:
<TabItem value="Syntax">

```bash
besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1
besu --network=ephemery --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1
```

</TabItem>
<TabItem value="Example">

```bash
besu --network=dev --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1
besu --network=ephemery --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1
```

</TabItem>
Expand Down
21 changes: 15 additions & 6 deletions docs/public-networks/reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ To use discovery v5 bootnodes, set the early access option `--Xv5-discovery-enab
:::

When connecting to Mainnet or public testnets, the default is a predefined list of bootnodes.
In private networks defined using [`--genesis-file`](#genesis-file) or when using
[`--network=dev`](#network), the default is an empty list of bootnodes.
In private networks defined using [`--genesis-file`](#genesis-file), the default is an empty list
of bootnodes.

---

Expand Down Expand Up @@ -2829,7 +2829,6 @@ Possible values include the following:
| `mainnet` | ETH | Production | [`SNAP`](#sync-mode) | PoS network | The main [Ethereum network](https://ethereum.org/en/developers/docs/networks/) |
| `hoodi` | ETH | Test | [`SNAP`](#sync-mode) | PoS network | Multi-client Ethereum testnet [Hoodi](https://hoodi.ethpandaops.io/) |
| `sepolia` | ETH | Test | [`SNAP`](#sync-mode) | PoS network | Multi-client Ethereum testnet [Sepolia](https://sepolia.dev) |
| `dev` | ETH | Development | [`FULL`](#sync-mode) | Dev mode | Local development network for testing |
| `ephemery` | ETH | Test | [`SNAP`](#sync-mode) | PoS network | Multi-client Ethereum testnet [Ephemery](https://ephemery.dev)
| `linea_mainnet` | Linea | Production | [`SNAP`](#sync-mode) | Sequencer-based (zkEVM rollup) | The main [Linea network](https://docs.linea.build/get-started/build/network-info) |
| `linea_sepolia` | Linea | Test | [`SNAP`](#sync-mode) | Sequencer-based (zkEVM rollup) | Linea [Sepolia testnet](https://docs.linea.build/get-started/build/network-info/) |
Expand All @@ -2844,9 +2843,19 @@ Values are case-insensitive, so either `mainnet` or `MAINNET` works.

:::info

- You can't use the `--network` and [`--genesis-file`](#genesis-file) options at the same time.
You can't use the `--network` and [`--genesis-file`](#genesis-file) options at the same time.

- The following networks and testnets are deprecated: ETC (Ethereum Classic) and Mordor.
:::

:::warning Removed networks

Besu no longer supports the `dev`, ETC (Ethereum Classic), and Mordor networks.

Specifying `--network=dev` prevents Besu from starting.
Proof of work mining has been removed, so the development network can't produce blocks.
For local development, use Ephemery (`--network=ephemery`) with a
[consensus client](../concepts/node-clients.md#consensus-clients), or use
[Kurtosis](https://github.com/ethpandaops/ethereum-package).

:::

Expand Down Expand Up @@ -6121,7 +6130,7 @@ sync-mode="SNAP"
The synchronization mode. Use `SNAP` for [snap sync](../concepts/node-sync.md#snap-synchronization) and `FULL` for [full sync](../concepts/node-sync.md#full-synchronization).

- The default is `FULL` when connecting to a private network by not using the [`--network`](#network) option and specifying the [`--genesis-file`](#genesis-file) option.
- The default is `SNAP` when using the [`--network`](#network) option with named networks, except for the `dev` development network. `SNAP` is also the default if running Besu on the default network (Ethereum Mainnet) by specifying neither [network](#network) nor [genesis file](#genesis-file).
- The default is `SNAP` when using the [`--network`](#network) option with named networks. `SNAP` is also the default if running Besu on the default network (Ethereum Mainnet) by specifying neither [network](#network) nor [genesis file](#genesis-file).

:::warning Checkpoint sync

Expand Down
Loading