fix: skip isthmus root validation if we dont have the parent state (#15796)

This commit is contained in:
Matthias Seitz
2025-04-17 20:22:43 +02:00
committed by GitHub
parent 58c72b708a
commit 94ee821803

View File

@@ -141,9 +141,12 @@ where
block: &RecoveredBlock<Self::Block>,
) -> Result<(), ConsensusError> {
if self.chain_spec().is_isthmus_active_at_timestamp(block.timestamp()) {
let state = self.provider.state_by_block_hash(block.parent_hash()).map_err(|err| {
ConsensusError::Other(format!("failed to verify block post-execution: {err}"))
})?;
let Ok(state) = self.provider.state_by_block_hash(block.parent_hash()) else {
// FIXME: we don't necessarily have access to the parent block here because the
// parent block isn't necessarily part of the canonical chain yet. Instead this
// function should receive the list of in memory blocks as input
return Ok(())
};
let predeploy_storage_updates = state_updates
.storages
.get(&self.hashed_addr_l2tol1_msg_passer)