@@ -1343,19 +1343,14 @@ fn collect_byte_check_ops_for_padding(num_padding_rows: usize) -> Vec<BitwiseOpe
13431343 ops
13441344}
13451345
1346- /// Collects IS_BYTE lookups from PAGE data (init and fini values).
1347- ///
1348- /// Each PAGE byte generates 2 IS_BYTE lookups:
1349- /// - C1: IS_BYTE[init] for initialization range check
1350- /// - C2: IS_BYTE[fini] for finalization range check
1351- ///
1352- /// This must be called BEFORE bitwise multiplicities are updated.
1353- /// Build a page_base → init_data map from the ELF segments and the private input region.
1346+ /// Build a `page_base → init_data` map from the ELF segments and the private
1347+ /// input region.
13541348///
1355- /// The private input is laid out at `PRIVATE_INPUT_START_INDEX` as a 4-byte LE length
1356- /// prefix followed by the raw bytes (matching `Memory::store_private_inputs` and
1357- /// `MemoryState::add_private_input`). Both the prover (trace generation) and verifier
1358- /// (page config reconstruction) call this so they agree on PAGE init values exactly.
1349+ /// The private input is laid out at `PRIVATE_INPUT_START_INDEX` as a 4-byte LE
1350+ /// length prefix followed by the raw bytes (matching
1351+ /// `Memory::store_private_inputs` and `MemoryState::add_private_input`). Both
1352+ /// the prover (trace generation) and verifier (page config reconstruction) call
1353+ /// this so they agree on PAGE init values exactly.
13591354fn build_init_page_data ( elf : & Elf , private_input : & [ u8 ] ) -> HashMap < u64 , Vec < u8 > > {
13601355 use executor:: vm:: memory:: PRIVATE_INPUT_START_INDEX ;
13611356 let page_size = page:: DEFAULT_PAGE_SIZE ;
@@ -1400,6 +1395,13 @@ fn build_init_page_data(elf: &Elf, private_input: &[u8]) -> HashMap<u64, Vec<u8>
14001395 init_page_data
14011396}
14021397
1398+ /// Collects IS_BYTE lookups from PAGE data (init and fini values).
1399+ ///
1400+ /// Each PAGE byte generates 2 IS_BYTE lookups:
1401+ /// - C1: IS_BYTE[init] for initialization range check
1402+ /// - C2: IS_BYTE[fini] for finalization range check
1403+ ///
1404+ /// This must be called BEFORE bitwise multiplicities are updated.
14031405fn collect_bitwise_from_page (
14041406 elf : & Elf ,
14051407 memory_state : & MemoryState ,
@@ -1694,11 +1696,13 @@ impl Traces {
16941696 }
16951697 }
16961698
1697- /// Extract page configurations from ELF only (deterministic from binary).
1699+ /// Extract page configurations for the deterministic portion of memory:
1700+ /// ELF segments and the private-input region at `PRIVATE_INPUT_START_INDEX`.
16981701 ///
1699- /// Returns PageConfigs for pages covered by ELF segments, with their
1700- /// init data populated. Used by the verifier to reconstruct the ELF
1701- /// portion of the PAGE table layout.
1702+ /// Returns PageConfigs for every page covered by an ELF segment or by the
1703+ /// private-input bytes, with init data populated. Used by the verifier to
1704+ /// reconstruct these pages (runtime-only pages like stack/heap come from
1705+ /// `page_configs_from_elf_and_runtime`).
17021706 pub fn page_configs_from_elf ( elf : & Elf , private_input : & [ u8 ] ) -> Vec < PageConfig > {
17031707 let page_size = page:: DEFAULT_PAGE_SIZE ;
17041708 let init_page_data = build_init_page_data ( elf, private_input) ;
0 commit comments