mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Add Transaction AT to ConfigureEvm (#13106)
This commit is contained in:
@ -58,8 +58,15 @@ impl<EvmConfig> EthExecutionStrategyFactory<EvmConfig> {
|
||||
|
||||
impl<EvmConfig> BlockExecutionStrategyFactory for EthExecutionStrategyFactory<EvmConfig>
|
||||
where
|
||||
EvmConfig:
|
||||
Clone + Unpin + Sync + Send + 'static + ConfigureEvm<Header = alloy_consensus::Header>,
|
||||
EvmConfig: Clone
|
||||
+ Unpin
|
||||
+ Sync
|
||||
+ Send
|
||||
+ 'static
|
||||
+ ConfigureEvm<
|
||||
Header = alloy_consensus::Header,
|
||||
Transaction = reth_primitives::TransactionSigned,
|
||||
>,
|
||||
{
|
||||
type Primitives = EthPrimitives;
|
||||
|
||||
@ -128,7 +135,10 @@ where
|
||||
impl<DB, EvmConfig> BlockExecutionStrategy for EthExecutionStrategy<DB, EvmConfig>
|
||||
where
|
||||
DB: Database<Error: Into<ProviderError> + Display>,
|
||||
EvmConfig: ConfigureEvm<Header = alloy_consensus::Header>,
|
||||
EvmConfig: ConfigureEvm<
|
||||
Header = alloy_consensus::Header,
|
||||
Transaction = reth_primitives::TransactionSigned,
|
||||
>,
|
||||
{
|
||||
type DB = DB;
|
||||
type Error = BlockExecutionError;
|
||||
|
||||
@ -62,6 +62,7 @@ impl EthEvmConfig {
|
||||
|
||||
impl ConfigureEvmEnv for EthEvmConfig {
|
||||
type Header = Header;
|
||||
type Transaction = TransactionSigned;
|
||||
type Error = Infallible;
|
||||
|
||||
fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) {
|
||||
|
||||
@ -32,8 +32,6 @@ reth-primitives.workspace = true
|
||||
reth-revm = { workspace = true, features = ["std"] }
|
||||
reth-trie-db.workspace = true
|
||||
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
# revm with required ethereum features
|
||||
revm = { workspace = true, features = ["secp256k1", "blst", "c-kzg"] }
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use alloy_consensus::Header;
|
||||
use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig};
|
||||
use reth_beacon_consensus::EthBeaconConsensus;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -13,7 +12,8 @@ use reth_evm::execute::BasicBlockExecutorProvider;
|
||||
use reth_evm_ethereum::execute::EthExecutionStrategyFactory;
|
||||
use reth_network::{NetworkHandle, PeersInfo};
|
||||
use reth_node_api::{
|
||||
AddOnsContext, ConfigureEvm, EngineValidator, FullNodeComponents, NodeTypesWithDB, TxTy,
|
||||
AddOnsContext, ConfigureEvm, EngineValidator, FullNodeComponents, HeaderTy, NodeTypesWithDB,
|
||||
TxTy,
|
||||
};
|
||||
use reth_node_builder::{
|
||||
components::{
|
||||
@ -242,7 +242,7 @@ impl EthereumPayloadBuilder {
|
||||
where
|
||||
Types: NodeTypesWithEngine<ChainSpec = ChainSpec, Primitives = EthPrimitives>,
|
||||
Node: FullNodeTypes<Types = Types>,
|
||||
Evm: ConfigureEvm<Header = Header>,
|
||||
Evm: ConfigureEvm<Header = HeaderTy<Types>, Transaction = TxTy<Node::Types>>,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
|
||||
+ Unpin
|
||||
+ 'static,
|
||||
|
||||
@ -91,7 +91,7 @@ where
|
||||
// Default implementation of [PayloadBuilder] for unit type
|
||||
impl<EvmConfig, Pool, Client> PayloadBuilder<Pool, Client> for EthereumPayloadBuilder<EvmConfig>
|
||||
where
|
||||
EvmConfig: ConfigureEvm<Header = Header>,
|
||||
EvmConfig: ConfigureEvm<Header = Header, Transaction = TransactionSigned>,
|
||||
Client: StateProviderFactory + ChainSpecProvider<ChainSpec = ChainSpec>,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TransactionSigned>>,
|
||||
{
|
||||
@ -155,7 +155,7 @@ pub fn default_ethereum_payload<EvmConfig, Pool, Client, F>(
|
||||
best_txs: F,
|
||||
) -> Result<BuildOutcome<EthBuiltPayload>, PayloadBuilderError>
|
||||
where
|
||||
EvmConfig: ConfigureEvm<Header = Header>,
|
||||
EvmConfig: ConfigureEvm<Header = Header, Transaction = TransactionSigned>,
|
||||
Client: StateProviderFactory + ChainSpecProvider<ChainSpec = ChainSpec>,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TransactionSigned>>,
|
||||
F: FnOnce(BestTransactionsAttributes) -> BestTransactionsIter<Pool>,
|
||||
|
||||
Reference in New Issue
Block a user