Skip to main content

Public Kernel Circuit - Initial

:::Danger The public kernel circuits are being redesigned to accommodate the latest AVM designs. This page is therefore highly likely to change significantly. :::

Requirements

The initial public kernel iteration undergoes processes to prepare the necessary data for the executions of the public function calls.

Verification of the Previous Iteration

Verifying the previous kernel proof.

It verifies that the previous iteration was executed successfully with the given proof data, verification key, and public inputs, sourced from private_inputs.previous_kernel.

The preceding proof can only be:

Public Inputs Data Reset

Recalibrating counters.

While the counters outputted from the tail private kernel circuit preserve the correct ordering of the public_call_requests, they do not reflect the actual number of side effects each public call entails. This circuit allows the recalibration of counters for public_call_requests, ensuring subsequent public kernels can be executed with the correct counter range.

For each request at index i in the public_call_requests within public_inputs..transient_accumulated_data:

  1. Its hash must match the corresponding item in the public_call_requests within the previous kernel's public inputs:
    • request.hash == private_inputs.previous_kernel_public_inputs.public_call_requests[i].hash
  2. Its counter_end must be greater than its counter_start.
  3. Its counter_start must be greater than the counter_end of the item at index i + 1.
  4. If it's the last item, its counter_start must be 1.

It's crucial for the counter_start of the last item to be 1, as it's assumed in the tail public kernel circuit that no storage writes have a counter 1.

Validating Public Inputs

Verifying the accumulated data.

It ensures that the accumulated_data in the public_inputs matches the accumulated_data in private_inputs.previous_kernel.public_inputs.

Verifying the transient accumulated data.

It ensures that all data in the transient_accumulated_data within public_inputs is empty, with the exception of the public_call_requests.

The values in public_call_requests are verified in a previous step.

Verifying the constant data.

This section follows the same process as outlined in the inner private kernel circuit.

PrivateInputs

PreviousKernel

The format aligns with the PreviousKernel` of the tail public kernel circuit.

PublicInputs

The format aligns with the PublicInputs` of the tail public kernel circuit.