chore: reduce revm scope in txpool (#13274)

This commit is contained in:
Matthias Seitz
2024-12-11 08:35:11 +01:00
committed by GitHub
parent 9be5a78146
commit b424ad36dc
8 changed files with 22 additions and 22 deletions

View File

@ -23,10 +23,11 @@ reth-execution-types.workspace = true
reth-fs-util.workspace = true
reth-storage-api.workspace = true
reth-tasks.workspace = true
revm.workspace = true
revm-primitives.workspace = true
revm-interpreter.workspace = true
# ethereum
alloy-eips.workspace = true
alloy-eips = { workspace = true, features = ["kzg"] }
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-consensus.workspace = true
@ -85,9 +86,10 @@ serde = [
"bitflags/serde",
"parking_lot/serde",
"rand?/serde",
"revm/serde",
"smallvec/serde",
"reth-primitives-traits/serde",
"revm-interpreter/serde",
"revm-primitives/serde"
]
test-utils = [
"rand",
@ -97,7 +99,6 @@ test-utils = [
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-provider/test-utils",
"revm/test-utils",
"reth-primitives-traits/test-utils",
]
arbitrary = [
@ -110,9 +111,10 @@ arbitrary = [
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary",
"bitflags/arbitrary",
"revm/arbitrary",
"reth-primitives-traits/arbitrary",
"smallvec/arbitrary",
"revm-interpreter/arbitrary",
"revm-primitives/arbitrary"
]
[[bench]]

View File

@ -18,16 +18,12 @@ use alloy_consensus::{
},
BlockHeader,
};
use alloy_eips::eip4844::MAX_BLOBS_PER_BLOCK;
use alloy_eips::eip4844::{env_settings::EnvKzgSettings, MAX_BLOBS_PER_BLOCK};
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_primitives::{InvalidTransactionError, SealedBlock};
use reth_primitives_traits::GotExpected;
use reth_storage_api::{AccountReader, StateProviderFactory};
use reth_tasks::TaskSpawner;
use revm::{
interpreter::gas::validate_initial_tx_gas,
primitives::{EnvKzgSettings, SpecId},
};
use std::{
marker::PhantomData,
sync::{atomic::AtomicBool, Arc},
@ -807,6 +803,7 @@ pub fn ensure_intrinsic_gas<T: EthPoolTransaction>(
transaction: &T,
fork_tracker: &ForkTracker,
) -> Result<(), InvalidPoolTransactionError> {
use revm_primitives::SpecId;
let spec_id = if fork_tracker.is_prague_activated() {
SpecId::PRAGUE
} else if fork_tracker.is_shanghai_activated() {
@ -815,7 +812,7 @@ pub fn ensure_intrinsic_gas<T: EthPoolTransaction>(
SpecId::MERGE
};
let gas_after_merge = validate_initial_tx_gas(
let gas_after_merge = revm_interpreter::gas::validate_initial_tx_gas(
spec_id,
transaction.input(),
transaction.is_create(),