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>

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