Dhole / polyexen

Polynomial Expression Engine
34 stars 8 forks source link

(feat) automatic instance generation #3

Closed jae-cuz closed 10 months ago

jae-cuz commented 11 months ago

When we use halo2 Mockprover::run , we need to give instance values as a parameter.

image

This PR would enable generating the required instance automatically when we use PlafH2Circuit. Sample usage:

let prover_plaf = MockProver::<Fr>::run(8, &plaf_circuit, plaf_circuit.instance()).unwrap();
jae-cuz commented 11 months ago

Though, I wonder if we should care about the case when a cell in fixed column be an instance value.

match (left_col.kind, right_col.kind) {
    ...
    (ColumnKind::Fixed, ColumnKind::Public) => ...
jae-cuz commented 11 months ago

@Dhole I tried to generalize for multiple public columns, so let me know if you want it or not :)

I also applied your suggestions, thanks for catching out those possible errors 👍 Sry for missing those