From 16eb4e72f9c284b1768d62d18a817cb4dd22d481 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 18 Nov 2025 11:16:01 +0000 Subject: [PATCH 1/2] chore: add inline-docs for avoiding confusion --- crates/libzkp/src/tasks/batch.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/libzkp/src/tasks/batch.rs b/crates/libzkp/src/tasks/batch.rs index b1100e4a6e..af8b157787 100644 --- a/crates/libzkp/src/tasks/batch.rs +++ b/crates/libzkp/src/tasks/batch.rs @@ -35,8 +35,14 @@ pub struct BatchHeaderValidiumWithHash { #[derive(Clone, serde::Deserialize, serde::Serialize)] #[serde(untagged)] pub enum BatchHeaderV { + /// Header for validium mode. Validium(BatchHeaderValidiumWithHash), + /// Header for scroll's STF version v6. V6(BatchHeaderV6), + /// Header for scroll's STF versions v7, v8, v9. + /// + /// Since the codec essentially is unchanged for the above STF versions, we do not define new + /// variants, instead re-using the [`BatchHeaderV7`] variant. V7_8_9(BatchHeaderV7), } @@ -240,6 +246,17 @@ impl BatchProvingTask { (Domain::Scroll, STFVersion::V7) => { ReferenceHeader::V7(*self.batch_header.must_v7_header()) } + // The da-codec for STF versions v7, v8, v9 is identical. In zkvm-prover we do not + // create additional variants to indicate the identical behaviour of codec. Instead we + // add a separate variant for the STF version. + // + // We handle the different STF versions here however build the same batch header since + // that type does not change. The batch header's version byte constructed in the + // coordinator actually defines the STF version (v8 or v9) and we can derive the + // hard-fork (feynman or galileo) and the codec (simply v8 in this case) from the + // version byte. + // + // Refer [`scroll_zkvm_types::public_inputs::Version`]. (Domain::Scroll, STFVersion::V8) | (Domain::Scroll, STFVersion::V9) => { ReferenceHeader::V8(*self.batch_header.must_v8_header()) } From a2462b0dd77a7f3b8d46b8829c72166130ae5293 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Tue, 18 Nov 2025 15:55:35 +0000 Subject: [PATCH 2/2] chore: update inline-doc --- crates/libzkp/src/tasks/batch.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/libzkp/src/tasks/batch.rs b/crates/libzkp/src/tasks/batch.rs index af8b157787..3267c7c00e 100644 --- a/crates/libzkp/src/tasks/batch.rs +++ b/crates/libzkp/src/tasks/batch.rs @@ -252,9 +252,8 @@ impl BatchProvingTask { // // We handle the different STF versions here however build the same batch header since // that type does not change. The batch header's version byte constructed in the - // coordinator actually defines the STF version (v8 or v9) and we can derive the - // hard-fork (feynman or galileo) and the codec (simply v8 in this case) from the - // version byte. + // coordinator actually defines the STF version (v7, v8 or v9) and we can derive the + // hard-fork (feynman or galileo) and the codec from the version byte. // // Refer [`scroll_zkvm_types::public_inputs::Version`]. (Domain::Scroll, STFVersion::V8) | (Domain::Scroll, STFVersion::V9) => {