Skip to content

Commit

Permalink
refactor: make blitzar_handle private
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtrombetta committed Jun 14, 2024
1 parent 09e4894 commit 918a3b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct PublicParameters {
pub(super) max_nu: usize,
/// The handle to the `blitzar` Gamma_1 instances.
#[cfg(feature = "blitzar")]
pub(super) blitzar_handle: MsmHandle<ElementP2<ark_bls12_381::g1::Config>>,
blitzar_handle: MsmHandle<ElementP2<ark_bls12_381::g1::Config>>,
}

impl Clone for PublicParameters {
Expand Down Expand Up @@ -73,6 +73,12 @@ impl PublicParameters {
}
}

/// Get a reference to the blitzar handle.
#[cfg(feature = "blitzar")]
pub fn get_blitzar_handle(&self) -> &MsmHandle<ElementP2<ark_bls12_381::g1::Config>> {
&self.blitzar_handle
}

#[cfg(feature = "blitzar")]
#[tracing::instrument(name = "PublicParameters::blitzar_msm", level = "debug", skip_all)]
pub(super) fn blitzar_msm(
Expand Down
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/proof_primitive/dory/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct ProverSetup<'a> {
pub(super) max_nu: usize,
/// The handle to the `blitzar` Gamma_1 instances.
#[cfg(feature = "blitzar")]
pub(super) blitzar_handle: &'a MsmHandle<ElementP2<ark_bls12_381::g1::Config>>,
blitzar_handle: &'a MsmHandle<ElementP2<ark_bls12_381::g1::Config>>,
}

impl<'a> ProverSetup<'a> {
Expand Down Expand Up @@ -85,7 +85,7 @@ impl<'a> From<&'a PublicParameters> for ProverSetup<'a> {
value.Gamma_2_fin,
value.max_nu,
#[cfg(feature = "blitzar")]
&value.blitzar_handle,
value.get_blitzar_handle(),
)
}
}
Expand Down

0 comments on commit 918a3b5

Please sign in to comment.