Skip to main content

V2

prover-gateway-v2

In this version, the proof generation logic is handled without the need for confidential data processing. As a result, the non-confidential prover only needs to implement the GeneratorTrait, and the IVSTrait is not implemented.

This approach is suitable for scenarios where sensitive operations are not required, simplifying the overall implementation.

Implementing GeneratorTrait for Non-Confidential Prover

Below is a dummy implementation using a struct called NullProver. This implementation includes the necessary methods for proof generation and benchmarking. Replace the unimplemented!() placeholders with your actual logic.

// Dummy implementation of the NullProver.
#[derive(Default)]
struct NullProver;

#[async_trait]
impl GeneratorTrait for NullProver {
async fn generate_proof(&self, _input: InputPayload) -> GenerateProofResponse {
let public_input = _input.get_public();
// Insert your actual proof generation logic here.
unimplemented!()
}

async fn benchmark(&self) -> BenchmarkResponse {
// Insert your actual benchmarking logic here.
unimplemented!()
}
}

How It Works

  • Proof Generation (generate_proof):
    The generate_proof function accepts an InputPayload that contains all the necessary data to generate a proof. In the non-confidential prover, there is no need to handle encrypted secrets or secure private keys, which simplifies the process.

  • Benchmarking (benchmark):
    The benchmark method is intended to measure the performance of the proof generation process.