Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ public class EthstatsOptions implements CLIOptions<EthStatsConnectOptions> {
@CommandLine.Option(
names = {ETHSTATS},
paramLabel = "<[ws://|wss://]nodename:secret@host:[port]>",
description = "Reporting URL of a ethstats server. Scheme and port can be omitted.",
arity = "1")
description = "Reporting URL of a ethstats server. Scheme and port can be omitted.")
private String ethstatsUrl = "";

@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"})
@CommandLine.Option(
names = {ETHSTATS_CONTACT},
description = "Contact address to send to ethstats server",
arity = "1")
description = "Contact address to send to ethstats server")
private String ethstatsContact = "";

@SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"})
Expand All @@ -57,8 +55,7 @@ public class EthstatsOptions implements CLIOptions<EthStatsConnectOptions> {
@CommandLine.Option(
names = {ETHSTATS_REPORT_INTERVAL},
paramLabel = "<SECONDS>",
description = "Interval in seconds between ethstats reports.",
arity = "1")
description = "Interval in seconds between ethstats reports.")
private Integer ethstatsReportInterval = 5;

private EthstatsOptions() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,15 @@ public static EvmOptions create() {
"size in kilobytes to allow the cache "
+ "of valid jump destinations to grow to before evicting the least recently used entry",
fallbackValue = "32000",
hidden = true,
arity = "1")
hidden = true)
private Long jumpDestCacheWeightKilobytes =
32_000L; // 10k contracts, (25k max contract size / 8 bit) + 32byte hash

@CommandLine.Option(
names = {WORLDSTATE_UPDATE_MODE},
description = "How to handle worldstate updates within a transaction",
fallbackValue = "STACKED",
hidden = true,
arity = "1")
hidden = true)
private EvmConfiguration.WorldUpdaterMode worldstateUpdateMode =
EvmConfiguration.WorldUpdaterMode
.STACKED; // Stacked Updater. Years of battle tested correctness.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ public class GraphQlOptions {
@CommandLine.Option(
names = {"--graphql-http-host"},
paramLabel = DefaultCommandValues.MANDATORY_HOST_FORMAT_HELP,
description = "Host for GraphQL HTTP to listen on (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Host for GraphQL HTTP to listen on (default: ${DEFAULT-VALUE})")
private String graphQLHttpHost;

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

@CommandLine.Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,26 @@ public class MiningOptions implements CLIOptions<MiningConfiguration> {
names = {"--miner-extra-data"},
description =
"A hex string representing the (32) bytes to be included in the extra data "
+ "field of a mined block (default: ${DEFAULT-VALUE})",
arity = "1")
+ "field of a mined block (default: ${DEFAULT-VALUE})")
private Bytes extraData = DEFAULT_EXTRA_DATA;

@Option(
names = {"--min-block-occupancy-ratio"},
description = "Minimum occupancy ratio for a mined block (default: ${DEFAULT-VALUE})",
arity = "1")
description = "Minimum occupancy ratio for a mined block (default: ${DEFAULT-VALUE})")
private Double minBlockOccupancyRatio = DEFAULT_MIN_BLOCK_OCCUPANCY_RATIO;

@Option(
names = {"--min-gas-price"},
description =
"Minimum price (in Wei) offered by a transaction for it to be included in a mined "
+ "block (default: ${DEFAULT-VALUE})",
arity = "1")
+ "block (default: ${DEFAULT-VALUE})")
private Wei minTransactionGasPrice = DEFAULT_MIN_TRANSACTION_GAS_PRICE;

@Option(
names = {"--min-priority-fee"},
description =
"Minimum priority fee per gas (in Wei) offered by a transaction for it to be included in a "
+ "block (default: ${DEFAULT-VALUE})",
arity = "1")
+ "block (default: ${DEFAULT-VALUE})")
private Wei minPriorityFeePerGas = DEFAULT_MIN_PRIORITY_FEE_PER_GAS;

