mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
Merge unstable 20230925 into deneb-free-blobs.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use clap::{App, Arg};
|
||||
use clap::{App, Arg, ArgGroup};
|
||||
use strum::VariantNames;
|
||||
use types::ProgressiveBalancesMode;
|
||||
|
||||
@@ -82,11 +82,11 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.help("The address lighthouse will listen for UDP and TCP connections. To listen \
|
||||
over IpV4 and IpV6 set this flag twice with the different values.\n\
|
||||
Examples:\n\
|
||||
- --listen-address '0.0.0.0' will listen over Ipv4.\n\
|
||||
- --listen-address '::' will listen over Ipv6.\n\
|
||||
- --listen-address '0.0.0.0' will listen over IPv4.\n\
|
||||
- --listen-address '::' will listen over IPv6.\n\
|
||||
- --listen-address '0.0.0.0' --listen-address '::' will listen over both \
|
||||
Ipv4 and Ipv6. The order of the given addresses is not relevant. However, \
|
||||
multiple Ipv4, or multiple Ipv6 addresses will not be accepted.")
|
||||
IPv4 and IPv6. The order of the given addresses is not relevant. However, \
|
||||
multiple IPv4, or multiple IPv6 addresses will not be accepted.")
|
||||
.multiple(true)
|
||||
.max_values(2)
|
||||
.default_value("0.0.0.0")
|
||||
@@ -96,9 +96,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
Arg::with_name("port")
|
||||
.long("port")
|
||||
.value_name("PORT")
|
||||
.help("The TCP/UDP port to listen on. The UDP port can be modified by the \
|
||||
--discovery-port flag. If listening over both Ipv4 and Ipv6 the --port flag \
|
||||
will apply to the Ipv4 address and --port6 to the Ipv6 address.")
|
||||
.help("The TCP/UDP ports to listen on. There are two UDP ports. \
|
||||
The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the \
|
||||
--discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag \
|
||||
will apply to the IPv4 address and --port6 to the IPv6 address.")
|
||||
.default_value("9000")
|
||||
.takes_value(true),
|
||||
)
|
||||
@@ -106,8 +107,8 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
Arg::with_name("port6")
|
||||
.long("port6")
|
||||
.value_name("PORT")
|
||||
.help("The TCP/UDP port to listen on over IpV6 when listening over both Ipv4 and \
|
||||
Ipv6. Defaults to 9090 when required.")
|
||||
.help("The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and \
|
||||
IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1.")
|
||||
.default_value("9090")
|
||||
.takes_value(true),
|
||||
)
|
||||
@@ -118,12 +119,27 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.help("The UDP port that discovery will listen on. Defaults to `port`")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("quic-port")
|
||||
.long("quic-port")
|
||||
.value_name("PORT")
|
||||
.help("The UDP port that quic will listen on. Defaults to `port` + 1")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("discovery-port6")
|
||||
.long("discovery-port6")
|
||||
.value_name("PORT")
|
||||
.help("The UDP port that discovery will listen on over IpV6 if listening over \
|
||||
both Ipv4 and IpV6. Defaults to `port6`")
|
||||
.help("The UDP port that discovery will listen on over IPv6 if listening over \
|
||||
both IPv4 and IPv6. Defaults to `port6`")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("quic-port6")
|
||||
.long("quic-port6")
|
||||
.value_name("PORT")
|
||||
.help("The UDP port that quic will listen on over IPv6 if listening over \
|
||||
both IPv4 and IPv6. Defaults to `port6` + 1")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
@@ -166,7 +182,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.long("enr-udp-port")
|
||||
.value_name("PORT")
|
||||
.help("The UDP4 port of the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IpV4.")
|
||||
can connect to your local node on this port over IPv4.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("enr-quic-port")
|
||||
.long("enr-quic-port")
|
||||
.value_name("PORT")
|
||||
.help("The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IPv4.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
@@ -174,7 +198,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.long("enr-udp6-port")
|
||||
.value_name("PORT")
|
||||
.help("The UDP6 port of the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IpV6.")
|
||||
can connect to your local node on this port over IPv6.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("enr-quic6-port")
|
||||
.long("enr-quic6-port")
|
||||
.value_name("PORT")
|
||||
.help("The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IPv6.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
@@ -182,7 +214,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.long("enr-tcp-port")
|
||||
.value_name("PORT")
|
||||
.help("The TCP4 port of the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IpV4. The --port flag is \
|
||||
can connect to your local node on this port over IPv4. The --port flag is \
|
||||
used if this is not set.")
|
||||
.takes_value(true),
|
||||
)
|
||||
@@ -191,7 +223,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.long("enr-tcp6-port")
|
||||
.value_name("PORT")
|
||||
.help("The TCP6 port of the local ENR. Set this only if you are sure other nodes \
|
||||
can connect to your local node on this port over IpV6. The --port6 flag is \
|
||||
can connect to your local node on this port over IPv6. The --port6 flag is \
|
||||
used if this is not set.")
|
||||
.takes_value(true),
|
||||
)
|
||||
@@ -232,11 +264,18 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
without an ENR.")
|
||||
.takes_value(true),
|
||||
)
|
||||
// NOTE: This is hidden because it is primarily a developer feature for testnets and
|
||||
// debugging. We remove it from the list to avoid clutter.
|
||||
.arg(
|
||||
Arg::with_name("disable-discovery")
|
||||
.long("disable-discovery")
|
||||
.help("Disables the discv5 discovery protocol. The node will not search for new peers or participate in the discovery protocol.")
|
||||
.takes_value(false),
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable-quic")
|
||||
.long("disable-quic")
|
||||
.help("Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable-peer-scoring")
|
||||
@@ -323,22 +362,25 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-address")
|
||||
.long("http-address")
|
||||
.requires("enable_http")
|
||||
.value_name("ADDRESS")
|
||||
.help("Set the listen address for the RESTful HTTP API server.")
|
||||
.default_value("127.0.0.1")
|
||||
.default_value_if("enable_http", None, "127.0.0.1")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-port")
|
||||
.long("http-port")
|
||||
.requires("enable_http")
|
||||
.value_name("PORT")
|
||||
.help("Set the listen TCP port for the RESTful HTTP API server.")
|
||||
.default_value("5052")
|
||||
.default_value_if("enable_http", None, "5052")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-allow-origin")
|
||||
.long("http-allow-origin")
|
||||
.requires("enable_http")
|
||||
.value_name("ORIGIN")
|
||||
.help("Set the value of the Access-Control-Allow-Origin response HTTP header. \
|
||||
Use * to allow any origin (not recommended in production). \
|
||||
@@ -349,11 +391,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-disable-legacy-spec")
|
||||
.long("http-disable-legacy-spec")
|
||||
.requires("enable_http")
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-spec-fork")
|
||||
.long("http-spec-fork")
|
||||
.requires("enable_http")
|
||||
.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.")
|
||||
@@ -371,6 +415,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-tls-cert")
|
||||
.long("http-tls-cert")
|
||||
.requires("enable_http")
|
||||
.help("The path of the certificate to be used when serving the HTTP API server \
|
||||
over TLS.")
|
||||
.takes_value(true)
|
||||
@@ -378,6 +423,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-tls-key")
|
||||
.long("http-tls-key")
|
||||
.requires("enable_http")
|
||||
.help("The path of the private key to be used when serving the HTTP API server \
|
||||
over TLS. Must not be password-protected.")
|
||||
.takes_value(true)
|
||||
@@ -385,6 +431,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-allow-sync-stalled")
|
||||
.long("http-allow-sync-stalled")
|
||||
.requires("enable_http")
|
||||
.help("Forces the HTTP to indicate that the node is synced when sync is actually \
|
||||
stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON \
|
||||
MAINNET.")
|
||||
@@ -392,8 +439,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-sse-capacity-multiplier")
|
||||
.long("http-sse-capacity-multiplier")
|
||||
.requires("enable_http")
|
||||
.takes_value(true)
|
||||
.default_value("1")
|
||||
.default_value_if("enable_http", None, "1")
|
||||
.value_name("N")
|
||||
.help("Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. \
|
||||
Increasing this value can prevent messages from being dropped.")
|
||||
@@ -401,8 +449,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-duplicate-block-status")
|
||||
.long("http-duplicate-block-status")
|
||||
.requires("enable_http")
|
||||
.takes_value(true)
|
||||
.default_value("202")
|
||||
.default_value_if("enable_http", None, "202")
|
||||
.value_name("STATUS_CODE")
|
||||
.help("Status code to send when a block that is already known is POSTed to the \
|
||||
HTTP API.")
|
||||
@@ -410,13 +459,14 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("http-enable-beacon-processor")
|
||||
.long("http-enable-beacon-processor")
|
||||
.requires("enable_http")
|
||||
.value_name("BOOLEAN")
|
||||
.help("The beacon processor is a scheduler which provides quality-of-service and \
|
||||
DoS protection. When set to \"true\", HTTP API requests will be queued and scheduled \
|
||||
alongside other tasks. When set to \"false\", HTTP API responses will be executed \
|
||||
immediately.")
|
||||
.takes_value(true)
|
||||
.default_value("true")
|
||||
.default_value_if("enable_http", None, "true")
|
||||
)
|
||||
/* Prometheus metrics HTTP server related arguments */
|
||||
.arg(
|
||||
@@ -429,22 +479,25 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
Arg::with_name("metrics-address")
|
||||
.long("metrics-address")
|
||||
.value_name("ADDRESS")
|
||||
.requires("metrics")
|
||||
.help("Set the listen address for the Prometheus metrics HTTP server.")
|
||||
.default_value("127.0.0.1")
|
||||
.default_value_if("metrics", None, "127.0.0.1")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("metrics-port")
|
||||
.long("metrics-port")
|
||||
.requires("metrics")
|
||||
.value_name("PORT")
|
||||
.help("Set the listen TCP port for the Prometheus metrics HTTP server.")
|
||||
.default_value("5054")
|
||||
.default_value_if("metrics", None, "5054")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("metrics-allow-origin")
|
||||
.long("metrics-allow-origin")
|
||||
.value_name("ORIGIN")
|
||||
.requires("metrics")
|
||||
.help("Set the value of the Access-Control-Allow-Origin response HTTP header. \
|
||||
Use * to allow any origin (not recommended in production). \
|
||||
If no value is supplied, the CORS allowed origin is set to the listen \
|
||||
@@ -1283,4 +1336,5 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("64")
|
||||
.takes_value(true)
|
||||
)
|
||||
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user