Skip to content

Commit cca9966

Browse files
committed
faster xmss encoding in zkDSL
1 parent 0bbc44e commit cca9966

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/rec_aggregation/xmss_aggregate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def xmss_verify(merkle_root, message, slot_lo, slot_hi, merkle_chunks):
5151
assert remaining[i] < 2**7 - 1 # ensures uniformity + prevent overflow
5252

5353
partial_sum: Mut = remaining[i] * 2**24
54-
for j in unroll(0, 24 / (2 * W)):
54+
partial_sum += encoding[i * (24 / (2 * W))]
55+
for j in unroll(1, 24 / (2 * W)):
5556
partial_sum += encoding[i * (24 / (2 * W)) + j] * (CHAIN_LENGTH**2) ** j
5657
assert partial_sum == encoding_fe[i]
5758

0 commit comments

Comments
 (0)