@Option(
Expand Down Expand Up @@ -142,8 +138,7 @@ static class Unstable {
@CommandLine.Option(
hidden = true,
names = {"--Xpos-slot-duration"},
description = "The slot duration in PoS in seconds (default: ${DEFAULT-VALUE})",
arity = "1")
description = "The slot duration in PoS in seconds (default: ${DEFAULT-VALUE})")
@Positive
Integer posSlotDuration = DEFAULT_POS_SLOT_DURATION_SECS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public class PluginsConfigurationOptions implements CLIOptions<PluginConfigurati
names = {PLUGINS_OPTION_NAME},
description = "Comma-separated list of plugin names to load",
split = ",",
converter = PluginInfoConverter.class,
arity = "1")
converter = PluginInfoConverter.class)
private List<PluginInfo> plugins = DEFAULT_REQUESTED_PLUGINS_INFO;

@CommandLine.Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,33 +89,29 @@ public class TransactionPoolOptions implements CLIOptions<TransactionPoolConfigu
names = {TX_POOL_SAVE_FILE},
paramLabel = "<STRING>",
description =
"If saving the txpool content is enabled, define a custom path for the save file (default: ${DEFAULT-VALUE} in the data-dir)",
arity = "1")
"If saving the txpool content is enabled, define a custom path for the save file (default: ${DEFAULT-VALUE} in the data-dir)")
private File saveFile = TransactionPoolConfiguration.DEFAULT_SAVE_FILE;

@CommandLine.Option(
names = {TX_POOL_PRICE_BUMP},
paramLabel = "<Percentage>",
converter = PercentageConverter.class,
description =
"Price bump percentage to replace an already existing transaction (default: ${DEFAULT-VALUE})",
arity = "1")
"Price bump percentage to replace an already existing transaction (default: ${DEFAULT-VALUE})")
private Percentage priceBump = TransactionPoolConfiguration.DEFAULT_PRICE_BUMP;

@CommandLine.Option(
names = {TX_POOL_BLOB_PRICE_BUMP},
paramLabel = "<Percentage>",
converter = PercentageConverter.class,
description =
"Blob price bump percentage to replace an already existing transaction blob tx (default: ${DEFAULT-VALUE})",
arity = "1")
"Blob price bump percentage to replace an already existing transaction blob tx (default: ${DEFAULT-VALUE})")
private Percentage blobPriceBump = TransactionPoolConfiguration.DEFAULT_BLOB_PRICE_BUMP;

@CommandLine.Option(
names = {RPC_TX_FEECAP},
description =
"Maximum transaction fees (in Wei) accepted for transaction submitted through RPC (default: ${DEFAULT-VALUE})",
arity = "1")
"Maximum transaction fees (in Wei) accepted for transaction submitted through RPC (default: ${DEFAULT-VALUE})")
private Wei txFeeCap = TransactionPoolConfiguration.DEFAULT_RPC_TX_FEE_CAP;

@CommandLine.Option(
Expand All @@ -141,8 +137,7 @@ public class TransactionPoolOptions implements CLIOptions<TransactionPoolConfigu
paramLabel = "<Wei>",
description =
"Transactions with gas price (in Wei) lower than this minimum will not be accepted into the txpool"
+ "(not to be confused with min-gas-price, that is applied on block creation) (default: ${DEFAULT-VALUE})",
arity = "1")
+ "(not to be confused with min-gas-price, that is applied on block creation) (default: ${DEFAULT-VALUE})")
private Wei minGasPrice = TransactionPoolConfiguration.DEFAULT_TX_POOL_MIN_GAS_PRICE;

@CommandLine.ArgGroup(
Expand All @@ -163,17 +158,15 @@ static class Layered {
names = {TX_POOL_LAYER_MAX_CAPACITY},
paramLabel = MANDATORY_LONG_FORMAT_HELP,
description =
"Max amount of memory space, in bytes, that any layer within the transaction pool could occupy (default: ${DEFAULT-VALUE})",
arity = "1")
"Max amount of memory space, in bytes, that any layer within the transaction pool could occupy (default: ${DEFAULT-VALUE})")
Long txPoolLayerMaxCapacity =
TransactionPoolConfiguration.DEFAULT_PENDING_TRANSACTIONS_LAYER_MAX_CAPACITY_BYTES;

