diff --git a/crates/executor/src/db/mod.rs b/crates/executor/src/db/mod.rs
index 782bffcd66..355b217883 100644
--- a/crates/executor/src/db/mod.rs
+++ b/crates/executor/src/db/mod.rs
@@ -174,10 +174,14 @@ where
/// - `Ok(Some(TrieAccount))`: The [TrieAccount] of the account.
/// - `Ok(None)`: If the account does not exist in the trie.
/// - `Err(_)`: If the account could not be fetched.
- pub fn get_trie_account(&mut self, address: &Address) -> TrieDBResult> {
+ pub fn get_trie_account(
+ &mut self,
+ address: &Address,
+ block_number: u64,
+ ) -> TrieDBResult > {
// Send a hint to the host to fetch the account proof.
self.hinter
- .hint_account_proof(*address, self.parent_block_header.number)
+ .hint_account_proof(*address, block_number)
.map_err(|e| TrieDBError::Provider(e.to_string()))?;
// Fetch the account from the trie.
@@ -302,7 +306,9 @@ where
fn basic(&mut self, address: Address) -> Result , Self::Error> {
// Fetch the account from the trie.
- let Some(trie_account) = self.get_trie_account(&address)? else {
+ let Some(trie_account) =
+ self.get_trie_account(&address, self.parent_block_header.number)?
+ else {
// If the account does not exist in the trie, return `Ok(None)`.
return Ok(None);
};
diff --git a/crates/executor/src/executor/mod.rs b/crates/executor/src/executor/mod.rs
index 9c46e3b44f..c58f5b6606 100644
--- a/crates/executor/src/executor/mod.rs
+++ b/crates/executor/src/executor/mod.rs
@@ -76,13 +76,16 @@ where
}
/// Fetches the L2 to L1 message passer account from the cache or underlying trie.
- fn message_passer_account(db: &mut TrieDB) -> Result {
+ fn message_passer_account(
+ db: &mut TrieDB,
+ block_number: u64,
+ ) -> Result {
match db.storage_roots().get(&L2_TO_L1_BRIDGE) {
Some(storage_root) => {
storage_root.blinded_commitment().ok_or(TrieDBError::RootNotBlinded)
}
None => Ok(db
- .get_trie_account(&L2_TO_L1_BRIDGE)?
+ .get_trie_account(&L2_TO_L1_BRIDGE, block_number)?
.ok_or(TrieDBError::MissingAccountInfo)?
.storage_root),
}
@@ -339,12 +342,8 @@ where
// If the Isthmus hardfork is active, the withdrawals root is the L2 to L1 message passer
// account.
- // TEMP: The go clients don't yet have this feature. Interop comes after Isthmus, but this
- // feature is excluded from interop for now for early-stage testing purposes.
- if self.config.is_isthmus_active(payload.payload_attributes.timestamp) &&
- !self.config.is_interop_active(payload.payload_attributes.timestamp)
- {
- withdrawals_root = Some(Self::message_passer_account(state.database)?);
+ if self.config.is_isthmus_active(payload.payload_attributes.timestamp) {
+ withdrawals_root = Some(Self::message_passer_account(state.database, block_number)?);
}
// Compute logs bloom filter for the block.
@@ -445,7 +444,8 @@ where
/// - `Ok(output_root)`: The computed output root.
/// - `Err(_)`: If an error occurred while computing the output root.
pub fn compute_output_root(&mut self) -> ExecutorResult {
- let storage_root = Self::message_passer_account(&mut self.trie_db)?;
+ let parent_number = self.trie_db.parent_block_header().number;
+ let storage_root = Self::message_passer_account(&mut self.trie_db, parent_number)?;
let parent_header = self.trie_db.parent_block_header();
info!(
@@ -467,7 +467,7 @@ where
info!(
target: "client_executor",
"Computed output root for block # {block_number} | Output root: {output_root}",
- block_number = parent_header.number,
+ block_number = parent_number,
);
// Hash the output and return