Type Alias FpConfig

Source
pub type FpConfig<F> = RangeConfig<F>;

Aliased Type§

struct FpConfig<F> {
    pub gate: FlexGateConfig<F>,
    pub lookup_advice: Vec<Vec<Column<Advice>>>,
    pub q_lookup: Vec<Option<Selector>>,
    pub lookup: TableColumn,
    /* private fields */
}

Fields§

§gate: FlexGateConfig<F>

Underlying Gate Configuration

§lookup_advice: Vec<Vec<Column<Advice>>>

Special advice (witness) Columns used only for lookup tables.

Each phase of a halo2 circuit has a distinct lookup_advice column.

  • If gate has only 1 advice column, lookups are enabled for that column, in which case lookup_advice is empty
  • If gate has more than 1 advice column some number of user-specified lookup_advice columns are added
    • In this case, we don’t need a selector so q_lookup is empty
§q_lookup: Vec<Option<Selector>>

Selector values for the lookup table.

§lookup: TableColumn

Column for lookup table values.

Implementations

Source§

impl<F> RangeConfig<F>
where F: ScalarField,

Source

pub fn configure( meta: &mut ConstraintSystem<F>, gate_params: FlexGateConfigParams, num_lookup_advice: &[usize], lookup_bits: usize, ) -> RangeConfig<F>

Generates a new RangeConfig with the specified parameters.

If num_columns is 0, then we assume you do not want to perform any lookups in that phase.

Panics if lookup_bits > 28.

  • meta: ConstraintSystem of the circuit
  • gate_params: see FlexGateConfigParams
  • num_lookup_advice: Number of lookup_advice Columns in each phase
  • lookup_bits: Number of bits represented in the LookUp table [0,2^lookup_bits)
Source

pub fn lookup_bits(&self) -> usize

Returns the number of bits represented in the lookup table [0,2^lookup_bits).

Source

pub fn load_lookup_table( &self, layouter: &mut impl Layouter<F>, ) -> Result<(), Error>

Loads the lookup table into the circuit using the provided layouter.

  • layouter: layouter for the circuit

Trait Implementations

Source§

impl<F> Clone for RangeConfig<F>
where F: Clone + ScalarField,

Source§

fn clone(&self) -> RangeConfig<F>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F> Debug for RangeConfig<F>
where F: Debug + ScalarField,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more