pub trait StarkEngine<SC: StarkGenericConfig> {
// Required methods
fn config(&self) -> &SC;
fn new_challenger(&self) -> SC::Challenger;
// Provided methods
fn keygen_builder(&self) -> MultiStarkKeygenBuilder<'_, SC> { ... }
fn prover(&self) -> MultiTraceStarkProver<'_, SC> { ... }
fn verifier(&self) -> MultiTraceStarkVerifier<'_, SC> { ... }
fn run_simple_test_impl(
&self,
chips: Vec<Arc<dyn AnyRap<SC>>>,
traces: Vec<DenseMatrix<Val<SC>>>,
public_values: Vec<Vec<Val<SC>>>,
) -> Result<VerificationData<SC>, VerificationError> { ... }
fn run_test_impl(
&self,
air_proof_inputs: Vec<AirProofInput<SC>>,
) -> Result<VerificationData<SC>, VerificationError> { ... }
fn set_up_keygen_builder(
&self,
keygen_builder: &mut MultiStarkKeygenBuilder<'_, SC>,
air_proof_inputs: &[AirProofInput<SC>],
) -> Vec<usize> { ... }
fn prove_then_verify(
&self,
pk: &MultiStarkProvingKey<SC>,
proof_input: ProofInput<SC>,
) -> Result<(), VerificationError> { ... }
fn prove(
&self,
pk: &MultiStarkProvingKey<SC>,
proof_input: ProofInput<SC>,
) -> Proof<SC> { ... }
fn verify(
&self,
vk: &MultiStarkVerifyingKey<SC>,
proof: &Proof<SC>,
) -> Result<(), VerificationError> { ... }
}
Expand description
Testing engine
Required Methods§
Sourcefn new_challenger(&self) -> SC::Challenger
fn new_challenger(&self) -> SC::Challenger
Creates a new challenger with a deterministic state. Creating new challenger for prover and verifier separately will result in them having the same starting state.
Provided Methods§
fn keygen_builder(&self) -> MultiStarkKeygenBuilder<'_, SC>
fn prover(&self) -> MultiTraceStarkProver<'_, SC>
fn verifier(&self) -> MultiTraceStarkVerifier<'_, SC>
Sourcefn run_simple_test_impl(
&self,
chips: Vec<Arc<dyn AnyRap<SC>>>,
traces: Vec<DenseMatrix<Val<SC>>>,
public_values: Vec<Vec<Val<SC>>>,
) -> Result<VerificationData<SC>, VerificationError>
fn run_simple_test_impl( &self, chips: Vec<Arc<dyn AnyRap<SC>>>, traces: Vec<DenseMatrix<Val<SC>>>, public_values: Vec<Vec<Val<SC>>>, ) -> Result<VerificationData<SC>, VerificationError>
Runs a single end-to-end test for a given set of AIRs and traces. This includes proving/verifying key generation, creating a proof, and verifying the proof. This function should only be used on AIRs where the main trace is not partitioned.
Sourcefn run_test_impl(
&self,
air_proof_inputs: Vec<AirProofInput<SC>>,
) -> Result<VerificationData<SC>, VerificationError>
fn run_test_impl( &self, air_proof_inputs: Vec<AirProofInput<SC>>, ) -> Result<VerificationData<SC>, VerificationError>
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.
Sourcefn set_up_keygen_builder(
&self,
keygen_builder: &mut MultiStarkKeygenBuilder<'_, SC>,
air_proof_inputs: &[AirProofInput<SC>],
) -> Vec<usize>
fn set_up_keygen_builder( &self, keygen_builder: &mut MultiStarkKeygenBuilder<'_, SC>, air_proof_inputs: &[AirProofInput<SC>], ) -> Vec<usize>
Add AIRs and get AIR IDs