pub trait StarkEnginewhere
<Self::PD as MultiRapProver<Self::PB, Self::TS>>::Artifacts: Into<<Self::PD as OpeningProver<Self::PB, Self::TS>>::OpeningPoints>,
<Self::PD as MultiRapProver<Self::PB, Self::TS>>::PartialProof: Into<(GkrProof<Self::SC>, BatchConstraintProof<Self::SC>)>,
<Self::PD as OpeningProver<Self::PB, Self::TS>>::OpeningProof: Into<(StackingProof<Self::SC>, WhirProof<Self::SC>)>,{
type SC: StarkProtocolConfig;
type PB: ProverBackend<Val = <Self::SC as StarkProtocolConfig>::F, Challenge = <Self::SC as StarkProtocolConfig>::EF, Commitment = <Self::SC as StarkProtocolConfig>::Digest>;
type PD: ProverDevice<Self::PB, Self::TS> + DeviceDataTransporter<Self::SC, Self::PB>;
type TS: FiatShamirTranscript<Self::SC>;
Show 13 methods
// Required methods
fn new(params: SystemParams) -> Self;
fn config(&self) -> &Self::SC;
fn device(&self) -> &Self::PD;
fn initial_transcript(&self) -> Self::TS;
fn prover_from_transcript(
&self,
transcript: Self::TS,
) -> Coordinator<Self::SC, Self::PB, Self::PD, Self::TS>;
// Provided methods
fn params(&self) -> &SystemParams { ... }
fn proving_memory_config(&self) -> ProvingMemoryConfig { ... }
fn prover(&self) -> Coordinator<Self::SC, Self::PB, Self::PD, Self::TS> { ... }
fn keygen(
&self,
airs: &[AirRef<Self::SC>],
) -> (MultiStarkProvingKey<Self::SC>, MultiStarkVerifyingKey<Self::SC>) { ... }
fn prove(
&self,
pk: &DeviceMultiStarkProvingKey<Self::PB>,
ctx: ProvingContext<Self::PB>,
) -> Result<Proof<Self::SC>, ProverError<Self>> { ... }
fn verify(
&self,
vk: &MultiStarkVerifyingKey<Self::SC>,
proof: &Proof<Self::SC>,
) -> Result<(), VerifierError<<Self::SC as StarkProtocolConfig>::EF>> { ... }
fn debug(&self, airs: &[AirRef<Self::SC>], ctx: &ProvingContext<Self::PB>) { ... }
fn run_test(
&self,
airs: Vec<AirRef<Self::SC>>,
ctxs: Vec<AirProvingContext<Self::PB>>,
) -> Result<VerificationData<Self::SC>, StarkTestError<<Self::PD as ProverDevice<Self::PB, Self::TS>>::Error, <Self::SC as StarkProtocolConfig>::EF>> { ... }
}Expand description
A helper trait to collect the different steps in multi-trace STARK keygen and proving.
Required Associated Types§
type SC: StarkProtocolConfig
type PB: ProverBackend<Val = <Self::SC as StarkProtocolConfig>::F, Challenge = <Self::SC as StarkProtocolConfig>::EF, Commitment = <Self::SC as StarkProtocolConfig>::Digest>
type PD: ProverDevice<Self::PB, Self::TS> + DeviceDataTransporter<Self::SC, Self::PB>
type TS: FiatShamirTranscript<Self::SC>
Required Methods§
Sourcefn new(params: SystemParams) -> Self
fn new(params: SystemParams) -> Self
Constructor from only system parameters. In particular, the transcript and hasher must have a default configuration.
fn config(&self) -> &Self::SC
fn device(&self) -> &Self::PD
Sourcefn initial_transcript(&self) -> Self::TS
fn initial_transcript(&self) -> Self::TS
Creates transcript with a deterministic initial state.
fn prover_from_transcript( &self, transcript: Self::TS, ) -> Coordinator<Self::SC, Self::PB, Self::PD, Self::TS>
Provided Methods§
fn params(&self) -> &SystemParams
fn proving_memory_config(&self) -> ProvingMemoryConfig
fn prover(&self) -> Coordinator<Self::SC, Self::PB, Self::PD, Self::TS>
fn keygen( &self, airs: &[AirRef<Self::SC>], ) -> (MultiStarkProvingKey<Self::SC>, MultiStarkVerifyingKey<Self::SC>)
fn prove( &self, pk: &DeviceMultiStarkProvingKey<Self::PB>, ctx: ProvingContext<Self::PB>, ) -> Result<Proof<Self::SC>, ProverError<Self>>
Sourcefn verify(
&self,
vk: &MultiStarkVerifyingKey<Self::SC>,
proof: &Proof<Self::SC>,
) -> Result<(), VerifierError<<Self::SC as StarkProtocolConfig>::EF>>
fn verify( &self, vk: &MultiStarkVerifyingKey<Self::SC>, proof: &Proof<Self::SC>, ) -> Result<(), VerifierError<<Self::SC as StarkProtocolConfig>::EF>>
Verifies using a default instantiation of the Fiat-Shamir transcript.
Sourcefn debug(&self, airs: &[AirRef<Self::SC>], ctx: &ProvingContext<Self::PB>)
fn debug(&self, airs: &[AirRef<Self::SC>], ctx: &ProvingContext<Self::PB>)
The indexing of AIR ID in ctx should be consistent with the order of airs. In
particular, airs should correspond to the global proving key with all AIRs, including ones
not present in the ctx.
Sourcefn run_test(
&self,
airs: Vec<AirRef<Self::SC>>,
ctxs: Vec<AirProvingContext<Self::PB>>,
) -> Result<VerificationData<Self::SC>, StarkTestError<<Self::PD as ProverDevice<Self::PB, Self::TS>>::Error, <Self::SC as StarkProtocolConfig>::EF>>
fn run_test( &self, airs: Vec<AirRef<Self::SC>>, ctxs: Vec<AirProvingContext<Self::PB>>, ) -> Result<VerificationData<Self::SC>, StarkTestError<<Self::PD as ProverDevice<Self::PB, Self::TS>>::Error, <Self::SC as StarkProtocolConfig>::EF>>
Runs a single end-to-end test for a given set of chips and traces partitions. This includes proving/verifying key generation, creating a proof, and verifying the proof.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".