Skip to content

Commit

Permalink
refactor: replace code that uses dynamic dory specific code with gene…
Browse files Browse the repository at this point in the history
…ric code where possible
  • Loading branch information
stuarttimwhite committed Dec 10, 2024
1 parent aef4ca1 commit 0904e7e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use super::{
dynamic_dory_structure::{
full_width_of_row, index_from_row_and_column, matrix_size, row_and_column_from_index,
},
G1Affine, F,
};
use super::{G1Affine, F};
use crate::{
base::{commitment::CommittableColumn, database::ColumnType, if_rayon},
proof_primitive::dory::offset_to_bytes::OffsetToBytes,
proof_primitive::{
dory::offset_to_bytes::OffsetToBytes,
dynamic_dory_and_hyrax_common_utils::structure::{
full_width_of_row, index_from_row_and_column, matrix_size, row_and_column_from_index,
},
},
};
use alloc::{vec, vec::Vec};
use ark_ec::CurveGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use super::{
dynamic_dory_helper::{compute_dynamic_v_vec, compute_dynamic_vecs},
DeferredGT, G1Affine, VMVProverState, VMVVerifierState, F,
dynamic_dory_helper::compute_dynamic_v_vec, DeferredGT, DoryScalar, G1Affine, VMVProverState,
VMVVerifierState, F,
};
use crate::proof_primitive::dynamic_dory_and_hyrax_common_utils::standard_basis_helper::compute_dynamic_vecs;
use alloc::vec::Vec;

/// Builds a [`VMVProverState`] from the given parameters.
Expand All @@ -11,7 +12,7 @@ pub(super) fn build_dynamic_vmv_prover_state(
T_vec_prime: Vec<G1Affine>,
nu: usize,
) -> VMVProverState {
let (lo_vec, hi_vec) = compute_dynamic_vecs(b_point);
let (lo_vec, hi_vec) = compute_dynamic_vecs::<DoryScalar, _>(b_point);
let v_vec = compute_dynamic_v_vec(a, &hi_vec, nu);
VMVProverState {
v_vec,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use super::{
dynamic_dory_structure::{full_width_of_row, row_and_column_from_index, row_start_index},
pairings, DoryScalar, DynamicDoryCommitment, G1Projective, ProverSetup, GT,
use super::{pairings, DoryScalar, DynamicDoryCommitment, G1Projective, ProverSetup, GT};
use crate::{
base::{commitment::CommittableColumn, if_rayon, slice_ops::slice_cast},
proof_primitive::dynamic_dory_and_hyrax_common_utils::structure::{
full_width_of_row, row_and_column_from_index, row_start_index,
},
};
use crate::base::{commitment::CommittableColumn, if_rayon, slice_ops::slice_cast};
use alloc::vec::Vec;
use ark_ec::VariableBaseMSM;
use bytemuck::TransparentWrapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use super::{
blitzar_metadata_table::{create_blitzar_metadata_tables, signed_commits},
dynamic_dory_structure::row_and_column_from_index,
pairings, DynamicDoryCommitment, G1Affine, ProverSetup,
};
use crate::base::{commitment::CommittableColumn, if_rayon, slice_ops::slice_cast};
use crate::{
base::{commitment::CommittableColumn, if_rayon, slice_ops::slice_cast},
proof_primitive::dynamic_dory_and_hyrax_common_utils::structure::row_and_column_from_index,
};
use blitzar::compute::ElementP2;
#[cfg(feature = "rayon")]
use rayon::iter::{IntoParallelIterator, ParallelIterator};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
use super::{
blitzar_metadata_table::create_blitzar_metadata_tables,
dynamic_dory_standard_basis_helper::fold_dynamic_standard_basis_tensors,
dynamic_dory_structure::row_and_column_from_index, ExtendedVerifierState, G1Affine,
blitzar_metadata_table::create_blitzar_metadata_tables, ExtendedVerifierState, G1Affine,
ProverSetup, F,
};
use crate::{
base::{commitment::CommittableColumn, slice_ops::slice_cast},
proof_primitive::dory::{
dynamic_dory_standard_basis_helper::compute_dynamic_standard_basis_vecs, DoryScalar,
proof_primitive::{
dory::{
dynamic_dory_standard_basis_helper::compute_dynamic_standard_basis_vecs, DoryScalar,
},
dynamic_dory_and_hyrax_common_utils::{
standard_basis_helper::fold_dynamic_standard_basis_tensors,
structure::row_and_column_from_index,
},
},
};
use alloc::{vec, vec::Vec};
Expand Down

0 comments on commit 0904e7e

Please sign in to comment.