Steel’s Trust Anchor: The Blockhash
Steel uses revm to generate an EVM execution environment,EvmEnv within the guest. When you create the EvmEnv, you can specify a block (the default is the latest block).
getStorageAt) during the preflight call. Once the preflighting is done, into_input is called:
into_input step, the preflight data is packed into a form that can be read and validated in the guest.
Crucially, during the step, Steel will use the RPC call eth_getProof for all accounts accessed during the preflight and the return data is combined into a sparse Merkle trie.
Within the guest, calling into_env checks that all Merkle tries are consistent, have the correct root and computes the corresponding block hash.
This blockhash is Steel’s trust anchor; it needs to be recomputed within the guest to validate the integrity of the RPC data.
What is a Steel Commitment?
A commitment consists of two values: the block ID and the block digest. The block ID encodes two values, the Steel version number and a block identifier (e.g. a block number).increment function in the Counter contract, we saw this require statement:
validateCommitment :
Validation of Steel Commitments
Steel supports two methods of commitment validation (seevalidateCommitment in Steel.sol); This validation onchain is essential to ensure that the proof accurately reflects the correct blockchain state.
- Block hash commitment
blockhash opcode to commit to a block hash that is no more than 256 blocks old. With Ethereum’s 12-second block time, this provides a window of about 50 minutes to generate the proof and ensure that the validating transaction is contained in a block. This approach will work for most scenarios, including complex computations, as it typically provides sufficient time to generate the proof.
- Beacon Block Root Commitment
EvmEnv::builder().beacon_api(). However, this approach is specific to Ethereum (L1) Steel proofs and depends on the implementation of EIP-4788.
Note that EIP-4788 only provides access to the parent beacon root, requiring iterative queries in Solidity to retrieve the target beacon root for validation. This iterative process can result in slightly higher gas costs compared to using the blockhash opcode. Overall, it is suitable for environments where longer proof generation times are required.