feat: adding cli --rpc.txfeecap flag (#15654)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
rrrengineer
2025-04-15 11:30:12 -07:00
committed by GitHub
parent a21769686c
commit 4850bd5ebc
10 changed files with 226 additions and 3 deletions

View File

@@ -200,6 +200,15 @@ pub enum InvalidPoolTransactionError {
#[error("transaction's gas limit {0} exceeds block's gas limit {1}")]
ExceedsGasLimit(u64, u64),
/// Thrown when a new transaction is added to the pool, but then immediately discarded to
/// respect the tx fee exceeds the configured cap
#[error("tx fee ({max_tx_fee_wei} wei) exceeds the configured cap ({tx_fee_cap_wei} wei)")]
ExceedsFeeCap {
/// max fee in wei of new tx submitted to the pull (e.g. 0.11534 ETH)
max_tx_fee_wei: u128,
/// configured tx fee cap in wei (e.g. 1.0 ETH)
tx_fee_cap_wei: u128,
},
/// Thrown when a new transaction is added to the pool, but then immediately discarded to
/// respect the `max_init_code_size`.
#[error("transaction's input size {0} exceeds max_init_code_size {1}")]
ExceedsMaxInitCodeSize(usize, usize),
@@ -287,6 +296,7 @@ impl InvalidPoolTransactionError {
}
}
Self::ExceedsGasLimit(_, _) => true,
Self::ExceedsFeeCap { max_tx_fee_wei: _, tx_fee_cap_wei: _ } => true,
Self::ExceedsMaxInitCodeSize(_, _) => true,
Self::OversizedData(_, _) => true,
Self::Underpriced => {