scroll-tech / halo2

Other
37 stars 41 forks source link

Why change the assignment of unusable rows for advice columns? #48

Open cx19981114 opened 1 year ago

cx19981114 commented 1 year ago

Now in the advice columns, the blinding factors assignment to unusable rows is changed to a value of Scalar::one for the last row

In my understanding, the blinding factors are added to ensure zero knowledge. Is it possible to modify the deterministic assignment to the last line to ensure zero knowledge?or is there some other purpose?

In Zcash https://github.com/zcash/halo2/blob/76b3f892a9d598923bbb5a747701fff44ae4c0ea/halo2_proofs/src/plonk/prover.rs#L294-L298

In Scroll-tech https://github.com/scroll-tech/halo2/blob/9bf3562083dd9bed8a19f651b52bc810f5e2235f/halo2_proofs/src/plonk/prover.rs#L446-L454

modify in this commit https://github.com/scroll-tech/halo2/commit/4b53eee6d3f2db2f525e69d2f0d8baddeb7e417c

kunxian-xia commented 1 year ago

In the scenario of zkEVM, we do not rely too much on the zk property. Setting blinding factors to zeros can making the proof more deterministic, therefore make it more easier to debug the cpu prover and gpu prover (when there are inconsistency between them).