Skip to content

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Oct 7, 2025

As discussed in a PR down the stack returning the next tagging index in various places of tagging was confusing and it's better to return the last used one. In this PR I do this change.

Some of the code is quite weird but I think it doesn't make sense to invest time in that as I will replace all the tagging sync it all in followup PRs.

recipient.address,
),
),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test will get reworked in a followup PR were I will implement the solution of tracking finalized indexed etc. so would not care too much about this being nice and clear.

@benesjan benesjan force-pushed the 10-07-refactor_returning_last_used_tagging_index branch from 485e42f to 55a5541 Compare October 7, 2025 16:55
@benesjan benesjan marked this pull request as ready for review October 7, 2025 17:00
contractAddress: AztecAddress,
recipient: AztecAddress,
): Promise<IndexedTaggingSecret[]> {
): Promise<{ secret: DirectionalAppTaggingSecret; index: number | undefined }[]> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an ugly change but in a followup PR I will basically delete all the tagging sync and do it again so please tolerate.

public async syncTaggedLogsAsSender(
secret: DirectionalAppTaggingSecret,
contractAddress: AztecAddress,
): Promise<void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will rewrite this insanity and move it to a different file in a followup PR so wouldn't care about code quality here now.

*/
export function getInitialIndexesMap(indexedTaggingSecrets: IndexedTaggingSecret[]): {
export function getInitialIndexesMap(
indexedTaggingSecrets: { secret: DirectionalAppTaggingSecret; index: number | undefined }[],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as before, this became ugly with the change but I will just delete this in a followup PR.

@benesjan benesjan requested a review from nventuro October 8, 2025 16:06
@benesjan benesjan marked this pull request as draft October 14, 2025 10:18
@benesjan benesjan force-pushed the 10-07-refactor_returning_last_used_tagging_index branch from b3b8c16 to 3b0d5e2 Compare October 14, 2025 10:19
@benesjan benesjan force-pushed the 10-02-feat_executiontaggingindexcache branch from fd39b63 to cd31177 Compare October 14, 2025 10:19
@AztecBot AztecBot force-pushed the 10-02-feat_executiontaggingindexcache branch from cd31177 to bad2246 Compare October 14, 2025 10:42
@benesjan benesjan changed the base branch from 10-02-feat_executiontaggingindexcache to graphite-base/17534 October 14, 2025 10:55
@benesjan benesjan force-pushed the 10-07-refactor_returning_last_used_tagging_index branch from 3b0d5e2 to 9f97dee Compare October 14, 2025 11:32
@benesjan benesjan changed the base branch from graphite-base/17534 to next October 14, 2025 11:32
@benesjan benesjan marked this pull request as ready for review October 14, 2025 11:33
@benesjan benesjan requested a review from Thunkar October 14, 2025 13:50
Object.entries(newLargestIndexMapToStore).map(([directionalAppTaggingSecret, index]) => ({
secret: DirectionalAppTaggingSecret.fromString(directionalAppTaggingSecret),
index,
index: index - 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm gonna trust you on this one, because this method got kinda insane

Copy link
Contributor

@Thunkar Thunkar left a comment

Choose a reason for hiding this comment

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

Eagerly waiting for the next iteration

@benesjan benesjan added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@benesjan benesjan added this pull request to the merge queue Oct 15, 2025
Merged via the queue into next with commit 2d79115 Oct 15, 2025
15 checks passed
@benesjan benesjan deleted the 10-07-refactor_returning_last_used_tagging_index branch October 15, 2025 21:16
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