Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit d65af2f

Browse files
committed
debug root fixed column variadic issue
1 parent 594e7a5 commit d65af2f

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rand_chacha = "0.3"
2424
paste = "1.0"
2525
rand_xorshift = "0.3.0"
2626
rand_core = "0.6.4"
27+
itertools = "0.10"
2728
mock = { path = "../mock" }
2829

2930
[dev-dependencies]

integration-tests/src/integration_test_circuits.rs

+19
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use halo2_proofs::{
2525
},
2626
},
2727
};
28+
use itertools::Itertools;
2829
use lazy_static::lazy_static;
2930
use mock::TestContext;
3031
use rand_chacha::rand_core::SeedableRng;
@@ -383,6 +384,24 @@ impl<C: SubCircuit<Fr> + Circuit<Fr>> IntegrationTest<C> {
383384

384385
match self.root_fixed.clone() {
385386
Some(prev_fixed) => {
387+
fixed.iter().enumerate().zip_eq(prev_fixed.iter()).for_each(
388+
|((index, col1), col2)| {
389+
if !col1.eq(col2) {
390+
println!("on column index {} not equal", index);
391+
col1.iter().enumerate().zip_eq(col2.iter()).for_each(
392+
|((index, cellv1), cellv2)| {
393+
assert!(
394+
cellv1.eq(&cellv2),
395+
"cellv1 {:?} != cellv2 {:?} on index {}",
396+
cellv1,
397+
cellv2,
398+
index
399+
);
400+
},
401+
);
402+
}
403+
},
404+
);
386405
assert!(
387406
fixed.eq(&prev_fixed),
388407
"root circuit fixed columns are not constant for different witnesses"

0 commit comments

Comments
 (0)