chore(net): expose pending pool imports bound in cli (#10357)

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
Emilia Hane
2024-08-20 01:05:52 -07:00
committed by GitHub
parent 170a396903
commit 3aaa284a5e
9 changed files with 48 additions and 1 deletions

View File

@ -177,6 +177,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -177,6 +177,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -177,6 +177,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -177,6 +177,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -169,6 +169,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -154,6 +154,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -220,6 +220,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -182,6 +182,11 @@ Networking:
--max-inbound-peers <MAX_INBOUND_PEERS>
Maximum number of inbound requests. default: 30
--max-pending-imports <COUNT>
Max number of transactions to import concurrently.
[default: 4096]
--max-seen-tx-history <MAX_SEEN_TX_HISTORY>
Max number of seen transactions to remember per peer.

View File

@ -12,7 +12,9 @@ use reth_discv5::{
use reth_net_nat::NatResolver;
use reth_network::{
transactions::{
constants::tx_manager::DEFAULT_MAX_COUNT_TRANSACTIONS_SEEN_BY_PEER,
constants::tx_manager::{
DEFAULT_MAX_COUNT_PENDING_POOL_IMPORTS, DEFAULT_MAX_COUNT_TRANSACTIONS_SEEN_BY_PEER,
},
TransactionFetcherConfig, TransactionsManagerConfig,
DEFAULT_SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESP_ON_PACK_GET_POOLED_TRANSACTIONS_REQ,
SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE,
@ -97,6 +99,10 @@ pub struct NetworkArgs {
#[arg(long)]
pub max_inbound_peers: Option<usize>,
#[arg(long = "max-pending-imports", value_name = "COUNT", default_value_t = DEFAULT_MAX_COUNT_PENDING_POOL_IMPORTS, verbatim_doc_comment)]
/// Max number of transactions to import concurrently.
pub max_pending_pool_imports: usize,
/// Max number of seen transactions to remember per peer.
///
/// Default is 320 transaction hashes.
@ -269,6 +275,7 @@ impl Default for NetworkArgs {
soft_limit_byte_size_pooled_transactions_response:
SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE,
soft_limit_byte_size_pooled_transactions_response_on_pack_request: DEFAULT_SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESP_ON_PACK_GET_POOLED_TRANSACTIONS_REQ,
max_pending_pool_imports: DEFAULT_MAX_COUNT_PENDING_POOL_IMPORTS,
max_seen_tx_history: DEFAULT_MAX_COUNT_TRANSACTIONS_SEEN_BY_PEER,
}
}