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

@ -17,7 +17,7 @@ use reth_revm::{
};
use reth_rpc_api::DebugApiClient;
use reth_tracing::tracing::warn;
use reth_trie::{updates::TrieUpdates, HashedPostState, HashedStorage};
use reth_trie::{updates::TrieUpdates, HashedStorage};
use serde::Serialize;
use std::{collections::HashMap, fmt::Debug, fs::File, io::Write, path::PathBuf};
@ -129,7 +129,7 @@ where
//
// Note: We grab *all* accounts in the cache here, as the `BundleState` prunes
// referenced accounts + storage slots.
let mut hashed_state = HashedPostState::from_bundle_state(&bundle_state.state);
let mut hashed_state = db.database.hashed_post_state(&bundle_state);
for (address, account) in db.cache.accounts {
let hashed_address = keccak256(address);
hashed_state