Skip to content

Commit

Permalink
Resolve merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunming Jiang committed Jan 24, 2025
1 parent 8d2336a commit e9b4147
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spartan_parallel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ impl<S: SpartanExtensionField> ProverWitnessSecInfo<S> {
fn merge(components: Vec<&ProverWitnessSecInfo<S>>) -> (ProverWitnessSecInfo<S>, Vec<usize>) {
// Merge algorithm with pointer on each component
let mut pointers = vec![0; components.len()];
let merged_size = components.iter().fold(0, |a, b| a + b.num_inputs.len());
let merged_size = components.iter().map(|c| c.num_inputs.len()).sum();
// Map from instances of the merged ProverWitnessSec to each component
let mut inst_map = Vec::new();
let mut merged_num_inputs = Vec::new();
Expand Down Expand Up @@ -571,7 +571,7 @@ impl VerifierWitnessSecInfo {
fn merge(components: Vec<&VerifierWitnessSecInfo>) -> (VerifierWitnessSecInfo, Vec<usize>) {
// Merge algorithm with pointer on each component
let mut pointers = vec![0; components.len()];
let merged_size = components.iter().fold(0, |a, b| a + b.num_inputs.len());
let merged_size = components.iter().map(|c| c.num_inputs.len()).sum();
// Map from instances of the merged ProverWitnessSec to each component
let mut inst_map = Vec::new();
let mut merged_num_inputs = Vec::new();
Expand Down
2 changes: 1 addition & 1 deletion spartan_parallel/src/r1csproof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl<S: SpartanExtensionField + Send + Sync> R1CSProof<S> {
let q_w = if ws.w_mat[p_w].len() == 1 { 0 } else { q };

let r_w = if ws.num_inputs[p_w] < num_inputs[p][w] {
let padding = std::iter::repeat(S::field_zero()).take(num_inputs[p][w] - ws.num_inputs[p_w]).collect::<Vec<S>>();
let padding = std::iter::repeat(ZERO).take(num_inputs[p][w] - ws.num_inputs[p_w]).collect::<Vec<S>>();
let mut r = ws.w_mat[p_w][q_w].clone();
r.extend(padding);
r
Expand Down
2 changes: 1 addition & 1 deletion zok_tests/benchmarks/poseidon_test/poseidon_const.zok
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const u32 REPETITION = 10000
const u32 REPETITION = 1000

0 comments on commit e9b4147

Please sign in to comment.