feat(noir): separate arguments of inputs - #456
Merged
Merged
Conversation
spalladino
approved these changes
May 4, 2023
spalladino
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Great that we have the open keyword now.
| _call_context: pub CallContext, | ||
| amount: pub Field, | ||
| recipient: pub Point, | ||
| open fn mint( |
|
|
||
| /// ABI value type "secret" | ||
| /// ABI value params [{"name":"input","type":{"kind":"field"},"visibility":"public"}] | ||
| /// ABI value return [{"kind":"field"}] |
Contributor
There was a problem hiding this comment.
Shouldn't we keep the return annotation at least? Can the client consume this value?
Contributor
Author
There was a problem hiding this comment.
Users currently cannot consume the return value for secret functions! The idea is to phase out the ABI manual comments for the introduction of the aztec noir compiler 😄
ludamad
added a commit
that referenced
this pull request
Jul 14, 2023
This was referenced Jul 25, 2023
codygunton
pushed a commit
that referenced
this pull request
Jan 23, 2024
rangozd
pushed a commit
to rangozd/aztec-packages
that referenced
this pull request
Aug 5, 2026
* fix 1: pin honk_key_gen Solidity VK emission to flavor entity count Audit finding AztecProtocol#1. The Solidity VK generator hand-wrote the precomputed-G1 emission list with no link to the flavor, so adding/removing a precomputed entity would silently drift the generated on-chain VK out of sync with the C++ layout. Drive the emission count from a (commitment, name) array and static_assert it against the flavor's size(); add a test asserting the generator emits exactly size() G1 points. * fix 3: set beta_quartic in RelationParameters::compute_beta_powers Audit finding AztecProtocol#3. compute_beta_powers() set beta..beta_cube but left beta_quartic at 0, so the test-only get_random() built eccvm_set_permutation_delta with a zero domain-separation tag instead of the production FIRST_TERM_TAG * beta^4. Set beta_quartic = beta_cube * beta so test-infra parameters match the eccvm relation semantics. * fix 4: reject wrong-size field input in VK deserialization Audit finding AztecProtocol#4. NativeVerificationKey_::from_field_elements and the StdlibVerificationKey_ span constructor consumed only the fields they needed and silently ignored trailing ones, so an oversize (malformed) VK deserialized without error. Assert the input field count matches the VK layout exactly on both paths so a malformed VK is rejected rather than masked. * fix 6: add [[nodiscard]] to create_recursion_constraints Audit finding AztecProtocol#6. create_recursion_constraints returns the aggregated pairing points and IPA claim the caller must deferred-accumulate to complete recursive verification, but unlike its inner helper create_honk_recursion_constraints it carried no [[nodiscard]] -- a caller could silently drop the result and skip accumulation with no diagnostic. Add the attribute, matching the inner helper. * fix 7: assert that hasZK and masking layout are consistent. * fix: extend gemini-masking-layout assert to remaining ZK flavors Finding AztecProtocol#7's gemini_masking_layout_consistent<> static_assert was only on Ultra/UltraZK/Mega/MegaZKFlavor. UltraKeccakZKFlavor, UltraZKRecursiveFlavor and MegaZKRecursiveFlavor hand-declare both the masking flag and the AllValues layout, so they can drift independently the same way -- MegaZKRecursiveFlavor most acutely, since its HasGeminiMasking=false is decoupled from HasZK=true. Add the assert to all three; all are currently consistent, so this is pure hardening.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #455
Extracts the arguments from the inputs struct in noir contracts. For now they have to be manually pushed to the context.
Updates the postprocessor to omit the Inputs & CallContext, allowing to avoid writing ABI comments in the noir code.
Checklist: