Struct snarkvm_marlin::marlin::Proof
source · [−]pub struct Proof<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> {
pub commitments: Vec<Vec<PC::Commitment>>,
pub evaluations: Vec<F>,
pub prover_messages: Vec<ProverMessage<F>>,
pub pc_proof: BatchLCProof<F, CF, PC>,
}
Expand description
A zkSNARK proof.
Fields
commitments: Vec<Vec<PC::Commitment>>
Commitments to the polynomials produced by the AHP prover.
evaluations: Vec<F>
Evaluations of these polynomials.
prover_messages: Vec<ProverMessage<F>>
The field elements sent by the prover.
pc_proof: BatchLCProof<F, CF, PC>
An evaluation proof from the polynomial commitment.
Implementations
sourceimpl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> Proof<F, CF, PC>
sourcepub fn new(
commitments: Vec<Vec<PC::Commitment>>,
evaluations: Vec<F>,
prover_messages: Vec<ProverMessage<F>>,
pc_proof: BatchLCProof<F, CF, PC>
) -> Self
pub fn new(
commitments: Vec<Vec<PC::Commitment>>,
evaluations: Vec<F>,
prover_messages: Vec<ProverMessage<F>>,
pc_proof: BatchLCProof<F, CF, PC>
) -> Self
Construct a new proof.
sourcepub fn print_size_info(&self)
pub fn print_size_info(&self)
Prints information about the size of the proof.
Trait Implementations
sourceimpl<TargetField, BaseField, PC, PCG> AllocGadget<Proof<TargetField, BaseField, PC>, BaseField> for ProofVar<TargetField, BaseField, PC, PCG> where
TargetField: PrimeField,
BaseField: PrimeField,
PC: PolynomialCommitment<TargetField, BaseField>,
PCG: PCCheckVar<TargetField, PC, BaseField>,
impl<TargetField, BaseField, PC, PCG> AllocGadget<Proof<TargetField, BaseField, PC>, BaseField> for ProofVar<TargetField, BaseField, PC, PCG> where
TargetField: PrimeField,
BaseField: PrimeField,
PC: PolynomialCommitment<TargetField, BaseField>,
PCG: PCCheckVar<TargetField, PC, BaseField>,
fn alloc_constant<FN, T, CS: ConstraintSystem<BaseField>>(
cs: CS,
value_gen: FN
) -> Result<Self, SynthesisError> where
FN: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<Proof<TargetField, BaseField, PC>>,
fn alloc<FN, T, CS: ConstraintSystem<BaseField>>(
cs: CS,
value_gen: FN
) -> Result<Self, SynthesisError> where
FN: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<Proof<TargetField, BaseField, PC>>,
fn alloc_input<FN, T, CS: ConstraintSystem<BaseField>>(
cs: CS,
value_gen: FN
) -> Result<Self, SynthesisError> where
FN: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<Proof<TargetField, BaseField, PC>>,
fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
fn alloc_input_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
sourceimpl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> CanonicalDeserialize for Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> CanonicalDeserialize for Proof<F, CF, PC>
sourcefn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
Reads Self
from reader
.
sourcefn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
fn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
Reads Self
from reader
without compression.
sourceimpl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> CanonicalSerialize for Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> CanonicalSerialize for Proof<F, CF, PC>
sourcefn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
Serializes self
into writer
.
fn serialized_size(&self) -> usize
sourcefn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
fn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
Serializes self
into writer
without compression.
fn uncompressed_size(&self) -> usize
sourceimpl<F: Clone + PrimeField, CF: Clone + PrimeField, PC: Clone + PolynomialCommitment<F, CF>> Clone for Proof<F, CF, PC> where
PC::Commitment: Clone,
impl<F: Clone + PrimeField, CF: Clone + PrimeField, PC: Clone + PolynomialCommitment<F, CF>> Clone for Proof<F, CF, PC> where
PC::Commitment: Clone,
sourceimpl<F: Debug + PrimeField, CF: Debug + PrimeField, PC: Debug + PolynomialCommitment<F, CF>> Debug for Proof<F, CF, PC> where
PC::Commitment: Debug,
impl<F: Debug + PrimeField, CF: Debug + PrimeField, PC: Debug + PolynomialCommitment<F, CF>> Debug for Proof<F, CF, PC> where
PC::Commitment: Debug,
sourceimpl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> FromBytes for Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> FromBytes for Proof<F, CF, PC>
sourceimpl<F: PartialEq + PrimeField, CF: PartialEq + PrimeField, PC: PartialEq + PolynomialCommitment<F, CF>> PartialEq<Proof<F, CF, PC>> for Proof<F, CF, PC> where
PC::Commitment: PartialEq,
impl<F: PartialEq + PrimeField, CF: PartialEq + PrimeField, PC: PartialEq + PolynomialCommitment<F, CF>> PartialEq<Proof<F, CF, PC>> for Proof<F, CF, PC> where
PC::Commitment: PartialEq,
sourceimpl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> ToBytes for Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> ToBytes for Proof<F, CF, PC>
impl<F: Eq + PrimeField, CF: Eq + PrimeField, PC: Eq + PolynomialCommitment<F, CF>> Eq for Proof<F, CF, PC> where
PC::Commitment: Eq,
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> StructuralEq for Proof<F, CF, PC>
impl<F: PrimeField, CF: PrimeField, PC: PolynomialCommitment<F, CF>> StructuralPartialEq for Proof<F, CF, PC>
Auto Trait Implementations
impl<F, CF, PC> RefUnwindSafe for Proof<F, CF, PC> where
F: RefUnwindSafe,
<PC as PolynomialCommitment<F, CF>>::BatchProof: RefUnwindSafe,
<PC as PolynomialCommitment<F, CF>>::Commitment: RefUnwindSafe,
impl<F, CF, PC> Send for Proof<F, CF, PC>
impl<F, CF, PC> Sync for Proof<F, CF, PC>
impl<F, CF, PC> Unpin for Proof<F, CF, PC> where
F: Unpin,
<PC as PolynomialCommitment<F, CF>>::BatchProof: Unpin,
<PC as PolynomialCommitment<F, CF>>::Commitment: Unpin,
impl<F, CF, PC> UnwindSafe for Proof<F, CF, PC> where
F: UnwindSafe,
<PC as PolynomialCommitment<F, CF>>::BatchProof: UnwindSafe,
<PC as PolynomialCommitment<F, CF>>::Commitment: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more