feat!: make unused msg disco fns private#20831
Conversation
| @@ -36,7 +36,7 @@ pub unconstrained fn process_private_note_msg<Env>( | |||
|
|
|||
| /// Attempts discovery of a note given information about its contents and the transaction in which it is suspected the | |||
| /// note was created. | |||
| pub unconstrained fn attempt_note_discovery<Env>( | |||
| pub(crate) unconstrained fn attempt_note_discovery<Env>( | |||
There was a problem hiding this comment.
I wanted to merge this PR but then after rebasing it did not compile. It turns out that this was broken to begin with because the token blacklist contract uses this function in the custom process_transparent_note method.
The transparent note flow is very archaic but it was kept around for demonstration purposes so I think it would be fine to just get rid of that.
But anyway makes sense to revert this smol change here and handle that in a followup if deemed desirable.
Did the revert of this change in eab8bd2
cf394d6 to
eab8bd2
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| /// This is `None` if the nullifier cannot be computed (e.g., because the nullifier hiding key is not available). | ||
| /// The result of [`crate::note::note_interface::NoteHash::compute_nullifier_unconstrained`]. | ||
| /// | ||
| /// This value is unconstrained as all of message discovery is unconstrained. This is `None` if the nullifier |
There was a problem hiding this comment.
This change made the code un-compilable because the fields are directly used by generate_contract_library_method_compute_note_hash_and_nullifier.
Reverted this change as it makes sense to tackle in a followup.
| /// The result of [`crate::note::note_interface::NoteHash::compute_nullifier_unconstrained`]. | ||
| /// | ||
| /// This value is unconstrained, as all of message discovery is unconstrained. It is `None` if the nullifier | ||
| /// cannot be computed (e.g. because the nullifier hiding key is not available). |
There was a problem hiding this comment.
I found it slightly confusing here that we mention that only this value is unconstrained even though whenever we use the NoteHashAndNullifier type even the note_hash is unconstrained.
I get what you mean though
…-functions-private
|
❌ Failed to cherry-pick to |
|
❌ Failed to cherry-pick to |
I adjusted some docs of public functions and made some that were `pub` into `pub(crate)`, since users should not need to use them. --------- Co-authored-by: benesjan <janbenes1234@gmail.com>
…1134, #21072, #21186, #21189, #21229, #21228, #21234, #21639) (#21745) ## Summary Combined backport of 12 PRs to v4-next, cherry-picked in chronological merge order: 1. #20512 — docs: add delayedpublicmutable apiref, fix misc docs 2. #20379 — feat: custom message handlers in Aztec.nr 3. #20831 — feat!: make unused msg disco fns private 4. #21024 — feat: add compile-time size check for events and error code links 5. #21134 — chore: add warning on invalid recipients 6. #21072 — feat: add aztecaddress::is_valid 7. #21186 — chore: use returns `true` for boolean fns 8. #21189 — feat: add note hash and nullifier helper functions with domain separation 9. #21229 — docs: small delayedpubmut update 10. #21228 — test: restore pubmut tests 11. #21234 — fix: claim contract & improve nullif docs 12. #21639 — feat!: split compute note hash and nullifier to reduce hashing Each PR is a separate commit (raw cherry-pick with conflicts left in), followed by a single final commit that resolves all conflicts — making it easy to review the conflict resolution independently. ## Conflict resolution (last commit) - `delayed_public_mutable.nr` / `public_immutable.nr` — merged doc comments from both sides - `aztec.nr` macros — integrated custom message handler + split compute functions - `discovery/mod.nr` / `process_message.nr` — merged offchain inbox sync + custom handler dispatch + split compute - `constants.nr` / `constants_tests.nr` — added new domain separators - `Nargo.toml` — added custom_message_contract - `netlify.toml` — merged error code redirects - `auth_contract` — kept v4-next delay value - `note_metadata.nr` — doc comment reformat - `migration_notes.md` — merged migration notes from both sides - Deleted `traits.nr` (v4-next uses `traits/` directory) ClaudeBox log: https://claudebox.work/s/3145d1bd30977c20?run=1 --------- Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>

I adjusted some docs of public functions and made some that were
pubintopub(crate), since users should not need to use them.