Skip to content

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Jan 8, 2026

Tracking the note hash leaf indexes during execution is unnecessary because when building the kernel hints we are able to obtain the note hash membership witness directly by value instead of by index. I guess the API obtaining the witness by value might be a bit slower since we first need to find where in the tree the it is while index directly points into a tree. But even if this is the case it doesn't seem to be worth the complexity (if the slowness turns out to be a problem we can always store a map from note hash to index in the node given that the note hashes are unique).

Decided to do this when trying to tackle F-218.

Copy link
Contributor Author

benesjan commented Jan 8, 2026

@benesjan benesjan force-pushed the 01-08-refactor_dropping_notehashleafindexmap branch from 69f815a to 8692d8d Compare January 8, 2026 20:14
@benesjan benesjan marked this pull request as ready for review January 8, 2026 20:16
@AztecBot AztecBot force-pushed the 01-08-refactor_dropping_notehashleafindexmap branch from 8692d8d to fddec79 Compare January 8, 2026 20:34
@AztecBot AztecBot enabled auto-merge January 8, 2026 20:34
@benesjan benesjan requested a review from nventuro January 8, 2026 20:38
Tracking the note hash leaf indexes during execution is unnecessary because when building the kernel hints we are able to obtain the note hash membership witness directly by value instead of by index. I guess the API obtaining the witness by value might be a bit slower since we first need to find where in the tree the it is while index directly points into a tree. But even if this is the case it doesn't seem to be worth the complexity (if the slowness turns out to be a problem we can always store a map from note hash to index in the node given that the note hashes are unique).

Decided to do this when trying to tackle [F-218](https://linear.app/aztec-labs/issue/F-218/remove-note-and-nullif-indexes-from-note-and-event-storage).
@benesjan benesjan force-pushed the 01-08-refactor_dropping_notehashleafindexmap branch from fddec79 to 45066ab Compare January 9, 2026 03:27
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