zcash / halo2

The Halo2 zero-knowledge proving system
https://zcash.github.io/halo2/
Other
743 stars 499 forks source link

ELI15: in example load_constant() and load_private() seem to overwrite the same column #825

Open ThrasherLT opened 3 months ago

ThrasherLT commented 3 months ago

Which section of the Halo 2 book were you reading?

A simple example https://zcash.github.io/halo2/user/simple-example.html

What was unclear?

load_private() and load_constant() both write to the same advice column config.advice[0], 0, without any explanation. Is this deliberate and it doesn't matter that the values are being overwritten or is this a bug and values are being overwritten? I've tried to change it to write to config.advice[1] for variable b, but that didn't change the results of the proof, so it seems like it doesn't matter?

What would help to make it clearer to you?

Fix, if this is a bug, or add a comment clarifying that this is deliberate.