diff --git a/Cargo.lock b/Cargo.lock index 4b2bceb1dd..d7fe780730 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,9 +236,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8390cb5c872d53560635dabc02d616c1bb626dd0f7d6893f8725edb822573fed" +checksum = "4f853de9ca1819f54de80de5d03bfc1bb7c9fafcf092b480a654447141bc354d" dependencies = [ "alloy-eip2124", "alloy-eip2930", diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index a5f85ac6ed..2e30691916 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -691,7 +691,7 @@ where { self.fork_tracker .max_blob_count - .store(blob_params.max_blob_count, std::sync::atomic::Ordering::Relaxed); + .store(blob_params.max_blobs_per_tx, std::sync::atomic::Ordering::Relaxed); } self.block_gas_limit.store(new_tip_block.gas_limit(), std::sync::atomic::Ordering::Relaxed); @@ -781,7 +781,7 @@ impl EthTransactionValidatorBuilder { osaka: false, // max blob count is prague by default - max_blob_count: BlobParams::prague().max_blob_count, + max_blob_count: BlobParams::prague().max_blobs_per_tx, } } @@ -905,7 +905,7 @@ impl EthTransactionValidatorBuilder { .chain_spec() .blob_params_at_timestamp(timestamp) .unwrap_or_else(BlobParams::cancun) - .max_blob_count; + .max_blobs_per_tx; self } @@ -955,11 +955,10 @@ impl EthTransactionValidatorBuilder { .. } = self; - // TODO: use osaka max blob count once is released let max_blob_count = if prague { - BlobParams::prague().max_blob_count + BlobParams::prague().max_blobs_per_tx } else { - BlobParams::cancun().max_blob_count + BlobParams::cancun().max_blobs_per_tx }; let fork_tracker = ForkTracker { @@ -1045,7 +1044,7 @@ pub struct ForkTracker { pub prague: AtomicBool, /// Tracks if osaka is activated at the block's timestamp. pub osaka: AtomicBool, - /// Tracks max blob count at the block's timestamp. + /// Tracks max blob count per transaction at the block's timestamp. pub max_blob_count: AtomicU64, } @@ -1070,7 +1069,7 @@ impl ForkTracker { self.osaka.load(std::sync::atomic::Ordering::Relaxed) } - /// Returns the max blob count. + /// Returns the max allowed blob count per transaction. pub fn max_blob_count(&self) -> u64 { self.max_blob_count.load(std::sync::atomic::Ordering::Relaxed) }