mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
CLI parameter to specify the broadcast channel capacity of PendingPool (#12388)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
5
book/cli/reth/node.md
vendored
5
book/cli/reth/node.md
vendored
@ -502,6 +502,11 @@ TxPool:
|
|||||||
|
|
||||||
[default: 1024]
|
[default: 1024]
|
||||||
|
|
||||||
|
--txpool.max-new-pending-txs-notifications <MAX_NEW_PENDING_TXS_NOTIFICATIONS>
|
||||||
|
How many new pending transactions to buffer and send to in progress pending transaction iterators
|
||||||
|
|
||||||
|
[default: 200]
|
||||||
|
|
||||||
Builder:
|
Builder:
|
||||||
--builder.extradata <EXTRADATA>
|
--builder.extradata <EXTRADATA>
|
||||||
Block extra data set by the payload builder
|
Block extra data set by the payload builder
|
||||||
|
|||||||
@ -9,9 +9,9 @@ use reth_transaction_pool::{
|
|||||||
pool::{NEW_TX_LISTENER_BUFFER_SIZE, PENDING_TX_LISTENER_BUFFER_SIZE},
|
pool::{NEW_TX_LISTENER_BUFFER_SIZE, PENDING_TX_LISTENER_BUFFER_SIZE},
|
||||||
validate::DEFAULT_MAX_TX_INPUT_BYTES,
|
validate::DEFAULT_MAX_TX_INPUT_BYTES,
|
||||||
LocalTransactionConfig, PoolConfig, PriceBumpConfig, SubPoolLimit, DEFAULT_PRICE_BUMP,
|
LocalTransactionConfig, PoolConfig, PriceBumpConfig, SubPoolLimit, DEFAULT_PRICE_BUMP,
|
||||||
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, REPLACE_BLOB_PRICE_BUMP,
|
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||||
TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER, TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT,
|
REPLACE_BLOB_PRICE_BUMP, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||||
TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT, TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
||||||
};
|
};
|
||||||
/// Parameters for debugging purposes
|
/// Parameters for debugging purposes
|
||||||
#[derive(Debug, Clone, Args, PartialEq, Eq)]
|
#[derive(Debug, Clone, Args, PartialEq, Eq)]
|
||||||
@ -86,6 +86,11 @@ pub struct TxPoolArgs {
|
|||||||
/// Maximum number of new transactions to buffer
|
/// Maximum number of new transactions to buffer
|
||||||
#[arg(long = "txpool.max-new-txns", alias = "txpool.max_new_txns", default_value_t = NEW_TX_LISTENER_BUFFER_SIZE)]
|
#[arg(long = "txpool.max-new-txns", alias = "txpool.max_new_txns", default_value_t = NEW_TX_LISTENER_BUFFER_SIZE)]
|
||||||
pub new_tx_listener_buffer_size: usize,
|
pub new_tx_listener_buffer_size: usize,
|
||||||
|
|
||||||
|
/// How many new pending transactions to buffer and send to in progress pending transaction
|
||||||
|
/// iterators.
|
||||||
|
#[arg(long = "txpool.max-new-pending-txs-notifications", alias = "txpool.max-new-pending-txs-notifications", default_value_t = MAX_NEW_PENDING_TXS_NOTIFICATIONS)]
|
||||||
|
pub max_new_pending_txs_notifications: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TxPoolArgs {
|
impl Default for TxPoolArgs {
|
||||||
@ -110,6 +115,7 @@ impl Default for TxPoolArgs {
|
|||||||
additional_validation_tasks: DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS,
|
additional_validation_tasks: DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS,
|
||||||
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
||||||
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
||||||
|
max_new_pending_txs_notifications: MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,6 +154,7 @@ impl RethTransactionPoolConfig for TxPoolArgs {
|
|||||||
gas_limit: self.gas_limit,
|
gas_limit: self.gas_limit,
|
||||||
pending_tx_listener_buffer_size: self.pending_tx_listener_buffer_size,
|
pending_tx_listener_buffer_size: self.pending_tx_listener_buffer_size,
|
||||||
new_tx_listener_buffer_size: self.new_tx_listener_buffer_size,
|
new_tx_listener_buffer_size: self.new_tx_listener_buffer_size,
|
||||||
|
max_new_pending_txs_notifications: self.max_new_pending_txs_notifications,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,9 @@ pub const DEFAULT_PRICE_BUMP: u128 = 10;
|
|||||||
/// This enforces that a blob transaction requires a 100% price bump to be replaced
|
/// This enforces that a blob transaction requires a 100% price bump to be replaced
|
||||||
pub const REPLACE_BLOB_PRICE_BUMP: u128 = 100;
|
pub const REPLACE_BLOB_PRICE_BUMP: u128 = 100;
|
||||||
|
|
||||||
|
/// Default maximum new transactions for broadcasting.
|
||||||
|
pub const MAX_NEW_PENDING_TXS_NOTIFICATIONS: usize = 200;
|
||||||
|
|
||||||
/// Configuration options for the Transaction pool.
|
/// Configuration options for the Transaction pool.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct PoolConfig {
|
pub struct PoolConfig {
|
||||||
@ -53,6 +56,8 @@ pub struct PoolConfig {
|
|||||||
pub pending_tx_listener_buffer_size: usize,
|
pub pending_tx_listener_buffer_size: usize,
|
||||||
/// Bound on number of new transactions from `reth_network::TransactionsManager` to buffer.
|
/// Bound on number of new transactions from `reth_network::TransactionsManager` to buffer.
|
||||||
pub new_tx_listener_buffer_size: usize,
|
pub new_tx_listener_buffer_size: usize,
|
||||||
|
/// How many new pending transactions to buffer and send iterators in progress.
|
||||||
|
pub max_new_pending_txs_notifications: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PoolConfig {
|
impl PoolConfig {
|
||||||
@ -80,6 +85,7 @@ impl Default for PoolConfig {
|
|||||||
local_transactions_config: Default::default(),
|
local_transactions_config: Default::default(),
|
||||||
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
pending_tx_listener_buffer_size: PENDING_TX_LISTENER_BUFFER_SIZE,
|
||||||
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
new_tx_listener_buffer_size: NEW_TX_LISTENER_BUFFER_SIZE,
|
||||||
|
max_new_pending_txs_notifications: MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,9 +166,9 @@ pub use crate::{
|
|||||||
blobstore::{BlobStore, BlobStoreError},
|
blobstore::{BlobStore, BlobStoreError},
|
||||||
config::{
|
config::{
|
||||||
LocalTransactionConfig, PoolConfig, PriceBumpConfig, SubPoolLimit, DEFAULT_PRICE_BUMP,
|
LocalTransactionConfig, PoolConfig, PriceBumpConfig, SubPoolLimit, DEFAULT_PRICE_BUMP,
|
||||||
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, REPLACE_BLOB_PRICE_BUMP,
|
DEFAULT_TXPOOL_ADDITIONAL_VALIDATION_TASKS, MAX_NEW_PENDING_TXS_NOTIFICATIONS,
|
||||||
TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER, TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT,
|
REPLACE_BLOB_PRICE_BUMP, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
|
||||||
TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT, TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
|
||||||
},
|
},
|
||||||
error::PoolResult,
|
error::PoolResult,
|
||||||
ordering::{CoinbaseTipOrdering, Priority, TransactionOrdering},
|
ordering::{CoinbaseTipOrdering, Priority, TransactionOrdering},
|
||||||
|
|||||||
Reference in New Issue
Block a user