pub trait LegacyProver<'a>: Setup<'a> {
type Proof: LegacyVerifiable<'a>;
type View: LegacyViewable;
// Required methods
fn new(elf_bytes: &[u8]) -> Result<Self, Self::Error>
where Self: Sized;
fn compile(opts: &CompileOpts) -> Result<Self, Self::Error>
where Self: Sized,
Self::Error: From<Error>;
fn run_with_input<S: Serialize + Sized>(
self,
private_input: &S,
) -> Result<Self::View, Self::Error>;
fn prove_with_input<S: Serialize + Sized>(
self,
private_input: &S,
) -> Result<Self::Proof, Self::Error>;
// Provided methods
fn new_from_file<P: AsRef<Path>>(path: &P) -> Result<Self, Self::Error>
where Self: Sized,
Self::Error: From<Error> { ... }
fn run(self) -> Result<Self::View, Self::Error>
where Self: Sized { ... }
fn prove(self) -> Result<Self::Proof, Self::Error>
where Self: Sized { ... }
}
Expand description
A prover for the zkVM.
Required Associated Types§
type Proof: LegacyVerifiable<'a>
type View: LegacyViewable
Required Methods§
Sourcefn new(elf_bytes: &[u8]) -> Result<Self, Self::Error>where
Self: Sized,
fn new(elf_bytes: &[u8]) -> Result<Self, Self::Error>where
Self: Sized,
Construct a new proving instance from raw ELF bytes.
Sourcefn compile(opts: &CompileOpts) -> Result<Self, Self::Error>
fn compile(opts: &CompileOpts) -> Result<Self, Self::Error>
Construct a new proving instance through dynamic compilation (see compile
).
Provided Methods§
Sourcefn new_from_file<P: AsRef<Path>>(path: &P) -> Result<Self, Self::Error>
fn new_from_file<P: AsRef<Path>>(path: &P) -> Result<Self, Self::Error>
Construct a new proving instance by reading an ELF file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.