Closed macfarla closed 8 months ago
Besu introduces a new feature, the --profile
CLI option. This feature allows users to load existing TOML configuration files from resources, thereby enabling the override of default options.
To use the --profile
CLI option, you need to specify it when running Besu, along with the name of the profile you want to use. For example:
besu --config-file=config.toml --profile=STAKER
In this case, config.toml
is the user-provided configuration file, and STAKER
is the pre-configured profile containing custom settings.
The configuration provider resolves settings in a cascading manner. It prioritizes settings in the following order:
--config-file
option)--profile
option)For instance, if a setting is not found in the environment variables, Besu will look for it in the config.toml
file. If the setting is not found in the config.toml
file, Besu will then look for it in the STAKER.toml
file. If the setting is not found in the STAKER.toml
file, Besu will use the default value for that setting.
The --profile
flag accepts the following profiles:
minimalist-staker
staker
private
and enterprise
(both alias to the same profile)Any configuration options explicitly set in the config file or command line will overwrite any of the defaults set via the profile.
For stakers who want to maximize their hardware value but don't want to serve full sets of data to their peers, Besu offers a minimalist_staker
profile. This profile implements the following defaults:
CHECKPOINT
BONSAI
128
25
To use the minimalist_staker
profile, run Besu with the --profile
option set to minimalist_staker
:
besu --profile=minimalist_staker
Please note that any configuration options explicitly set in the config file or command line will overwrite the defaults set via the minimalist_staker
profile.
For private network operators who want to minimize unexpected confusion by setting sensible defaults, Besu offers an enterprise
or private
profile. This profile is designed to handle specific use-cases for private network operators.
To use the enterprise
or private
profile, run Besu with the --profile
option set to enterprise
or private
:
besu --profile=enterprise
or
besu --profile=private
The enterprise
or private
profile implements the following defaults:
FAST
-sync-min-peers=1
--remote-connections-limit-enabled=false
Legacy / Sequential
--tx-pool-no-local-priority
--tx-pool-limit-by-account-percentage
(set to a value larger than 4 transactions)Please note that any configuration options explicitly set in the config file or command line will overwrite the defaults set via the enterprise
or private
profile.
@non-fungible-nelson draft doco for the profile
feature
nitpick
Besu will use the default value for that setting.
let's make this Besu will use the universal default value for that setting.
We are also missing the staker profile (maybe it can be a note at the end of the minimalist staker , or vice versa)
closing this ticket now that there's a besu-docs ticket specifically for this.
create at least draft documentation for the new profiles, how to use them and how to override defaults etc.