PrivateKernelProver

Trait PrivateKernelProver 

Source
pub trait PrivateKernelProver: Send + Sync {
    // Required methods
    fn generate_init_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn simulate_init<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn generate_inner_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn simulate_inner<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn generate_reset_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn simulate_reset<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn generate_tail_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn simulate_tail<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn generate_hiding_to_rollup_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn generate_hiding_to_public_output<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_chonk_proof<'life0, 'life1, 'async_trait>(
        &'life0 self,
        execution_steps: &'life1 [PrivateExecutionStep],
    ) -> Pin<Box<dyn Future<Output = Result<ChonkProofWithPublicInputs, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn compute_gate_count_for_circuit<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        bytecode: &'life1 [u8],
        circuit_name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Private kernel prover interface.

Matches the TS PrivateKernelProver interface with methods for each kernel circuit in the proving sequence.

Required Methods§

Source

fn generate_init_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate witness + output for the init kernel circuit.

Source

fn simulate_init<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Simulate the init circuit (no witness generation).

Source

fn generate_inner_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate witness + output for an inner kernel circuit.

Source

fn simulate_inner<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Simulate an inner circuit.

Source

fn generate_reset_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate witness + output for a reset kernel circuit.

Source

fn simulate_reset<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Simulate a reset circuit.

Source

fn generate_tail_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate witness + output for the tail kernel circuit.

Source

fn simulate_tail<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Simulate the tail circuit.

Source

fn generate_hiding_to_rollup_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate hiding kernel output for rollup path.

Source

fn generate_hiding_to_public_output<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 Value, ) -> Pin<Box<dyn Future<Output = Result<PrivateKernelSimulateOutput, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Generate hiding kernel output for public path.

Source

fn create_chonk_proof<'life0, 'life1, 'async_trait>( &'life0 self, execution_steps: &'life1 [PrivateExecutionStep], ) -> Pin<Box<dyn Future<Output = Result<ChonkProofWithPublicInputs, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create the aggregated ChonkProof from execution steps.

Source

fn compute_gate_count_for_circuit<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bytecode: &'life1 [u8], circuit_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Compute gate count for a circuit (profiling).

Implementors§