aligned_layer
aligned_layer copied to clipboard
feat: stricter `verification_data` validation
In the context of #1742 (cantina #59) it was suggested that we may also want to require fields unused by the requested verifier to be undefined, because that extra data could be used to bloat tasks up to the maximum allowed size while not being charged for that, forcing the system to waste resources.
Another related issue that I think should be fixed is the lack of validation on NoncedVerificationData.verification_data unused members, such as vm_program_code which is unused for groth16_bn254 but a user can still submit junk data and control the proof size up to 64mb. This is too permissive and these proofs should be discarded as malformed from the batcher and the operator in my opinion.
You can also bloat the verification data with valid inputs, the weight of the values are taking in consideration for evaluating the size of the proof. This is a small improvement but it's not going to lead to issues