Skip to content

Commit 477b244

Browse files
committed
fix: decoding of merkle root public inputs in chunk aggregator program
1 parent 3ab1c72 commit 477b244

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

aggregation_mode/proof_aggregator/aggregation_programs/zisk/src/chunk_aggregator_main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,10 @@ pub fn main() {
5050
// same public inputs could bypass verification.
5151
assert!(rom_vkey == USER_PROOFS_AGGREGATOR_PROGRAM_ROM_ROOT);
5252

53-
let merkle_root_words: [u64; 4] = publics
54-
.try_into()
55-
.expect("Public input to be the hash of the chunk tree");
56-
5753
let mut merkle_root = [0u8; 32];
58-
for (idx, word) in merkle_root_words.iter().enumerate() {
59-
let start = idx * 8;
60-
merkle_root[start..start + 8].copy_from_slice(&word.to_le_bytes());
54+
for (idx, word) in publics.iter().enumerate() {
55+
let start = idx * 4;
56+
merkle_root[start..start + 4].copy_from_slice(&( *word as u32).to_le_bytes());
6157
}
6258

6359
// Reconstruct the merkle tree and verify that the roots match

0 commit comments

Comments
 (0)