Chip

Trait Chip 

Source
pub trait Chip<R, PB: ProverBackend> {
    // Required method
    fn generate_proving_ctx(&self, records: R) -> AirProvingContext<PB>;

    // Provided method
    fn constant_trace_height(&self) -> Option<usize> { ... }
}
Expand description

A chip is a [ProverBackend]-specific object that converts execution logs (also referred to as records) into a trace matrix.

A chip may be stateful and store state on either host or device, although it is preferred that all state is received through records.

Required Methods§

Source

fn generate_proving_ctx(&self, records: R) -> AirProvingContext<PB>

Generate all necessary context for proving a single AIR.

Provided Methods§

Source

fn constant_trace_height(&self) -> Option<usize>

If this chip always produces a trace with a fixed number of rows (independent of execution), return that height. Used by metered execution to avoid resetting constant-height chips on segment boundaries.

Implementations on Foreign Types§

Source§

impl<R, PB: ProverBackend, C: Chip<R, PB> + ?Sized> Chip<R, PB> for Arc<C>

Source§

fn generate_proving_ctx(&self, records: R) -> AirProvingContext<PB>

Source§

fn constant_trace_height(&self) -> Option<usize>

Implementors§

Source§

impl<R, SC: StarkProtocolConfig> Chip<R, CpuBackend<SC>> for VariableRangeCheckerChip
where Val<SC>: PrimeField32,

Source§

impl<R, SC: StarkProtocolConfig, const M: usize> Chip<R, CpuBackend<SC>> for XorLookupChip<M>

Source§

impl<R, SC: StarkProtocolConfig, const N: usize> Chip<R, CpuBackend<SC>> for RangeTupleCheckerChip<N>
where Val<SC>: PrimeField32,

Source§

impl<R, SC: StarkProtocolConfig, const NUM_BITS: usize> Chip<R, CpuBackend<SC>> for BitwiseOperationLookupChip<NUM_BITS>

Source§

impl<RA> Chip<RA, GenericGpuBackend<BabyBearPoseidon2HashScheme>> for VariableRangeCheckerChipGPU

Source§

impl<RA, C: Chip<RA, CpuBackend<SC>>> Chip<RA, GenericGpuBackend<BabyBearPoseidon2HashScheme>> for HybridChip<RA, C>

Source§

impl<RA, const N: usize> Chip<RA, GenericGpuBackend<BabyBearPoseidon2HashScheme>> for RangeTupleCheckerChipGPU<N>

Source§

impl<RA, const NUM_BITS: usize> Chip<RA, GenericGpuBackend<BabyBearPoseidon2HashScheme>> for BitwiseOperationLookupChipGPU<NUM_BITS>