Trait Chip

Source
pub trait Chip<SC: StarkGenericConfig>: ChipUsageGetter + Sized {
    // Required methods
    fn air(&self) -> Arc<dyn AnyRap<SC>>;
    fn generate_air_proof_input(self) -> AirProofInput<SC>;

    // Provided method
    fn generate_air_proof_input_with_id(
        self,
        air_id: usize,
    ) -> (usize, AirProofInput<SC>) { ... }
}
Expand description

A chip is a stateful struct that stores the state necessary to generate the trace of an AIR. This trait is for proving purposes and has a generic StarkGenericConfig since it needs to know the STARK config.

Required Methods§

Source

fn air(&self) -> Arc<dyn AnyRap<SC>>

Source

fn generate_air_proof_input(self) -> AirProofInput<SC>

Generate all necessary input for proving a single AIR.

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<SC: StarkGenericConfig, C: Chip<SC>> Chip<SC> for Rc<C>

Source§

impl<SC: StarkGenericConfig, C: Chip<SC>> Chip<SC> for Arc<C>

Source§

impl<SC: StarkGenericConfig, C: Chip<SC>> Chip<SC> for RefCell<C>

Source§

impl<SC: StarkGenericConfig, C: Chip<SC>> Chip<SC> for Mutex<C>

Implementors§

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Fp2ExtensionExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for Fp2AddSubChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for Fp2MulDivChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for ModularAddSubChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for ModularMulDivChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Int256Executor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Int256Periphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for SystemExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for SystemPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<SC> Chip<SC> for VmConnectorChip<Val<SC>>

impl<SC, A, C> Chip<SC> for VmChipWrapper<Val<SC>, A, C>

impl<SC: StarkGenericConfig> Chip<SC> for ExecutionTester<Val<SC>>
where Val<SC>: Field,

impl<SC: StarkGenericConfig> Chip<SC> for MemoryTester<Val<SC>>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig> Chip<SC> for ProgramTester<Val<SC>>

impl<SC: StarkGenericConfig> Chip<SC> for PhantomChip<Val<SC>>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig, const SBOX_REGISTERS: usize> Chip<SC> for Poseidon2PeripheryBaseChip<Val<SC>, SBOX_REGISTERS>
where Val<SC>: PrimeField32,

impl<const CHUNK: usize, SC: StarkGenericConfig> Chip<SC> for MemoryMerkleChip<CHUNK, Val<SC>>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig, const M: usize> Chip<SC> for XorLookupChip<M>

impl<SC: StarkGenericConfig, const N: usize> Chip<SC> for RangeTupleCheckerChip<N>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig, const N: usize> Chip<SC> for SharedRangeTupleCheckerChip<N>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig, const NUM_BITS: usize> Chip<SC> for BitwiseOperationLookupChip<NUM_BITS>

impl<SC: StarkGenericConfig, const NUM_BITS: usize> Chip<SC> for SharedBitwiseOperationLookupChip<NUM_BITS>

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcAddNeChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcDoubleChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 1, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Keccak256Executor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Keccak256Periphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<SC: StarkGenericConfig> Chip<SC> for KeccakVmChip<Val<SC>>
where Val<SC>: PrimeField32,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for NativeConfigExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for NativeExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for NativePeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<SC: StarkGenericConfig> Chip<SC> for JalRangeCheckChip<Val<SC>>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig, const SBOX_REGISTERS: usize> Chip<SC> for NativePoseidon2Chip<Val<SC>, SBOX_REGISTERS>
where Val<SC>: PrimeField32,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for Fp12MulChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcLineMulBy01234Chip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcLineMulBy02345Chip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EvaluateLineChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcLineMul013By013Chip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for EcLineMul023By023Chip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for MillerDoubleAndAddStepChip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize, SC: StarkGenericConfig> Chip<SC> for MillerDoubleStepChip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 1, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: Chip<SC>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IConfigExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IConfigPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32ImConfigExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IoExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32IoPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32MExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Rv32MPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<SC: StarkGenericConfig> Chip<SC> for Rv32HintStoreChip<Val<SC>>
where Val<SC>: PrimeField32,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for SdkVmConfigExecutor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for SdkVmConfigPeriphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Sha256Executor<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<F: PrimeField32, SC: StarkGenericConfig> Chip<SC> for Sha256Periphery<F>
where Domain<SC>: PolynomialSpace<Val = F>,

impl<SC: StarkGenericConfig> Chip<SC> for Sha256VmChip<Val<SC>>
where Val<SC>: PrimeField32,

impl<SC: StarkGenericConfig> Chip<SC> for DummyInteractionChip<'_, SC>