Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 5 additions & 10 deletions app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
@Option(
names = "--identity",
paramLabel = "<String>",
description = "Identification for this node in the Client ID",
arity = "1")
description = "Identification for this node in the Client ID")
private final Optional<String> identityString = Optional.empty();

private Boolean printPathsAndExit = Boolean.FALSE;
Expand Down Expand Up @@ -499,17 +498,15 @@ void setNetwork(final String inputNetwork) {
names = {"--network-id"},
paramLabel = "<BIG INTEGER>",
description =
"P2P network identifier. (default: the selected network chain ID or custom genesis chain ID)",
arity = "1")
"P2P network identifier. (default: the selected network chain ID or custom genesis chain ID)")
private final BigInteger networkId = null;

@Option(
names = {"--kzg-trusted-setup"},
paramLabel = MANDATORY_FILE_FORMAT_HELP,
description =
"Path to file containing the KZG trusted setup, mandatory for custom networks that support data blobs, "
+ "optional for overriding named networks default.",
arity = "1")
+ "optional for overriding named networks default.")
private final Path kzgTrustedSetupFile = null;

@Option(
Expand Down Expand Up @@ -585,16 +582,14 @@ void setNetwork(final String inputNetwork) {
@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"}) // PicoCLI requires non-final Strings.
@Option(
names = {"--key-value-storage"},
description = "Identity for the key-value storage to be used.",
arity = "1")
description = "Identity for the key-value storage to be used.")
private String keyValueStorageName = DEFAULT_KEY_VALUE_STORAGE_NAME;

@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"})
@Option(
names = {"--security-module"},
paramLabel = "<NAME>",
description = "Identity for the Security Module to be used.",
arity = "1")
description = "Identity for the Security Module to be used.")
private String securityModuleName = DEFAULT_SECURITY_MODULE;

@Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public EngineRPCOptions() {}
@CommandLine.Option(
names = {"--engine-rpc-port", "--engine-rpc-http-port"},
paramLabel = DefaultCommandValues.MANDATORY_PORT_FORMAT_HELP,
description = "Port to provide consensus client APIS on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port to provide consensus client APIS on (default: ${DEFAULT-VALUE})")
private final Integer engineRpcPort = DEFAULT_ENGINE_JSON_RPC_PORT;

@CommandLine.Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,19 @@ public class JsonRpcHttpOptions {
@CommandLine.Option(
names = {"--rpc-http-host"},
paramLabel = DefaultCommandValues.MANDATORY_HOST_FORMAT_HELP,
description = "Host for JSON-RPC HTTP to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Host for JSON-RPC HTTP to listen on (default: ${DEFAULT-VALUE})")
private String rpcHttpHost = DEFAULT_JSON_RPC_HOST;

@CommandLine.Option(
names = {"--rpc-http-port"},
paramLabel = DefaultCommandValues.MANDATORY_PORT_FORMAT_HELP,
description = "Port for JSON-RPC HTTP to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port for JSON-RPC HTTP to listen on (default: ${DEFAULT-VALUE})")
private final Integer rpcHttpPort = DEFAULT_JSON_RPC_PORT;

@CommandLine.Option(
names = {"--rpc-http-max-active-connections"},
description =
"Maximum number of HTTP connections allowed for JSON-RPC (default: ${DEFAULT-VALUE}). Once this limit is reached, incoming connections will be rejected.",
arity = "1")
"Maximum number of HTTP connections allowed for JSON-RPC (default: ${DEFAULT-VALUE}). Once this limit is reached, incoming connections will be rejected.")
private final Integer rpcHttpMaxConnections = DefaultCommandValues.DEFAULT_HTTP_MAX_CONNECTIONS;

// A list of origins URLs that are accepted by the JsonRpcHttpServer (CORS)
Expand Down Expand Up @@ -118,23 +115,20 @@ public class JsonRpcHttpOptions {
names = {"--rpc-http-authentication-credentials-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description =
"Storage file for JSON-RPC HTTP authentication credentials (default: ${DEFAULT-VALUE})",
arity = "1")
"Storage file for JSON-RPC HTTP authentication credentials (default: ${DEFAULT-VALUE})")
private String rpcHttpAuthenticationCredentialsFile = null;

@CommandLine.Option(
names = {"--rpc-http-authentication-jwt-public-key-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description = "JWT public key file for JSON-RPC HTTP authentication",
arity = "1")
description = "JWT public key file for JSON-RPC HTTP authentication")
private final File rpcHttpAuthenticationPublicKeyFile = null;

@CommandLine.Option(
names = {"--rpc-http-authentication-jwt-algorithm"},
description =
"Encryption algorithm used for HTTP JWT public key. Possible values are ${COMPLETION-CANDIDATES}"
+ " (default: ${DEFAULT-VALUE})",
arity = "1")
+ " (default: ${DEFAULT-VALUE})")
private final JwtAlgorithm rpcHttpAuthenticationAlgorithm =
DefaultCommandValues.DEFAULT_JWT_ALGORITHM;