@CommandLine.Option(
names = {TX_POOL_MAX_PRIORITIZED},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Max number of pending transactions that are prioritized and thus kept sorted (default: ${DEFAULT-VALUE})",
arity = "1")
"Max number of pending transactions that are prioritized and thus kept sorted (default: ${DEFAULT-VALUE})")
Integer txPoolMaxPrioritized =
TransactionPoolConfiguration.DEFAULT_MAX_PRIORITIZED_TRANSACTIONS;

Expand All @@ -182,26 +175,23 @@ static class Layered {
paramLabel = "MAP<TYPE,INTEGER>",
split = ",",
description =
"Max number of pending transactions, of a specific type, that are prioritized and thus kept sorted (default: ${DEFAULT-VALUE})",
arity = "1")
"Max number of pending transactions, of a specific type, that are prioritized and thus kept sorted (default: ${DEFAULT-VALUE})")
Map<TransactionType, Integer> txPoolMaxPrioritizedByType =
TransactionPoolConfiguration.DEFAULT_MAX_PRIORITIZED_TRANSACTIONS_BY_TYPE;

@CommandLine.Option(
names = {TX_POOL_MAX_FUTURE_BY_SENDER},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Max number of future pending transactions allowed for a single sender (default: ${DEFAULT-VALUE})",
arity = "1")
"Max number of future pending transactions allowed for a single sender (default: ${DEFAULT-VALUE})")
Integer txPoolMaxFutureBySender = TransactionPoolConfiguration.DEFAULT_MAX_FUTURE_BY_SENDER;

@CommandLine.Option(
names = {TX_POOL_MIN_SCORE},
paramLabel = "<Byte>",
description =
"Remove a pending transaction from the txpool if its score is lower than this value."
+ "Accepts values between -128 and 127 (default: ${DEFAULT-VALUE})",
arity = "1")
+ "Accepts values between -128 and 127 (default: ${DEFAULT-VALUE})")
Byte minScore = TransactionPoolConfiguration.DEFAULT_TX_POOL_MIN_SCORE;

@CommandLine.Option(
Expand Down Expand Up @@ -229,26 +219,23 @@ static class Sequenced {
names = {TX_POOL_RETENTION_HOURS},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Maximum retention period of pending transactions in hours (default: ${DEFAULT-VALUE})",
arity = "1")
"Maximum retention period of pending transactions in hours (default: ${DEFAULT-VALUE})")
Integer pendingTxRetentionPeriod = TransactionPoolConfiguration.DEFAULT_TX_RETENTION_HOURS;

@CommandLine.Option(
names = {TX_POOL_LIMIT_BY_ACCOUNT_PERCENTAGE},
paramLabel = MANDATORY_DOUBLE_FORMAT_HELP,
converter = FractionConverter.class,
description =
"Maximum portion of the transaction pool which a single account may occupy with future transactions (default: ${DEFAULT-VALUE})",
arity = "1")
"Maximum portion of the transaction pool which a single account may occupy with future transactions (default: ${DEFAULT-VALUE})")
Fraction txPoolLimitByAccountPercentage =
TransactionPoolConfiguration.DEFAULT_LIMIT_TX_POOL_BY_ACCOUNT_PERCENTAGE;

@CommandLine.Option(
names = {TX_POOL_MAX_SIZE},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Maximum number of pending transactions that will be kept in the transaction pool (default: ${DEFAULT-VALUE})",
arity = "1")
"Maximum number of pending transactions that will be kept in the transaction pool (default: ${DEFAULT-VALUE})")
Integer txPoolMaxSize = TransactionPoolConfiguration.DEFAULT_MAX_PENDING_TRANSACTIONS;
}

Expand All @@ -269,8 +256,7 @@ static class Unstable {
paramLabel = "<INTEGER>",
hidden = true,
description =
"Keep alive of incoming transaction messages in seconds (default: ${DEFAULT-VALUE})",
arity = "1")
"Keep alive of incoming transaction messages in seconds (default: ${DEFAULT-VALUE})")
private Integer txMessageKeepAliveSeconds =
TransactionPoolConfiguration.Unstable.DEFAULT_TX_MSG_KEEP_ALIVE;

