mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use clap::{App, Arg};
|
||||
use strum::VariantNames;
|
||||
|
||||
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
App::new("beacon_node")
|
||||
@@ -148,7 +149,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
If a DNS address is provided, the enr-address is set to the IP address it resolves to and \
|
||||
does not auto-update based on PONG responses in discovery. \
|
||||
Set this only if you are sure other nodes can connect to your local node on this address. \
|
||||
Discovery will automatically find your external address,if possible.")
|
||||
Discovery will automatically find your external address, if possible.")
|
||||
.requires("enr-udp-port")
|
||||
.takes_value(true),
|
||||
)
|
||||
@@ -229,8 +230,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-disable-legacy-spec")
|
||||
.long("http-disable-legacy-spec")
|
||||
.help("Disable serving of legacy data on the /config/spec endpoint. May be \
|
||||
disabled by default in a future release.")
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-spec-fork")
|
||||
.long("http-spec-fork")
|
||||
.value_name("FORK")
|
||||
.help("Serve the spec for a specific hard fork on /eth/v1/config/spec. It should \
|
||||
not be necessary to set this flag.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-enable-tls")
|
||||
@@ -312,6 +320,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
and never provide an untrusted URL.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("monitoring-endpoint-period")
|
||||
.long("monitoring-endpoint-period")
|
||||
.value_name("SECONDS")
|
||||
.help("Defines how many seconds to wait between each message sent to \
|
||||
the monitoring-endpoint. Default: 60s")
|
||||
.requires("monitoring-endpoint")
|
||||
.takes_value(true),
|
||||
)
|
||||
|
||||
/*
|
||||
* Standard staking flags
|
||||
@@ -320,9 +337,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("staking")
|
||||
.long("staking")
|
||||
.help("Standard option for a staking beacon node. Equivalent to \
|
||||
`lighthouse bn --http --eth1 `. This will enable the http server on localhost:5052 \
|
||||
and try connecting to an eth1 node on localhost:8545")
|
||||
.help("Standard option for a staking beacon node. This will enable the HTTP server \
|
||||
on localhost:5052 and import deposit logs from the execution node. This is \
|
||||
equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge")
|
||||
.takes_value(false)
|
||||
)
|
||||
|
||||
@@ -377,72 +394,87 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("1000")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("eth1-cache-follow-distance")
|
||||
.long("eth1-cache-follow-distance")
|
||||
.value_name("BLOCKS")
|
||||
.help("Specifies the distance between the Eth1 chain head and the last block which \
|
||||
should be imported into the cache. Setting this value lower can help \
|
||||
compensate for irregular Proof-of-Work block times, but setting it too low \
|
||||
can make the node vulnerable to re-orgs.")
|
||||
.takes_value(true)
|
||||
)
|
||||
/*
|
||||
* Execution Layer Integration
|
||||
*/
|
||||
.arg(
|
||||
Arg::with_name("merge")
|
||||
.long("merge")
|
||||
.help("Enable the features necessary to run merge testnets. This feature \
|
||||
is unstable and is for developers only.")
|
||||
.takes_value(false),
|
||||
.help("Deprecated. The feature activates automatically when --execution-endpoint \
|
||||
is supplied.")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("execution-endpoints")
|
||||
.long("execution-endpoints")
|
||||
.value_name("EXECUTION-ENDPOINTS")
|
||||
.help("One or more comma-delimited server endpoints for HTTP JSON-RPC connection. \
|
||||
If multiple endpoints are given the endpoints are used as fallback in the \
|
||||
given order. Also enables the --merge flag. \
|
||||
If this flag is omitted and the --eth1-endpoints is supplied, those values \
|
||||
will be used. Defaults to http://127.0.0.1:8545.")
|
||||
Arg::with_name("execution-endpoint")
|
||||
.long("execution-endpoint")
|
||||
.value_name("EXECUTION-ENDPOINT")
|
||||
.alias("execution-endpoints")
|
||||
.help("Server endpoint for an execution layer JWT-authenticated HTTP \
|
||||
JSON-RPC connection. Uses the same endpoint to populate the \
|
||||
deposit cache.")
|
||||
.takes_value(true)
|
||||
.requires("execution-jwt")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("execution-jwt")
|
||||
.long("execution-jwt")
|
||||
.value_name("EXECUTION-JWT")
|
||||
.alias("jwt-secrets")
|
||||
.help("File path which contains the hex-encoded JWT secret for the \
|
||||
execution endpoint provided in the --execution-endpoint flag.")
|
||||
.requires("execution-endpoint")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("jwt-secrets")
|
||||
.long("jwt-secrets")
|
||||
.value_name("JWT-SECRETS")
|
||||
.help("One or more comma-delimited file paths which contain the corresponding hex-encoded \
|
||||
JWT secrets for each execution endpoint provided in the --execution-endpoints flag. \
|
||||
The number of paths should be in the same order and strictly equal to the number \
|
||||
of execution endpoints provided.")
|
||||
.takes_value(true)
|
||||
.requires("execution-endpoints")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("jwt-id")
|
||||
.long("jwt-id")
|
||||
.value_name("JWT-ID")
|
||||
Arg::with_name("execution-jwt-id")
|
||||
.long("execution-jwt-id")
|
||||
.value_name("EXECUTION-JWT-ID")
|
||||
.alias("jwt-id")
|
||||
.help("Used by the beacon node to communicate a unique identifier to execution nodes \
|
||||
during JWT authentication. It corresponds to the 'id' field in the JWT claims object.\
|
||||
Set to empty by deafult")
|
||||
Set to empty by default")
|
||||
.requires("execution-jwt")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("jwt-version")
|
||||
.long("jwt-version")
|
||||
.value_name("JWT-VERSION")
|
||||
Arg::with_name("execution-jwt-version")
|
||||
.long("execution-jwt-version")
|
||||
.value_name("EXECUTION-JWT-VERSION")
|
||||
.alias("jwt-version")
|
||||
.help("Used by the beacon node to communicate a client version to execution nodes \
|
||||
during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.\
|
||||
Set to empty by deafult")
|
||||
Set to empty by default")
|
||||
.requires("execution-jwt")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("suggested-fee-recipient")
|
||||
.long("suggested-fee-recipient")
|
||||
.value_name("SUGGESTED-FEE-RECIPIENT")
|
||||
.help("Once the merge has happened, this address will receive transaction fees \
|
||||
collected from any blocks produced by this node. Defaults to a junk \
|
||||
address whilst the merge is in development stages. THE DEFAULT VALUE \
|
||||
WILL BE REMOVED BEFORE THE MERGE ENTERS PRODUCTION")
|
||||
.requires("merge")
|
||||
.help("Emergency fallback fee recipient for use in case the validator client does \
|
||||
not have one configured. You should set this flag on the validator \
|
||||
client instead of (or in addition to) setting it here.")
|
||||
.requires("execution-endpoint")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("payload-builders")
|
||||
.long("payload-builders")
|
||||
Arg::with_name("builder")
|
||||
.long("builder")
|
||||
.alias("payload-builder")
|
||||
.alias("payload-builders")
|
||||
.help("The URL of a service compatible with the MEV-boost API.")
|
||||
.requires("merge")
|
||||
.requires("execution-endpoint")
|
||||
.takes_value(true)
|
||||
)
|
||||
|
||||
@@ -623,6 +655,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
[disabled by default].")
|
||||
.requires("slasher")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("slasher-backend")
|
||||
.long("slasher-backend")
|
||||
.value_name("DATABASE")
|
||||
.help("Set the database backend to be used by the slasher.")
|
||||
.takes_value(true)
|
||||
.possible_values(slasher::DatabaseBackend::VARIANTS)
|
||||
.requires("slasher")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("wss-checkpoint")
|
||||
.long("wss-checkpoint")
|
||||
@@ -709,4 +750,94 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("250")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("paranoid-block-proposal")
|
||||
.long("paranoid-block-proposal")
|
||||
.help("Paranoid enough to be reading the source? Nice. This flag reverts some \
|
||||
block proposal optimisations and forces the node to check every attestation \
|
||||
it includes super thoroughly. This may be useful in an emergency, but not \
|
||||
otherwise.")
|
||||
.hidden(true)
|
||||
.takes_value(false)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("builder-fallback-skips")
|
||||
.long("builder-fallback-skips")
|
||||
.help("If this node is proposing a block and has seen this number of skip slots \
|
||||
on the canonical chain in a row, it will NOT query any connected builders, \
|
||||
and will use the local execution engine for payload construction.")
|
||||
.default_value("3")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("builder-fallback-skips-per-epoch")
|
||||
.long("builder-fallback-skips-per-epoch")
|
||||
.help("If this node is proposing a block and has seen this number of skip slots \
|
||||
on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query \
|
||||
any connected builders, and will use the local execution engine for \
|
||||
payload construction.")
|
||||
.default_value("8")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("builder-fallback-epochs-since-finalization")
|
||||
.long("builder-fallback-epochs-since-finalization")
|
||||
.help("If this node is proposing a block and the chain has not finalized within \
|
||||
this number of epochs, it will NOT query any connected builders, \
|
||||
and will use the local execution engine for payload construction. Setting \
|
||||
this value to anything less than 2 will cause the node to NEVER query \
|
||||
connected builders. Setting it to 2 will cause this condition to be hit \
|
||||
if there are skips slots at the start of an epoch, right before this node \
|
||||
is set to propose.")
|
||||
.default_value("3")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("builder-fallback-disable-checks")
|
||||
.long("builder-fallback-disable-checks")
|
||||
.help("This flag disables all checks related to chain health. This means the builder \
|
||||
API will always be used for payload construction, regardless of recent chain \
|
||||
conditions.")
|
||||
.takes_value(false)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("builder-profit-threshold")
|
||||
.long("builder-profit-threshold")
|
||||
.value_name("WEI_VALUE")
|
||||
.help("The minimum reward in wei provided to the proposer by a block builder for \
|
||||
an external payload to be considered for inclusion in a proposal. If this \
|
||||
threshold is not met, the local EE's payload will be used. This is currently \
|
||||
*NOT* in comparison to the value of the local EE's payload. It simply checks \
|
||||
whether the total proposer reward from an external payload is equal to or \
|
||||
greater than this value. In the future, a comparison to a local payload is \
|
||||
likely to be added. Example: Use 250000000000000000 to set the threshold to \
|
||||
0.25 ETH.")
|
||||
.default_value("0")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("count-unrealized")
|
||||
.long("count-unrealized")
|
||||
.hidden(true)
|
||||
.help("Enables an alternative, potentially more performant FFG \
|
||||
vote tracking method.")
|
||||
.takes_value(true)
|
||||
.default_value("true")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("count-unrealized-full")
|
||||
.long("count-unrealized-full")
|
||||
.hidden(true)
|
||||
.help("Stricter version of `count-unrealized`.")
|
||||
.takes_value(true)
|
||||
.default_value("false")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("reset-payload-statuses")
|
||||
.long("reset-payload-statuses")
|
||||
.help("When present, Lighthouse will forget the payload statuses of any \
|
||||
already-imported blocks. This can assist in the recovery from a consensus \
|
||||
failure caused by the execution layer.")
|
||||
.takes_value(false)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user