Skip to content

Commit b539348

Browse files
lean-applemattsse
andauthored
feat(cli): add cli flag --txpool.disable-blobs-support to disable blob support (paradigmxyz#19559)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
1 parent db1737e commit b539348

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

crates/ethereum/node/src/node.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ where
453453
async fn build_pool(self, ctx: &BuilderContext<Node>) -> eyre::Result<Self::Pool> {
454454
let pool_config = ctx.pool_config();
455455

456+
let blobs_disabled = ctx.config().txpool.disable_blobs_support ||
457+
ctx.config().txpool.blobpool_max_count == 0;
458+
456459
let blob_cache_size = if let Some(blob_cache_size) = pool_config.blob_cache_size {
457460
Some(blob_cache_size)
458461
} else {
@@ -475,8 +478,9 @@ where
475478

476479
let validator = TransactionValidationTaskExecutor::eth_builder(ctx.provider().clone())
477480
.with_head_timestamp(ctx.head().timestamp)
478-
.with_max_tx_input_bytes(ctx.config().txpool.max_tx_input_bytes)
481+
.set_eip4844(!blobs_disabled)
479482
.kzg_settings(ctx.kzg_settings()?)
483+
.with_max_tx_input_bytes(ctx.config().txpool.max_tx_input_bytes)
480484
.with_local_transactions_config(pool_config.local_transactions_config.clone())
481485
.set_tx_fee_cap(ctx.config().rpc.rpc_tx_fee_cap)
482486
.with_max_tx_gas_limit(ctx.config().txpool.max_tx_gas_limit)

crates/node/core/src/args/txpool.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ pub struct TxPoolArgs {
5353
#[arg(long = "txpool.blob-cache-size", alias = "txpool.blob_cache_size")]
5454
pub blob_cache_size: Option<u32>,
5555

56+
/// Disable EIP-4844 blob transaction support
57+
#[arg(long = "txpool.disable-blobs-support", alias = "txpool.disable_blobs_support", default_value_t = false, conflicts_with_all = ["blobpool_max_count", "blobpool_max_size", "blob_cache_size", "blob_transaction_price_bump"])]
58+
pub disable_blobs_support: bool,
59+
5660
/// Max number of executable transaction slots guaranteed per account
5761
#[arg(long = "txpool.max-account-slots", alias = "txpool.max_account_slots", default_value_t = TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER)]
5862
pub max_account_slots: usize,
@@ -168,6 +172,7 @@ impl Default for TxPoolArgs {
168172
blobpool_max_count: TXPOOL_SUBPOOL_MAX_TXS_DEFAULT,
169173
blobpool_max_size: TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT,
170174
blob_cache_size: None,
175+
disable_blobs_support: false,
171176
max_account_slots: TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER,
172177
price_bump: DEFAULT_PRICE_BUMP,
173178
minimal_protocol_basefee: MIN_PROTOCOL_BASE_FEE,

docs/vocs/docs/pages/cli/reth/node.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ TxPool:
537537
--txpool.blob-cache-size <BLOB_CACHE_SIZE>
538538
Max number of entries for the in memory cache of the blob store
539539
540+
--txpool.disable-blobs-support
541+
Disable EIP-4844 blob transaction support
542+
540543
--txpool.max-account-slots <MAX_ACCOUNT_SLOTS>
541544
Max number of executable transaction slots guaranteed per account
542545

0 commit comments

Comments
 (0)