Skip to content

refactor!: cleaning up tagging oracles#17372

Merged
benesjan merged 1 commit intonextfrom
09-29-refactor_cleaning_up_tagging_oracles
Oct 1, 2025
Merged

refactor!: cleaning up tagging oracles#17372
benesjan merged 1 commit intonextfrom
09-29-refactor_cleaning_up_tagging_oracles

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Sep 29, 2025

In this PR I merge getIndexedTaggingSecretAsSender and incrementAppTaggingSecretIndexAsSender and get_app_tag_as_sender into single get_next_app_tag(sender, recipient). This results in the app tag being computed in TS and not in Noir.

The motivation for this is that to improve robustness of tagging as described in this post we need to associate a given index with tx hash and this is the first step in that direction.

Note for reviewer

This is a breaking change because it changes oracles but I don't think a dev would ever call these oracles directly so I didn't bother with writing migration notes. If the reviewer thinks it should be done then LMK and I can add it.

Copy link
Contributor Author

benesjan commented Sep 29, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from 745bc29 to ac2a7bf Compare September 29, 2025 18:28
@benesjan benesjan marked this pull request as ready for review September 29, 2025 18:49
@benesjan benesjan requested a review from LeilaWang as a code owner September 29, 2025 18:49
@benesjan benesjan marked this pull request as draft September 30, 2025 05:41
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch 2 times, most recently from ee33e77 to a576c5c Compare September 30, 2025 05:48
@benesjan benesjan marked this pull request as ready for review September 30, 2025 05:48
@benesjan benesjan changed the base branch from next to graphite-base/17372 September 30, 2025 06:18
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from a576c5c to 326a25f Compare September 30, 2025 06:18
@benesjan benesjan changed the base branch from graphite-base/17372 to 09-26-refactor_dropping_getnotes_from_testwallet September 30, 2025 06:18
@benesjan benesjan changed the base branch from 09-26-refactor_dropping_getnotes_from_testwallet to graphite-base/17372 September 30, 2025 06:22
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from 326a25f to a758ed1 Compare September 30, 2025 06:22
@benesjan benesjan changed the base branch from graphite-base/17372 to next September 30, 2025 06:22
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from a758ed1 to bf802de Compare September 30, 2025 06:24
@benesjan benesjan changed the title refactor: cleaning up tagging oracles refactor!: cleaning up tagging oracles Sep 30, 2025
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from bf802de to 15b4247 Compare September 30, 2025 16:52
Comment on lines -8 to -12
pub struct IndexedTaggingSecret {
app_tagging_secret: Field,
index: u32,
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this a proto struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was introduced in this PR by Grego. I don't really know but I guess it was because we have the TS counterpart and we wanted to have a matching struct in Noir.

return toForeignCallResult(witness.toNoirRepresentation());
}

async utilityGetIndexedTaggingSecretAsSender(foreignSender: ForeignCallSingle, foreignRecipient: ForeignCallSingle) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, rpc translator does not handle privateIncrementAppTaggingSecretIndexAsSender, so you were not forced to update to privateGetNextAppTagAsSender. I thought the class had been setup with zod to typecheck that all are handled, but it seems I was wrong.

Could you add the oracle, and maybe take a quick look to see if you can get the zod thing working? i.e. that when a txe session dispatches to the rpc translator we know that a) the fn is one of the allowed ones, and b) that all allowed fns are handled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the missing method in 171b7ba and will try to figure out the zod thing in a separate PR.

@benesjan benesjan marked this pull request as draft October 1, 2025 06:58
@benesjan benesjan force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from 3788ddb to 309fc54 Compare October 1, 2025 07:01
@benesjan benesjan marked this pull request as ready for review October 1, 2025 07:16
In this PR I merge `getIndexedTaggingSecretAsSender` and `incrementAppTaggingSecretIndexAsSender` and `get_app_tag_as_sender` into single `get_next_app_tag(sender, recipient)`. This results in the app tag being computed in TS and not in Noir.

The motivation for this is that to improve robustness of tagging as described in [this post](https://forum.aztec.network/t/on-note-discovery-and-index-coordination/7165) we need to associate a given index with tx hash and this is the first step in that direction.

### Note for reviewer

This is a breaking change because it changes oracles but I don't think a dev would ever call these oracles directly so I didn't bother with writing migration notes. If the reviewer thinks it should be done then LMK and I can add it.

Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
@AztecBot AztecBot force-pushed the 09-29-refactor_cleaning_up_tagging_oracles branch from 171b7ba to dfe7b5c Compare October 1, 2025 07:48
@benesjan benesjan added this pull request to the merge queue Oct 1, 2025
Merged via the queue into next with commit ec49578 Oct 1, 2025
16 checks passed
@benesjan benesjan deleted the 09-29-refactor_cleaning_up_tagging_oracles branch October 1, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants