Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bin/host/src/fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ where
anyhow::bail!("Invalid hint data length: {}", hint_data.len());
}

// Fetch the raw header from the L1 chain provider.
// Fetch the raw header from the L2 chain provider.
let hash: B256 = hint_data
.as_ref()
.try_into()
Expand All @@ -209,7 +209,7 @@ where
PreimageKey::new(*hash, PreimageKeyType::Keccak256).into(),
raw_header.into(),
);
}
},
HintType::L2Transactions => todo!(),
HintType::L2Code => {
// geth hashdb scheme code hash key prefix
Expand Down Expand Up @@ -277,11 +277,11 @@ where
.await
.map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?;

let mut raw_output = [0u8; 97];
raw_output[0] = OUTPUT_ROOT_VERSION;
raw_output[1..33].copy_from_slice(header.state_root.as_ref());
raw_output[33..65].copy_from_slice(l2_to_l1_message_passer.storage_hash.as_ref());
raw_output[65..97].copy_from_slice(self.l2_head.as_ref());
let mut raw_output = [0u8; 128];
raw_output[31] = OUTPUT_ROOT_VERSION;
raw_output[32..64].copy_from_slice(header.state_root.as_ref());
raw_output[64..96].copy_from_slice(l2_to_l1_message_passer.storage_hash.as_ref());
raw_output[96..128].copy_from_slice(self.l2_head.as_ref());
let output_root = keccak256(raw_output);

let mut kv_write_lock = self.kv_store.write().await;
Expand Down