Expand Down Expand Up @@ -179,15 +173,13 @@ public class JsonRpcHttpOptions {
@CommandLine.Option(
names = {"--rpc-http-tls-truststore-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description = "Path to the truststore file for the JSON-RPC HTTP service.",
arity = "1")
description = "Path to the truststore file for the JSON-RPC HTTP service.")
private final Path rpcHttpTlsTruststoreFile = null;

@CommandLine.Option(
names = {"--rpc-http-tls-truststore-password-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description = "Path to the file containing the password for the truststore.",
arity = "1")
description = "Path to the file containing the password for the truststore.")
private final Path rpcHttpTlsTruststorePasswordFile = null;

@CommandLine.Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@ public List<String> getCLIOptions() {
@CommandLine.Option(
names = {"--metrics-host"},
paramLabel = MANDATORY_HOST_FORMAT_HELP,
description = "Host for the metrics exporter to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Host for the metrics exporter to listen on (default: ${DEFAULT-VALUE})")
private String metricsHost = MetricsConfiguration.DEFAULT_METRICS_HOST;

@CommandLine.Option(
names = {"--metrics-port"},
paramLabel = MANDATORY_PORT_FORMAT_HELP,
description = "Port for the metrics exporter to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port for the metrics exporter to listen on (default: ${DEFAULT-VALUE})")
private Integer metricsPort = DEFAULT_METRICS_PORT;

@CommandLine.Option(
Expand All @@ -143,30 +141,26 @@ public List<String> getCLIOptions() {
@CommandLine.Option(
names = {"--metrics-push-host"},
paramLabel = MANDATORY_HOST_FORMAT_HELP,
description = "Host of the Prometheus Push Gateway for push mode (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Host of the Prometheus Push Gateway for push mode (default: ${DEFAULT-VALUE})")
private String metricsPushHost = MetricsConfiguration.DEFAULT_METRICS_PUSH_HOST;

@CommandLine.Option(
names = {"--metrics-push-port"},
paramLabel = MANDATORY_PORT_FORMAT_HELP,
description = "Port of the Prometheus Push Gateway for push mode (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port of the Prometheus Push Gateway for push mode (default: ${DEFAULT-VALUE})")
private Integer metricsPushPort = DEFAULT_METRICS_PUSH_PORT;

@CommandLine.Option(
names = {"--metrics-push-interval"},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Interval in seconds to push metrics when in push mode (default: ${DEFAULT-VALUE})",
arity = "1")
"Interval in seconds to push metrics when in push mode (default: ${DEFAULT-VALUE})")
private Integer metricsPushInterval = 15;

@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"}) // PicoCLI requires non-final Strings.
@CommandLine.Option(
names = {"--metrics-push-prometheus-job"},
description = "Job name to use when in push mode (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Job name to use when in push mode (default: ${DEFAULT-VALUE})")
private String metricsPrometheusJob = "besu-client";

/**
Expand Down Expand Up @@ -320,8 +314,7 @@ static class Unstable {
hidden = true,
names = {IDLE_TIMEOUT_FLAG},
paramLabel = "<INTEGER>",
description = "Timeout for metrics TCP connections, in seconds (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Timeout for metrics TCP connections, in seconds (default: ${DEFAULT-VALUE})")
private int idleTimeout = MetricsConfiguration.DEFAULT_METRICS_IDLE_TIMEOUT_SECONDS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ public P2PDiscoveryOptions() {}
@CommandLine.Option(
names = {"--p2p-host"},
paramLabel = DefaultCommandValues.MANDATORY_HOST_FORMAT_HELP,
description = "IP address this node advertises to its peers (default: ${DEFAULT-VALUE})",
arity = "1")
description = "IP address this node advertises to its peers (default: ${DEFAULT-VALUE})")
public String p2pHost = autoDiscoverDefaultIP().getHostAddress();

/** The network interface address on which this node listens for P2P communication. */
Expand All @@ -107,16 +106,14 @@ public P2PDiscoveryOptions() {}
names = {"--p2p-interface"},
paramLabel = DefaultCommandValues.MANDATORY_HOST_FORMAT_HELP,
description =
"The network interface address on which this node listens for P2P communication (default: ${DEFAULT-VALUE})",
arity = "1")
"The network interface address on which this node listens for P2P communication (default: ${DEFAULT-VALUE})")
public String p2pInterface = NetworkUtility.INADDR_ANY;

/** The port on which this node listens for P2P communication. */
@CommandLine.Option(
names = {"--p2p-port"},
paramLabel = DefaultCommandValues.MANDATORY_PORT_FORMAT_HELP,
description = "Port on which to listen for P2P communication (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port on which to listen for P2P communication (default: ${DEFAULT-VALUE})")
public final Integer p2pPort = EnodeURLImpl.DEFAULT_LISTENING_PORT;

/** The maximum number of peers this node can connect to. */
Expand All @@ -139,7 +136,6 @@ public P2PDiscoveryOptions() {}
paramLabel = DefaultCommandValues.MANDATORY_DOUBLE_FORMAT_HELP,
description =
"The maximum percentage of P2P connections that can be initiated remotely. Must be between 0 and 100 inclusive. (default: ${DEFAULT-VALUE})",
arity = "1",
converter = PercentageConverter.class)
public final Percentage maxRemoteConnectionsPercentage =
Fraction.fromFloat(DefaultCommandValues.DEFAULT_FRACTION_REMOTE_WIRE_CONNECTIONS_ALLOWED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ public class RPCOptions {
@CommandLine.Option(
hidden = true,
names = {"--Xhttp-timeout-seconds"},
description = "HTTP timeout in seconds (default: ${DEFAULT-VALUE})",
arity = "1")
description = "HTTP timeout in seconds (default: ${DEFAULT-VALUE})")
private final Long httpTimeoutSec = TimeoutOptions.defaultOptions().getTimeoutSeconds();

@CommandLine.Option(
hidden = true,
names = {"--Xws-timeout-seconds"},
description = "Web socket timeout in seconds (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Web socket timeout in seconds (default: ${DEFAULT-VALUE})")
private final Long wsTimeoutSec = TimeoutOptions.defaultOptions().getTimeoutSeconds();

/** Default Constructor. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ static class TruststorePasswordOptions {
names = {"--rpc-ws-authentication-jwt-algorithm"},
description =
"Encryption algorithm used for Websockets JWT public key. Possible values are ${COMPLETION-CANDIDATES}"
+ " (default: ${DEFAULT-VALUE})",
arity = "1")
+ " (default: ${DEFAULT-VALUE})")
private final JwtAlgorithm rpcWebsocketsAuthenticationAlgorithm =
DefaultCommandValues.DEFAULT_JWT_ALGORITHM;

Expand All @@ -84,29 +83,25 @@ static class TruststorePasswordOptions {
@CommandLine.Option(
names = {"--rpc-ws-host"},
paramLabel = DefaultCommandValues.MANDATORY_HOST_FORMAT_HELP,
description = "Host for JSON-RPC WebSocket service to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Host for JSON-RPC WebSocket service to listen on (default: ${DEFAULT-VALUE})")
private String rpcWsHost;

@CommandLine.Option(
names = {"--rpc-ws-port"},
paramLabel = DefaultCommandValues.MANDATORY_PORT_FORMAT_HELP,
description = "Port for JSON-RPC WebSocket service to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Port for JSON-RPC WebSocket service to listen on (default: ${DEFAULT-VALUE})")
private final Integer rpcWsPort = DEFAULT_WEBSOCKET_PORT;

@CommandLine.Option(
names = {"--rpc-ws-max-frame-size"},
description =
"Maximum size in bytes for JSON-RPC WebSocket frames (default: ${DEFAULT-VALUE}). If this limit is exceeded, the websocket will be disconnected.",
arity = "1")
"Maximum size in bytes for JSON-RPC WebSocket frames (default: ${DEFAULT-VALUE}). If this limit is exceeded, the websocket will be disconnected.")
private final Integer rpcWsMaxFrameSize = DefaultCommandValues.DEFAULT_WS_MAX_FRAME_SIZE;

@CommandLine.Option(
names = {"--rpc-ws-max-active-connections"},
description =
"Maximum number of WebSocket connections allowed for JSON-RPC (default: ${DEFAULT-VALUE}). Once this limit is reached, incoming connections will be rejected.",
arity = "1")
"Maximum number of WebSocket connections allowed for JSON-RPC (default: ${DEFAULT-VALUE}). Once this limit is reached, incoming connections will be rejected.")
private final Integer rpcWsMaxConnections = DefaultCommandValues.DEFAULT_WS_MAX_CONNECTIONS;

@CommandLine.Option(
Expand Down Expand Up @@ -138,15 +133,13 @@ static class TruststorePasswordOptions {
names = {"--rpc-ws-authentication-credentials-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description =
"Storage file for JSON-RPC WebSocket authentication credentials (default: ${DEFAULT-VALUE})",
arity = "1")
"Storage file for JSON-RPC WebSocket authentication credentials (default: ${DEFAULT-VALUE})")
private String rpcWsAuthenticationCredentialsFile = null;

@CommandLine.Option(
names = {"--rpc-ws-authentication-jwt-public-key-file"},
paramLabel = DefaultCommandValues.MANDATORY_FILE_FORMAT_HELP,
description = "JWT public key file for JSON-RPC WebSocket authentication",
arity = "1")
description = "JWT public key file for JSON-RPC WebSocket authentication")
private final File rpcWsAuthenticationPublicKeyFile = null;

@CommandLine.Option(
Expand Down