Prover commits groth16 proof and public input(s) onchain. These need to be deserialized into appropriate data structure and validated.
For example, BigInteger needs to be a valid scalar field element, group element(s) need to lie in the correct group and subgroup(s), etc.
Existing implementation for groth16_verify* functions don't seem to validate these properties.
The suggested solution is as follows:
- Specify a format for data committed on-chain e.g.
| bits of G1 element(s) | bits of G2 element(s) | bits of public input |
- GC Input wires assume input in this format
- Validate that these inputs are correctly formed. If they don't proceed to slashing condition
- After validation, we proceed as is being done right now with groth16_verify* functions.
Prover commits groth16 proof and public input(s) onchain. These need to be deserialized into appropriate data structure and validated.
For example, BigInteger needs to be a valid scalar field element, group element(s) need to lie in the correct group and subgroup(s), etc.
Existing implementation for groth16_verify* functions don't seem to validate these properties.
The suggested solution is as follows:
| bits of G1 element(s) | bits of G2 element(s) | bits of public input |