pub struct DefaultProver { /* private fields */ }Expand description
The default prover implementation. This DefaultProver uses the default zkVM prover. The selection of the zkVM prover is based on environment variables.
The RISC0_PROVER environment variable, if specified, will select the
following [Prover] implementation:
bonsai: [BonsaiProver] to prove on Bonsai.local: LocalProver to prove locally in-process. Note: this requires theprovefeature flag.ipc: [ExternalProver] to prove using anr0vmsub-process. Note:r0vmmust be installed. To specify the path tor0vm, useRISC0_SERVER_PATH.
If RISC0_PROVER is not specified, the following rules are used to select a
[Prover]:
- [BonsaiProver] if the
BONSAI_API_URLandBONSAI_API_KEYenvironment variables are set unlessRISC0_DEV_MODEis enabled. - LocalProver if the
provefeature flag is enabled. - [ExternalProver] otherwise.
Implementations§
Source§impl DefaultProver
impl DefaultProver
Sourcepub fn new(
set_builder_program: Vec<u8>,
assessor_program: Vec<u8>,
address: Address,
domain: EIP712DomainSaltless,
) -> Result<Self>
pub fn new( set_builder_program: Vec<u8>, assessor_program: Vec<u8>, address: Address, domain: EIP712DomainSaltless, ) -> Result<Self>
Creates a new DefaultProver.
Sourcepub async fn fulfill(
&self,
orders: &[(ProofRequest, Bytes)],
) -> Result<(Vec<BoundlessFulfillment>, Receipt, AssessorReceipt)>
pub async fn fulfill( &self, orders: &[(ProofRequest, Bytes)], ) -> Result<(Vec<BoundlessFulfillment>, Receipt, AssessorReceipt)>
Fulfills a list of orders, returning the relevant data:
- A list of Fulfillment of the orders.
- The Receipt of the root set.
- The SetInclusionReceipt of the assessor.
Auto Trait Implementations§
impl Freeze for DefaultProver
impl RefUnwindSafe for DefaultProver
impl Send for DefaultProver
impl Sync for DefaultProver
impl Unpin for DefaultProver
impl UnwindSafe for DefaultProver
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.