-
Notifications
You must be signed in to change notification settings - Fork 39
Remove the Halo2 frontend ConstraintSystem #282
Remove the Halo2 frontend ConstraintSystem #282
Conversation
@alxkzmn let's get this one that the imported columns and expressions are still from halo2 frontend and gives an error if there are. The rest is cool that it does not depend of the halo2 frontend at all |
src/plonkish/backend/halo2.rs
Outdated
fn configure_columns_sub_circuit(&mut self, meta: &mut ConstraintSystem<F>) { | ||
let mut advice_columns = HashMap::<UUID, Column<Advice>>::new(); | ||
let mut fixed_columns = HashMap::<UUID, Column<Fixed>>::new(); | ||
fn configure_halo2_columns(&mut self, meta: &mut ConstraintSystemBuilder<F>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxkzmn why is called meta here but cs_builder somewhere. meta was the name we were using in the times of zkevm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change it to constraint system too, meta is not a very meaningful name but it is used in Halo2 code.
|
||
fn convert_poly(&self, meta: &mut VirtualCells<'_, F>, src: &PolyExpr<F>) -> Expression<F> { | ||
impl<F: PrimeField> ConstraintSystemBuilder<F> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxkzmn I think all the impl
of ConstraintSystemBuilder should be after the struct
defintion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few style comments but approved
This PR is a better approach to Halo2 middleware compilation than #277. It eliminates the need for TableColumns that are a purely frontend concept. If we choose to proceed with this path, we can completely remove the dependency on Halo2 frontend. I have prepared the corresponding changes here: 93f9553