Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Introduce the concept of a public output #131

Closed
kevaundray opened this issue Jan 14, 2023 · 1 comment · Fixed by #56
Closed

Introduce the concept of a public output #131

kevaundray opened this issue Jan 14, 2023 · 1 comment · Fixed by #56
Labels
enhancement New feature or request

Comments

@kevaundray
Copy link
Contributor

Problem

Currently we have the concept of a public input, and we have the concept of a "return" field in the public inputs which functionally serves as public output.

Solution

We can:

  • Add an optional return field in the Abi which signifies the output
  • Add a public outputs vector in ACIR to signify public witness values which are semantically output

The second point is blocked until we complete the ACIR migration

Alternatives considered

Additional context

  • This cleans up some of the code in the package manager as a side effect; because ACIR does not have the concept of a public output, nargo needs to ensure that when we pass public input values, we do not have any duplicates. This duplication can happen when a public input is set as a public output.

If we add public outputs to ACIR, we can by proxy add logic to deduplicate public input/output indices

  • SSA setpub instruction will then add to the public_outputs field in ACIR instead of the public inputs field
@TomAFrench
Copy link
Member

Going to transfer this to the ACVM repo as the knock-on effects on deduplication of public inputs is handled as of noir-lang/noir#862

@TomAFrench TomAFrench transferred this issue from noir-lang/noir Mar 1, 2023
@TomAFrench TomAFrench linked a pull request Mar 1, 2023 that will close this issue
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants