constraints.bytecode_adapter#
Bytecode-backed constraint module adapter.
Wraps the expression bytecode interpreter behind the ConstraintModule ABC, allowing AIRs without hand-written Python to use compiled bytecode for constraint evaluation.
Classes#
Constraint module backed by compiled expression bytecode. |
Module Contents#
- class constraints.bytecode_adapter.BytecodeConstraintModule(bin_path: str)[source]#
Bases:
constraints.base.ConstraintModuleConstraint module backed by compiled expression bytecode.
Uses the expression bytecode interpreter to evaluate constraint polynomials, allowing AIRs without hand-written Python modules to be proven/verified.
- constraint_polynomial(ctx: constraints.base.ConstraintContext) primitives.field.FF3Poly | primitives.field.FF3[source]#
Evaluate constraint polynomial using bytecode interpreter.
Detects prover vs verifier mode from the context type.