zero-knowledge-gadgets
zero-knowledge-gadgets copied to clipboard
[TASK] Sync the order of public inputs for R1CS and PLONK
For Mixer:
- nullifier_hash
- root
- arbitrary data
For Anchor:
- chain_id
- nullifier_hash
- arbitrary_data
- roots[]
For VAnchor:
- public_amount
- public_chain_id
- arbitrary_data
- in_nullifier_hashes[]
- in_root_set[]
- out_commitments[]
We would have to sacrifice some of the performance to achieve this in PLONK. For example:
Set gadgets expects a set to be Vec<F> which are public inputs (https://github.com/webb-tools/arkworks-gadgets/blob/master/arkworks-plonk-circuits/src/set_membership/mod.rs#L15). They are inserted into the circuit at the specific time to avoid additional gates. We would have make a standard for PLONK to give us control where the public inputs are defined, which will make it easier for make PLONK and R1CS interoperable.
Should be equal to solidity side