pub trait AirProver<GC: IopCtx, SC: ShardContext<GC>>:
'static
+ Send
+ Sync
+ Sized {
type PreprocessedData: 'static + Send + Sync;
// Required methods
fn machine(&self) -> &Machine<GC::F, SC::Air>;
fn setup_from_vk(
&self,
program: Arc<Program<GC, SC>>,
vk: Option<MachineVerifyingKey<GC>>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send;
fn setup_and_prove_shard(
&self,
program: Arc<Program<GC, SC>>,
record: Record<GC, SC>,
vk: Option<MachineVerifyingKey<GC>>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (MachineVerifyingKey<GC>, ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send;
fn prove_shard_with_pk(
&self,
pk: Arc<ProvingKey<GC, SC, Self>>,
record: Record<GC, SC>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send;
fn preprocessed_table_heights(
pk: Arc<ProvingKey<GC, SC, Self>>,
) -> impl Future<Output = BTreeMap<String, usize>> + Send;
// Provided methods
fn all_chips(&self) -> &[Chip<GC::F, SC::Air>] { ... }
fn setup(
&self,
program: Arc<Program<GC, SC>>,
setup_permits: ProverSemaphore,
) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send { ... }
}Expand description
A prover for an AIR.
Required Associated Types§
Sourcetype PreprocessedData: 'static + Send + Sync
type PreprocessedData: 'static + Send + Sync
The proving key type.
Required Methods§
Sourcefn setup_from_vk(
&self,
program: Arc<Program<GC, SC>>,
vk: Option<MachineVerifyingKey<GC>>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send
fn setup_from_vk( &self, program: Arc<Program<GC, SC>>, vk: Option<MachineVerifyingKey<GC>>, prover_permits: ProverSemaphore, ) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send
Setup from a verifying key.
Sourcefn setup_and_prove_shard(
&self,
program: Arc<Program<GC, SC>>,
record: Record<GC, SC>,
vk: Option<MachineVerifyingKey<GC>>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (MachineVerifyingKey<GC>, ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send
fn setup_and_prove_shard( &self, program: Arc<Program<GC, SC>>, record: Record<GC, SC>, vk: Option<MachineVerifyingKey<GC>>, prover_permits: ProverSemaphore, ) -> impl Future<Output = (MachineVerifyingKey<GC>, ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send
Setup and prove a shard.
Sourcefn prove_shard_with_pk(
&self,
pk: Arc<ProvingKey<GC, SC, Self>>,
record: Record<GC, SC>,
prover_permits: ProverSemaphore,
) -> impl Future<Output = (ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send
fn prove_shard_with_pk( &self, pk: Arc<ProvingKey<GC, SC, Self>>, record: Record<GC, SC>, prover_permits: ProverSemaphore, ) -> impl Future<Output = (ShardProof<GC, PcsProof<GC, SC>>, ProverPermit)> + Send
Prove a shard with a given proving key.
Sourcefn preprocessed_table_heights(
pk: Arc<ProvingKey<GC, SC, Self>>,
) -> impl Future<Output = BTreeMap<String, usize>> + Send
fn preprocessed_table_heights( pk: Arc<ProvingKey<GC, SC, Self>>, ) -> impl Future<Output = BTreeMap<String, usize>> + Send
A function which deduces preprocessed table heights from the proving key.
Provided Methods§
Sourcefn setup(
&self,
program: Arc<Program<GC, SC>>,
setup_permits: ProverSemaphore,
) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send
fn setup( &self, program: Arc<Program<GC, SC>>, setup_permits: ProverSemaphore, ) -> impl Future<Output = (PreprocessedData<ProvingKey<GC, SC, Self>>, MachineVerifyingKey<GC>)> + Send
Setup from a program.
The setup phase produces a pair ‘(pk, vk)’ of proving and verifying keys. The proving key consists of information used by the prover that only depends on the program itself and not a specific execution.
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.