pub struct RecursiveProofCircuit {
pub vk: VerificationKey,
pub max_proof_count: u32,
}Expand description
Experimental circuit contract for recursive proof aggregation.
Fields§
§vk: VerificationKey§max_proof_count: u32Implementations§
Source§impl RecursiveProofCircuit
impl RecursiveProofCircuit
pub fn new(vk: VerificationKey, max_proof_count: u32) -> Self
Sourcepub fn verify_composition(
&self,
env: &Env,
proof: &Groth16Proof,
layout: &RecursiveProofLayout,
) -> Result<bool, ZKError>
pub fn verify_composition( &self, env: &Env, proof: &Groth16Proof, layout: &RecursiveProofLayout, ) -> Result<bool, ZKError>
Verify an aggregated recursive-proof layout.
Public inputs:
[initial_state_root, final_state_root, accumulator_root, proof_count].
Trait Implementations§
Source§impl GameCircuit for RecursiveProofCircuit
impl GameCircuit for RecursiveProofCircuit
Source§fn verification_key(&self) -> &VerificationKey
fn verification_key(&self) -> &VerificationKey
Get the verification key for this circuit.
Source§fn verify_with_inputs(
&self,
env: &Env,
proof: &Groth16Proof,
public_inputs: &[Scalar],
) -> Result<bool, ZKError>
fn verify_with_inputs( &self, env: &Env, proof: &Groth16Proof, public_inputs: &[Scalar], ) -> Result<bool, ZKError>
Verify a proof against this circuit’s VK and the given public inputs. Read more
Auto Trait Implementations§
impl Freeze for RecursiveProofCircuit
impl !RefUnwindSafe for RecursiveProofCircuit
impl !Send for RecursiveProofCircuit
impl !Sync for RecursiveProofCircuit
impl Unpin for RecursiveProofCircuit
impl UnsafeUnpin for RecursiveProofCircuit
impl !UnwindSafe for RecursiveProofCircuit
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, U, V, W, E, C> Compare<(T, U, V, W)> for C
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
Source§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more