Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ABI to Witness map to work on ranges. #861

Closed
TomAFrench opened this issue Feb 17, 2023 · 1 comment · Fixed by #3314
Closed

Change ABI to Witness map to work on ranges. #861

TomAFrench opened this issue Feb 17, 2023 · 1 comment · Fixed by #3314
Assignees
Labels
enhancement New feature or request

Comments

@TomAFrench
Copy link
Member

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 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

@TomAFrench TomAFrench added the enhancement New feature or request label Feb 17, 2023
@kevaundray
Copy link
Contributor

Possibly related to noir-lang/acvm#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants