From 447c8c772ffcdd40209d0968b653d95611df2c9f Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 12 Mar 2024 10:24:31 +0100 Subject: [PATCH] circuit: fix comment Co-Authored-By: Balazs Komuves --- circuit/merkle.circom | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/circuit/merkle.circom b/circuit/merkle.circom index b1f564c..0396436 100644 --- a/circuit/merkle.circom +++ b/circuit/merkle.circom @@ -37,8 +37,11 @@ template RootFromMerklePath( maxDepth ) { signal aux[ maxDepth+1 ]; aux[0] <== leaf; - // compute which binary postfixes of the index is the same as the - // corresponding postfix of the last index + // Determine whether nodes from the path are last in their row and are odd, + // by computing which binary prefixes of the index are the same as the + // corresponding prefix of the last index. + // This is done in reverse bit order, because pathBits and lastBits have the + // least significant bit first. component eq[ maxDepth ]; signal isLast[ maxDepth+1 ]; isLast[ maxDepth ] <== 1;