Skip to content

Commit 5397105

Browse files
committed
Address reviews
1 parent 328b772 commit 5397105

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

circuit-prover/examples/mmcs_verify.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() -> Result<(), ProverError> {
4747
// we're proving the opening of an Mmcs to matrices of height 2^depth, 2^(depth -1), ...
4848
let leaves: Vec<Vec<ExprId>> = (0..depth)
4949
.map(|i| {
50-
(0..if (i as usize).is_multiple_of(2) && i != depth - 1 {
50+
(0..if i % 2 == 0 && i != depth - 1 {
5151
mmcs_config.ext_field_digest_elems
5252
} else {
5353
0
@@ -57,7 +57,7 @@ fn main() -> Result<(), ProverError> {
5757
})
5858
.collect();
5959
let directions: Vec<ExprId> = (0..depth)
60-
.map(|_| builder.alloc_public_input("index"))
60+
.map(|_| builder.alloc_public_input("directions"))
6161
.collect();
6262
let expected_root = (0..mmcs_config.ext_field_digest_elems)
6363
.map(|_| builder.alloc_public_input("expected_root"))
@@ -76,7 +76,7 @@ fn main() -> Result<(), ProverError> {
7676
//
7777
let leaves_value: Vec<Vec<F>> = (0..depth)
7878
.map(|i| {
79-
if (i as usize).is_multiple_of(2) && i != depth - 1 {
79+
if i % 2 == 0 && i != depth - 1 {
8080
vec![
8181
F::ZERO,
8282
F::ZERO,

circuit/src/builder/circuit_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct CircuitBuilder<F> {
3030
config: BuilderConfig,
3131
}
3232

33-
/// The non-primitive operation id, type, and the vecotors of the expressions representing its inputs
33+
/// The non-primitive operation id, type, and the vectors of the expressions representing its inputs
3434
pub type NonPrimitiveOperationData = (NonPrimitiveOpId, NonPrimitiveOpType, Vec<Vec<ExprId>>);
3535

3636
impl<F> Default for CircuitBuilder<F>

circuit/src/builder/compiler/non_primitive_lowerer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'a> NonPrimitiveLowerer<'a> {
7474
return Err(CircuitBuilderError::NonPrimitiveOpArity {
7575
op: "MmcsVerify",
7676
expected: format!("{:?}", config.directions_size()),
77-
got: witness_exprs[1].len(),
77+
got: directions_len,
7878
});
7979
}
8080

0 commit comments

Comments
 (0)