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

Document Witness offset of 1 #1410

Closed
Tracked by #1376
joss-aztec opened this issue May 26, 2023 · 0 comments
Closed
Tracked by #1376

Document Witness offset of 1 #1410

joss-aztec opened this issue May 26, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request refactor ssa

Comments

@joss-aztec
Copy link
Contributor

Problem

Recently added abi_gen::param_witnesses_from_abi_param uses an initial witness offset of 1 without explanation

Happy Case

We document it's significance, or generalise the offset into something that is backend agnostic.

Argument for keeping the offset:

  • It's commonly the case that an ACIR makes use of a zero constant anyway - this means we could use the same zero index as used by the backend. Here's an example of 0 & 1 being special-cased by r1cs
  • It removes the need for the backend to transform of the indices later

Argument for removing the offset:

  • It leaks an abstraction which is backend specific

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

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

No branches or pull requests

3 participants