-
Notifications
You must be signed in to change notification settings - Fork 195
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
Returned values from main are set to public (Successor) #731
Conversation
- Add a SetPub Expression - Instead of adding a constrain statement and adding a `return` parameter to main, we now specify that the return type should be set as public. This is then dealt with in the ssa pass.
…nto the evaluator
- `get_or_generate_witness` is not named `generate_witness`
- This can be done as a separate PR. Removing it to make PR easier to review, an issue has been opened up for this
generate_witness will panic when trying to generate a witness for a constant
codegening an array and calling to_node_ids will produce a single node_id, whereas we want to fetch all elements of the array
- When a public input is return as a public output (return value), it is then added into the public input list twice. Using the current code, we need this duplication since we want to write the return values into the toml files. For proving and verifying we want to remove these duplicate values
- The prover no longer supplies a `return` field in toml. - The ABI will have a `return` field, so when proving, we use the `skip_output` flag to ignore the `return` field in the ABI - As noted in the comments, this will look cleaner when we add a `public_outputs` field
…esponds to private input from the ABI (main parameters)
- Additionally, private ABI inputs are not allowed
- Only create the Return Operation if the return type from main is not Unit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return value in the prover.toml should not be removed, as this is not a fix for the issue and it removes a feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend parts look fine to me. I am fine with merging once the existing comments are resolved.
07c2f1c
to
de7d81e
Compare
de7d81e
to
ba2e28b
Compare
private values in the ABI cannot be returned as public
* master: feat(noir)!: Returned values are no longer required by the prover (noir-lang#731)
* master: Rename methods that use `conditionalize` to be more descriptive (#739) feat(noir)!: Returned values are no longer required by the prover (#731) chore: explicit versions for dependencies (#727) chore: readability improvements (#726) feat(nargo): include short git commit in cli version output (#721) Remove print to console for named proofs in `nargo prove` (#718) chore: clean up serde-related dependencies (#722) Handle out-of-bound errors in CSE (#471) (#673) Remove unused dependencies and only use workspace inheritance on shared deps (#671) feat(std_lib)!: modulus bits/bytes methods, and to_bits -> to_le_bits (#697) Implement numeric generics (#620) Review some TODO in SSA (#698) Replace `toml_map_to_field` and `toml_remap` with traits to map between `InputValue`s and `TomlTypes` (#677) Apply witness visibility on a parameter level rather than witness level (#712)
Related issue(s)
Resolves #455
Description
This is #634 however, the PR reverts back to commit #21c0b and merges the updated master into it.
This PR does not require a new release of ACVM/ACIR since we do not need to have
public outputs
. A different method was suggested where we could possibly avoid deduplication, however both methods require deduplication, so I have opted to revert back to this simpler change.Summary of changes
See #634
public_inputs
vectorDependency additions / changes
Test additions / changes
Checklist
cargo fmt
with default settings.Additional context