Expand All @@ -280,8 +266,7 @@ static class Unstable {
converter = DurationMillisConverter.class,
hidden = true,
description =
"The period for which the announced transactions remain in the buffer before being requested from the peers in milliseconds (default: ${DEFAULT-VALUE})",
arity = "1")
"The period for which the announced transactions remain in the buffer before being requested from the peers in milliseconds (default: ${DEFAULT-VALUE})")
private Duration eth65TrxAnnouncedBufferingPeriod =
TransactionPoolConfiguration.Unstable.ETH65_TRX_ANNOUNCED_BUFFERING_PERIOD;

Expand All @@ -290,8 +275,7 @@ static class Unstable {
paramLabel = "<LONG>",
hidden = true,
description =
"The number of exchanged txs that are remembered with each peer, to minimize broadcasting duplicates (default: ${DEFAULT-VALUE})",
arity = "1")
"The number of exchanged txs that are remembered with each peer, to minimize broadcasting duplicates (default: ${DEFAULT-VALUE})")
private int maxTrackedSeenTxsPerPeer =
TransactionPoolConfiguration.Unstable.DEFAULT_MAX_TRACKED_SEEN_TXS_PER_PEER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public class DataStorageOptions implements CLIOptions<DataStorageConfiguration>
@Option(
names = {DATA_STORAGE_FORMAT},
description =
"Format to store trie data in. Either FOREST or BONSAI (default: ${DEFAULT-VALUE}).",
arity = "1")
"Format to store trie data in. Either FOREST or BONSAI (default: ${DEFAULT-VALUE}).")
private DataStorageFormat dataStorageFormat = DataStorageFormat.BONSAI;

@Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public class PathBasedExtraStorageOptions
description =
"Limit of historical layers that can be loaded with BONSAI (default: ${DEFAULT-VALUE}). When using "
+ LIMIT_TRIE_LOGS_ENABLED
+ " it will also be used as the number of layers of trie logs to retain.",
arity = "1")
+ " it will also be used as the number of layers of trie logs to retain.")
private Long maxLayersToLoad = DEFAULT_MAX_LAYERS_TO_LOAD;

/** The bonsai limit trie logs enabled option name */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ Optional<String> provideFork() {
@Option(
names = {"--key-value-storage"},
description =
"Identity for the key-value storage to be used (default: 'memory' alternate: 'rocksdb')",
arity = "1")
"Identity for the key-value storage to be used (default: 'memory' alternate: 'rocksdb')")
private String keyValueStorageName = "memory";

@Provides
Expand All @@ -104,8 +103,7 @@ BesuConfiguration provideBesuConfiguration() {
@Option(
names = {"--block-number"},
description =
"Block number to evaluate against (default: 'PENDING', or 'EARLIEST', 'LATEST', or a number)",
arity = "1")
"Block number to evaluate against (default: 'PENDING', or 'EARLIEST', 'LATEST', or a number)")
private final BlockParameter blockParameter = BlockParameter.PENDING;

@Provides
Expand All @@ -122,8 +120,7 @@ BlockParameter provideBlockParameter() {
+ "of valid jump destinations to grow to before evicting the least recently used entry",
fallbackValue = "32000",
defaultValue = "32000",
hidden = true,
arity = "1")
hidden = true)
private Long jumpDestCacheWeightKilobytes =
32_000L; // 10k contracts, (25k max contract size / 8 bit) + 32byte hash

Expand All @@ -132,8 +129,7 @@ BlockParameter provideBlockParameter() {
description = "How to handle worldstate updates within a transaction",
fallbackValue = "STACKED",
defaultValue = "STACKED",
hidden = true,
arity = "1")
hidden = true)
private EvmConfiguration.WorldUpdaterMode worldstateUpdateMode =
EvmConfiguration.WorldUpdaterMode
.STACKED; // Stacked Updater. Years of battle tested correctness.
Expand Down