Recompute a version-zero OP output root for one L2 block

An output proposal commits to a combination of roots and a block hash. Comparing the proposal directly with the L2 state root will report a mismatch on a healthy chain.

Read all components at the same block

Pin a canonical L2 block hash. Obtain its execution stateRoot and the L2ToL1MessagePasser storage root for precisely that block. Under Isthmus the corresponding withdrawal storage root is also available in the L2 header’s withdrawalsRoot.

keccak256(bytes32(0) || stateRoot || withdrawalStorageRoot || l2BlockHash)

Concatenate the four 32-byte values shown below, then take Ethereum Keccak-256 of the resulting 128 bytes. The version occupies a full zero word. Hashing the ASCII hex strings or a one-byte version produces another digest.

Compare only compatible commitment formats

Record chain ID, target L2 block and output version alongside the computed value. A matching root checks the preimage you assembled. Whether a proposal is eligible for withdrawal proofs depends separately on the portal and dispute-game rules deployed on the chain. specs.optimism.io OP Stack specification