Expand description
Backend abstraction traits for circuit construction.
Each trait mirrors one concrete chip used by the static verifier:
GateInst ↔ GateChip (plus raw Context cell operations), BabyBearInst ↔
BabyBearChip, BabyBearExt4Inst ↔ BabyBearExt4Chip, TranscriptInst ↔
TranscriptChip, and Poseidon2Inst ↔ the Poseidon2 digest hashing helpers.
PopulateInputs is the exception: it groups the witness-loading methods used by
load_proof_wire and inherits only from ChipBase.
Circuit-construction code is generic over a single backend object B bounded by the
traits it needs, e.g. B: TranscriptInst + GateInst. All chip traits inherit their
associated types from ChipBase, so B::F (the wire/value representation
abstracting AssignedValue<Fr>) is unambiguous and never needs to be repeated
per-trait in bounds. Backends own their circuit-building context (e.g. a
&mut halo2_base::Context<Fr> for the halo2 backend, or an IR builder).
Trait methods never inspect B::F values on the host; all nondeterminism (witness
loading, inversions, decompositions) lives inside backend implementations.
Traits§
- Baby
Bear Ext4 Inst - BabyBear quartic-extension operations mirroring
BabyBearExt4Chip. - Baby
Bear Inst - BabyBear base-field operations mirroring
BabyBearChip. - Chip
Base - Associated types shared by all chip traits.
- Gate
Inst - Raw
Fr-cell operations mirroringGateChipand directContextusage. - Populate
Inputs - Witness-loading operations needed to populate proof input wires
(see
stages::full_pipeline::load_proof_wire). - Poseidon2
Inst - Poseidon2 digest hashing/compression mirroring the helpers in
hash::poseidon2. - Transcript
Inst - Stateful Fiat–Shamir transcript mirroring
TranscriptChip.