pub struct Proof<E: PairingEngine> {
pub commitments: Commitments<E>,
pub evaluations: Evaluations<E::Fr>,
pub third_msg: ThirdMessage<E::Fr>,
pub fourth_msg: FourthMessage<E::Fr>,
pub pc_proof: BatchLCProof<E>,
/* private fields */
}
Expand description
A zkSNARK proof.
Fields§
§commitments: Commitments<E>
Commitments to prover polynomials.
evaluations: Evaluations<E::Fr>
Evaluations of some of the committed polynomials.
third_msg: ThirdMessage<E::Fr>
Prover message: sum_a, sum_b, sum_c for each instance
fourth_msg: FourthMessage<E::Fr>
Prover message: sum_a, sum_b, sum_c for each circuit
pc_proof: BatchLCProof<E>
An evaluation proof from the polynomial commitment.
Implementations§
Source§impl<E: PairingEngine> Proof<E>
impl<E: PairingEngine> Proof<E>
Sourcepub fn new(
batch_sizes: BTreeMap<CircuitId, usize>,
commitments: Commitments<E>,
evaluations: Evaluations<E::Fr>,
third_msg: ThirdMessage<E::Fr>,
fourth_msg: FourthMessage<E::Fr>,
pc_proof: BatchLCProof<E>,
) -> Result<Self, SNARKError>
pub fn new( batch_sizes: BTreeMap<CircuitId, usize>, commitments: Commitments<E>, evaluations: Evaluations<E::Fr>, third_msg: ThirdMessage<E::Fr>, fourth_msg: FourthMessage<E::Fr>, pc_proof: BatchLCProof<E>, ) -> Result<Self, SNARKError>
Construct a new proof.
pub fn is_hiding(&self) -> bool
pub fn batch_sizes(&self) -> &[usize]
Sourcepub fn check_batch_sizes(&self) -> Result<(), SNARKError>
pub fn check_batch_sizes(&self) -> Result<(), SNARKError>
Check that the number of messages is consistent with our batch size
Trait Implementations§
Source§impl<E: PairingEngine> CanonicalDeserialize for Proof<E>
impl<E: PairingEngine> CanonicalDeserialize for Proof<E>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Source§impl<E: PairingEngine> CanonicalSerialize for Proof<E>
impl<E: PairingEngine> CanonicalSerialize for Proof<E>
fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>
fn serialized_size(&self, mode: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
Source§impl<E: PairingEngine> FromBytes for Proof<E>
impl<E: PairingEngine> FromBytes for Proof<E>
Source§impl<E: PairingEngine> ToBytes for Proof<E>
impl<E: PairingEngine> ToBytes for Proof<E>
Source§impl<E: PairingEngine> Valid for Proof<E>
impl<E: PairingEngine> Valid for Proof<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
impl<E: Eq + PairingEngine> Eq for Proof<E>
impl<E: PairingEngine> StructuralPartialEq for Proof<E>
Auto Trait Implementations§
impl<E> Freeze for Proof<E>
impl<E> RefUnwindSafe for Proof<E>
impl<E> Send for Proof<E>
impl<E> Sync for Proof<E>
impl<E> Unpin for Proof<E>
impl<E> UnwindSafe for Proof<E>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.