pub trait SubCircuit<F: Field> {
    type Config: SubCircuitConfig<F>;

    // Required methods
    fn unusable_rows() -> usize;
    fn new_from_block(block: &Block<F>, chunk: &Chunk<F>) -> Self;
    fn synthesize_sub(
        &self,
        config: &Self::Config,
        challenges: &Challenges<Value<F>>,
        layouter: &mut impl Layouter<F>
    ) -> Result<(), Error>;
    fn min_num_rows_block(block: &Block<F>, chunk: &Chunk<F>) -> (usize, usize);

    // Provided method
    fn instance(&self) -> Vec<Vec<F>> { ... }
}
Expand description

SubCircuit is a circuit that performs the verification of a specific part of the full Ethereum block verification. The SubCircuit’s interact with each other via lookup tables and/or shared public inputs. This type must contain all the inputs required to synthesize this circuit (and the contained table(s) if any).

Required Associated Types§

source

type Config: SubCircuitConfig<F>

Configuration of the SubCircuit.

Required Methods§

source

fn unusable_rows() -> usize

Returns number of unusable rows of the SubCircuit, which should be meta.blinding_factors() + 1.

source

fn new_from_block(block: &Block<F>, chunk: &Chunk<F>) -> Self

Create a new SubCircuit from a witness Block

source

fn synthesize_sub( &self, config: &Self::Config, challenges: &Challenges<Value<F>>, layouter: &mut impl Layouter<F> ) -> Result<(), Error>

Assign only the columns used by this sub-circuit. This includes the columns that belong to the exposed lookup table contained within, if any; and excludes external tables that this sub-circuit does lookups to.

source

fn min_num_rows_block(block: &Block<F>, chunk: &Chunk<F>) -> (usize, usize)

Return the minimum number of rows required to prove the block. Row numbers without/with padding are both returned.

Provided Methods§

source

fn instance(&self) -> Vec<Vec<F>>

Returns the instance columns required for this circuit.

Object Safety§

This trait is not object safe.

Implementors§