Introduce HashedPostStateProvider (#12607)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
frisitano
2024-12-04 00:56:17 +08:00
committed by GitHub
parent e4c7fac9db
commit 886471d693
42 changed files with 318 additions and 137 deletions

View File

@ -25,7 +25,6 @@ reth-basic-payload-builder.workspace = true
reth-evm.workspace = true
reth-evm-ethereum.workspace = true
reth-errors.workspace = true
reth-trie.workspace = true
reth-chain-state.workspace = true
reth-chainspec.workspace = true

View File

@ -39,7 +39,6 @@ use reth_transaction_pool::{
error::InvalidPoolTransactionError, noop::NoopTransactionPool, BestTransactions,
BestTransactionsAttributes, PoolTransaction, TransactionPool, ValidPoolTransaction,
};
use reth_trie::HashedPostState;
use revm::{
db::{states::bundle_state::BundleRetention, State},
primitives::{
@ -413,7 +412,7 @@ where
let logs_bloom = execution_outcome.block_logs_bloom(block_number).expect("Number is in range");
// calculate the state root
let hashed_state = HashedPostState::from_bundle_state(&execution_outcome.state().state);
let hashed_state = db.database.db.hashed_post_state(execution_outcome.state());
let (state_root, trie_output) = {
db.database.inner().state_root_with_updates(hashed_state.clone()).inspect_err(|err| {
warn!(target: "payload_builder",