diff --git a/docs/public-networks/how-to/use-configuration-file/defaults.md b/docs/public-networks/how-to/use-configuration-file/defaults.md new file mode 100644 index 00000000000..90203c8fcda --- /dev/null +++ b/docs/public-networks/how-to/use-configuration-file/defaults.md @@ -0,0 +1,37 @@ +--- +title: Default configurations +sidebar_position: 1 +todo: For future maintenance, this page would be better setup to import single-sourced partials that also serve the cli/options page. However, for PoC, the duplication/poor maintainability is tolerated for now. +--- + +# Default configurations + +Besu is [highly-configurable](index.md#configuration-order-of-precedence), yet its default configurations provide a viable boilerplate. + +This page provides a high level overview of the opinionated default configurations of vanilla Besu. By applying these defaults, a node is optimized for staking. These defaults may be used alongside a [pre-configured profile](profile.md) to support common use cases. + +For example, using the [staking profile](profile.md#staker-profile) with the boilerplate config directs Besu to use Mainnet, creating a staking-optimized node ready to run with a [validator](https://ethereum.org/en/developers/docs/nodes-and-clients/node-architecture/#validators) and [consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/node-architecture/#consensus-client) + +## Configuration + +|Command|Default|Notes| +|---------------------------|--------------------|------------------------------------------| +|[`config-file`](../../reference/cli/options/#config-file)|None|Vanilla Besu assumes no configuration file| + +## Storage + +|Command|Default|Notes| +|---------------------------|--------------------|------------------------------------------| +|[`data-storage-format`](../../reference/cli/options/#data-storage-format)|BONSAI|Besu applies the most space-effiecient storage method| + +## Peering + +|Command|Default|Notes| +|---------------------------|--------------------|------------------------------------------| +|[`discovery-enabled`](../../reference/cli/options/#discovery-enabled)|True|Besu assumes the node will connect P2P| +|[`p2p-enabled`](../../reference/cli/options/#discovery-enabled)|True|Besu assumes the node will connect P2P| +|[`engine-rpc-enabled`](../../reference/cli/options/#engine-rpc-enabled)|True|Besu assumes the Engine API will be required to communicate with the consensus layer| + +:::note +For a comprehensive understanding, all defaults are provided in the [reference](../../reference/cli/options.md). +::: diff --git a/docs/public-networks/how-to/use-configuration-file/index.md b/docs/public-networks/how-to/use-configuration-file/index.md index 3d7f1f34242..91c508617d1 100644 --- a/docs/public-networks/how-to/use-configuration-file/index.md +++ b/docs/public-networks/how-to/use-configuration-file/index.md @@ -7,13 +7,9 @@ tags: - private networks --- -# Use a configuration file +A TOML configuration file simplifies overriding [default configuration settings](defaults.md) and reuse of configurations across node startups. -You can specify command line options in a TOML configuration file. -Save the configuration file and reuse it across node startups. -Specify the configuration file using the [`--config-file`](../../reference/cli/options.md#config-file) CLI option. - -You can also [use a pre-configured profile](profile.md) for some common use cases. +Specify the configuration file using the [`--config-file`](../../reference/cli/options.md#config-file) CLI option. Configuration files may be [used alongside a pre-configured profile](profile.md) for some common use cases. :::note diff --git a/docs/public-networks/how-to/use-configuration-file/profile.md b/docs/public-networks/how-to/use-configuration-file/profile.md index 6b0111e7719..bb6281d3a3d 100644 --- a/docs/public-networks/how-to/use-configuration-file/profile.md +++ b/docs/public-networks/how-to/use-configuration-file/profile.md @@ -1,82 +1,39 @@ --- -sidebar_position: 1 +title: Use a profile +sidebar_position: 2 --- -# Use a profile +# Use a profile -To help you get started quickly, Besu provides pre-configured profiles containing custom settings -for some common use cases. -You can load these profiles using the [`--profile`](../../reference/cli/options.md#profile) CLI option. -For example: +Load a profile using the [`--profile` CLI option](../../reference/cli/options.md#profile). -```bash -besu --config-file=config.toml --profile=staker -``` - -In this example, `config.toml` is the user-provided [configuration file](index.md), and `staker` is -the pre-configured profile containing custom settings. - -Any configuration options explicitly set in the configuration file or command line will overwrite -the same options set in the profile. -See the [configuration order of precedence](index.md#configuration-order-of-precedence) for more information. - -You can use the following profiles: +You can optionally use profiles to extend Besu's configuration. Combined with the [boilerplate configuration](defaults.md), profiles simplify the process of applying vaiable defaults. Besu's pre-configured profiles optimize for the following supported use cases: - [Minimalist staker profile](#minimalist-staker-profile) - [Staker profile](#staker-profile) - [Enterprise/Private profile](#enterpriseprivate-profile) + +:::note + +A configuration explicitly set in the configuration file or command line will +[override the same option/s](index.md#configuration-order-of-precedence) set in the profile. + +::: + ## Minimalist staker profile -For stakers who want to maximize their hardware value but don't want to serve full sets of data to -their peers, Besu provides a minimalist staker profile. -See the +[`--profile=minimalist_staker`](../../reference/cli/options.md#profile) is optimized for stakers who want to maximize their hardware value but don't want to serve full sets of data to their peers, See the [minimalist staker profile on GitHub](https://github.com/hyperledger/besu/blob/8b64023a121ea996ef60e4b7e2299c5807683f90/config/src/main/resources/profiles/minimalist-staker.toml) for the custom settings. -To use the minimalist staker profile, run Besu with -[`--profile`](../../reference/cli/options.md#profile) set to `minimalist_staker`: - -```bash -besu --profile=minimalist_staker -``` - ## Staker profile -For stakers who want to maximize their hardware value and also want to serve full sets of data to -their peers, Besu providers a staker profile. -See the +[`--profile=staker`](../../reference/cli/options.md#profile) is optimized for stakers who want to maximize their hardware value while also serving full sets of data to their peers. See the [staker profile on GitHub](https://github.com/hyperledger/besu/blob/8b64023a121ea996ef60e4b7e2299c5807683f90/config/src/main/resources/profiles/staker.toml) for the custom settings. -To use the staker profile, run Besu with [`--profile`](../../reference/cli/options.md#profile) set to `staker`: - -```bash -besu --profile=staker -``` - ## Enterprise/Private profile -For private network operators who want to minimize confusion by setting sensible defaults, Besu -provides an enterprise/private profile. -This profile is designed to handle specific use cases for private network operators. -See the -[enterprise/private profile on GitHub](https://github.com/hyperledger/besu/blob/8b64023a121ea996ef60e4b7e2299c5807683f90/config/src/main/resources/profiles/enterprise-private.toml) +[`--profile=private` / `--profile=enterprise`](../../reference/cli/options.md#profile) supports private network operators and enterprises by handling specific use cases that apply to private network operators. See the [enterprise/private profile on GitHub](https://github.com/hyperledger/besu/blob/8b64023a121ea996ef60e4b7e2299c5807683f90/config/src/main/resources/profiles/enterprise-private.toml) for the custom settings. - -To use the enterprise/private profile, run Besu with -[`--profile`](../../reference/cli/options.md#profile) set to `enterprise` or `private`: - -```bash -besu --profile=enterprise -``` - -or - -```bash -besu --profile=private -``` - -:::note -`enterprise` and `private` are aliases for the same profile. -::: diff --git a/docs/public-networks/reference/cli/options.md b/docs/public-networks/reference/cli/options.md index a2bea46893a..994d327cc7b 100644 --- a/docs/public-networks/reference/cli/options.md +++ b/docs/public-networks/reference/cli/options.md @@ -10,9 +10,8 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Command line options -This reference describes the syntax of the Hyperledger Besu command line interface (CLI) options. +This reference describes the syntax of the Hyperledger Besu configuration options. :::info @@ -2584,7 +2583,7 @@ UPnP support is often disabled by default in networking firmware. If disabled by :::tip -Use `UPNPP2PONLY` if you wish to enable UPnP for p2p traffic but not JSON-RPC. +Use `UPNPP2PONLY` if you wish to enable UPnP for P2P traffic but not JSON-RPC. ::: @@ -2961,6 +2960,8 @@ Possible values are: - [`staker`](../../how-to/use-configuration-file/profile.md#staker-profile) - [`enterprise` or `private`](../../how-to/use-configuration-file/profile.md#enterpriseprivate-profile) (aliases for the same profile) +The default is `null`. + ### `random-peer-priority-enabled`