You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The size of the ABI file currently scales with the number of field elements which make up the circuit inputs/outputs.
As we scale up the number of fields (e.g. for a circuit which takes an image as an input) we're going to get an unreasonably large ABI.
Solution
We encode all inputs to contiguous ranges of witness indices so we can change param_witnesses to be a BTreeMap<String, Range<Witness>> to handle this.
The only trouble with this is that the public outputs may not be in order (e.g. say the return value is an array where one of the elements is also a public input and so has a smaller index) so this breaks.
We could then use a BTreeMap<String, Vec<Range<Witness>>> to handle all of these cases or handle the return value specially (which may be preferable considering #678)
Alternatives considered
Additional context
The text was updated successfully, but these errors were encountered:
Problem
The size of the ABI file currently scales with the number of field elements which make up the circuit inputs/outputs.
As we scale up the number of fields (e.g. for a circuit which takes an image as an input) we're going to get an unreasonably large ABI.
Solution
We encode all inputs to contiguous ranges of witness indices so we can change
param_witnesses
to be aBTreeMap<String, Range<Witness>>
to handle this.The only trouble with this is that the public outputs may not be in order (e.g. say the return value is an array where one of the elements is also a public input and so has a smaller index) so this breaks.
We could then use a
BTreeMap<String, Vec<Range<Witness>>>
to handle all of these cases or handle the return value specially (which may be preferable considering #678)Alternatives considered
Additional context
The text was updated successfully, but these errors were encountered: