From 7ac21d6acf0776726c65bfe51a999c6e22fc8a13 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Fri, 31 Jan 2025 09:29:32 -0700 Subject: [PATCH] docs: comments for BlevmAggOutput and PublicWitness (#118) Comments captured during a sync. --- ibc/lightclients/groth16/witness.go | 1 + provers/blevm/common/src/lib.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ibc/lightclients/groth16/witness.go b/ibc/lightclients/groth16/witness.go index c981e4c..9536bf8 100644 --- a/ibc/lightclients/groth16/witness.go +++ b/ibc/lightclients/groth16/witness.go @@ -7,6 +7,7 @@ import ( "github.com/consensys/gnark/backend/witness" ) +// PublicWitness should match the public outputs of the SP1 program. type PublicWitness struct { TrustedHeight int64 // Provided by the relayer/user TrustedCelestiaHeaderHash []byte // Provided by the ZK IBC Client diff --git a/provers/blevm/common/src/lib.rs b/provers/blevm/common/src/lib.rs index d108007..e132e8d 100644 --- a/provers/blevm/common/src/lib.rs +++ b/provers/blevm/common/src/lib.rs @@ -14,9 +14,20 @@ pub struct BlevmOutput { #[derive(Serialize, Deserialize)] pub struct BlevmAggOutput { + // newest_header_hash is the last block's hash on the EVM roll-up. + // TODO: this may be removable. pub newest_header_hash: [u8; 32], + // oldest_header_hash is the earliest block's hash on the EVM roll-up. + // TODO: this may be removable. pub oldest_header_hash: [u8; 32], - pub celestia_header_hashes: Vec<[u8; 32]>, + // celestia_header_hashes is the range of Celestia blocks that include all + // of the blob data the EVM roll-up has posted from oldest_header_hash to + // newest_header_hash. + pub celestia_header_hashes: Vec<[u8; 32]>, // provided by Celestia state machine (eventually x/header) + // newest_state_root is the computed state root of the EVM roll-up after + // processing blocks from oldest_header_hash to newest_header_hash. pub newest_state_root: [u8; 32], + // newest_height is the most recent block number of the EVM roll-up. + // TODO: this may be removable. pub newest_height: u64, }