risc0 / risc0-ethereum

Integration of the RISC Zero verifiable compute platform with Ethereum and EVM chains.
https://risczero.com
Apache License 2.0
84 stars 17 forks source link

feat: Add version to Steel commitments #189

Closed Wollac closed 2 months ago

Wollac commented 2 months ago

This PR adds a version to the commitments generated by Steel. This allows us to distinguish between regular block commits (verified using the blockhash opcode) and beacon commits (verified using the EIP-4788 beacon roots contract) based on the commitment data alone.

It uses the top 2 bytes of the commitment's blockID field as the version. This leaves a uint240 for the actual identifier, which is more than sufficient for the block number or block timestamp.