Trait zebra_consensus::groth16::Description
source · pub trait Description {
// Required methods
fn proof(&self) -> &Groth16Proof;
fn primary_inputs(&self) -> Vec<Fq>;
}
Expand description
A Groth16 Description (JoinSplit, Spend, or Output) with a Groth16 proof and its inputs encoded as scalars.
Required Methods§
sourcefn proof(&self) -> &Groth16Proof
fn proof(&self) -> &Groth16Proof
The Groth16 proof of this description.
sourcefn primary_inputs(&self) -> Vec<Fq>
fn primary_inputs(&self) -> Vec<Fq>
The primary inputs for this proof, encoded as [jubjub::Fq
] scalars.
Implementations on Foreign Types§
source§impl Description for (&JoinSplit<Groth16Proof>, &VerificationKeyBytes)
impl Description for (&JoinSplit<Groth16Proof>, &VerificationKeyBytes)
source§fn primary_inputs(&self) -> Vec<Fq>
fn primary_inputs(&self) -> Vec<Fq>
Encodes the primary input for the JoinSplit proof statement as Bls12_381 base
field elements, to match [bellman::groth16::verify_proof()
].
NB: [jubjub::Fq
] is a type alias for [bls12_381::Scalar
].
joinsplit_pub_key
: the JoinSplit public validation key for this JoinSplit, from
the transaction. (All JoinSplits in a transaction share the same validation key.)
This is not yet officially documented; see the reference implementation: https://github.com/zcash/librustzcash/blob/0ec7f97c976d55e1a194a37b27f247e8887fca1d/zcash_proofs/src/sprout.rs#L152-L166 https://zips.z.cash/protocol/protocol.pdf#joinsplitdesc
fn proof(&self) -> &Groth16Proof
source§impl Description for Output
impl Description for Output
source§fn primary_inputs(&self) -> Vec<Fq>
fn primary_inputs(&self) -> Vec<Fq>
Encodes the primary input for the Sapling Output proof statement as 5 Bls12_381 base
field elements, to match [bellman::groth16::verify_proof
] (the starting fixed element
1
is filled in by [bellman
].
NB: [jubjub::Fq
] is a type alias for [bls12_381::Scalar
].
fn proof(&self) -> &Groth16Proof
source§impl Description for Spend<PerSpendAnchor>
impl Description for Spend<PerSpendAnchor>
source§fn primary_inputs(&self) -> Vec<Fq>
fn primary_inputs(&self) -> Vec<Fq>
Encodes the primary input for the Sapling Spend proof statement as 7 Bls12_381 base
field elements, to match [bellman::groth16::verify_proof
] (the starting fixed element
1
is filled in by [bellman
].
NB: jubjub::Fq is a type alias for bls12_381::Scalar.