Struct snarkvm_algorithms::polycommit::sonic_pc::VerifierUnionKey
source · pub struct VerifierUnionKey<'a, E: PairingEngine> {
pub vk: &'a VerifierKey<E>,
pub degree_bounds_and_neg_powers_of_h: Option<Vec<(usize, &'a E::G2Affine)>>,
pub degree_bounds_and_prepared_neg_powers_of_h: Option<Vec<(usize, &'a <E::G2Affine as PairingCurve>::Prepared)>>,
pub supported_degree: usize,
pub max_degree: usize,
}
Expand description
VerifierKey
is used to check evaluation proofs for a given commitment.
Fields§
§vk: &'a VerifierKey<E>
The verification key for the underlying KZG10 scheme.
degree_bounds_and_neg_powers_of_h: Option<Vec<(usize, &'a E::G2Affine)>>
Pairs a degree_bound with its corresponding G2 element.
Each pair is in the form (degree_bound, \beta^{degree_bound - max_degree} h),
where h
is the generator of G2 above
degree_bounds_and_prepared_neg_powers_of_h: Option<Vec<(usize, &'a <E::G2Affine as PairingCurve>::Prepared)>>
The prepared version of degree_bounds_and_neg_powers_of_h
.
supported_degree: usize
The maximum degree supported by the trimmed parameters that self
is
a part of.
max_degree: usize
The maximum degree supported by the UniversalParams
self
was derived
from.
Implementations§
source§impl<'a, E: PairingEngine> VerifierUnionKey<'a, E>
impl<'a, E: PairingEngine> VerifierUnionKey<'a, E>
sourcepub fn get_shift_power(&self, degree_bound: usize) -> Option<&E::G2Affine>
pub fn get_shift_power(&self, degree_bound: usize) -> Option<&E::G2Affine>
Find the appropriate shift for the degree bound.
pub fn get_prepared_shift_power( &self, degree_bound: usize ) -> Option<<E::G2Affine as PairingCurve>::Prepared>
pub fn max_degree(&self) -> usize
pub fn union<T: IntoIterator<Item = &'a VerifierKey<E>>>( verifier_keys: T ) -> Self
Trait Implementations§
source§impl<'a, E: Clone + PairingEngine> Clone for VerifierUnionKey<'a, E>where
E::G2Affine: Clone,
impl<'a, E: Clone + PairingEngine> Clone for VerifierUnionKey<'a, E>where E::G2Affine: Clone,
source§fn clone(&self) -> VerifierUnionKey<'a, E>
fn clone(&self) -> VerifierUnionKey<'a, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, E: Debug + PairingEngine> Debug for VerifierUnionKey<'a, E>where
E::G2Affine: Debug,
impl<'a, E: Debug + PairingEngine> Debug for VerifierUnionKey<'a, E>where E::G2Affine: Debug,
source§impl<'a, E: PartialEq + PairingEngine> PartialEq<VerifierUnionKey<'a, E>> for VerifierUnionKey<'a, E>where
E::G2Affine: PartialEq,
impl<'a, E: PartialEq + PairingEngine> PartialEq<VerifierUnionKey<'a, E>> for VerifierUnionKey<'a, E>where E::G2Affine: PartialEq,
source§fn eq(&self, other: &VerifierUnionKey<'a, E>) -> bool
fn eq(&self, other: &VerifierUnionKey<'a, E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, E: Eq + PairingEngine> Eq for VerifierUnionKey<'a, E>where E::G2Affine: Eq,
impl<'a, E: PairingEngine> StructuralEq for VerifierUnionKey<'a, E>
impl<'a, E: PairingEngine> StructuralPartialEq for VerifierUnionKey<'a, E>
Auto Trait Implementations§
impl<'a, E> RefUnwindSafe for VerifierUnionKey<'a, E>where <E as PairingEngine>::G1Affine: RefUnwindSafe, <E as PairingEngine>::G2Affine: RefUnwindSafe, <<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
impl<'a, E> Send for VerifierUnionKey<'a, E>
impl<'a, E> Sync for VerifierUnionKey<'a, E>
impl<'a, E> Unpin for VerifierUnionKey<'a, E>
impl<'a, E> UnwindSafe for VerifierUnionKey<'a, E>where <E as PairingEngine>::G1Affine: RefUnwindSafe, <E as PairingEngine>::G2Affine: RefUnwindSafe, <<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.