Skip to content

refactor(pxe): batch RPC calls for note and event validation#22988

Open
nchamo wants to merge 3 commits intomerge-train/fairiesfrom
nicolasc/rpc-calls-optimization
Open

refactor(pxe): batch RPC calls for note and event validation#22988
nchamo wants to merge 3 commits intomerge-train/fairiesfrom
nicolasc/rpc-calls-optimization

Conversation

@nchamo
Copy link
Copy Markdown
Contributor

@nchamo nchamo commented May 6, 2026

Summary

  • Refactors note and event validation in the PXE to prefetch tx effects once per unique tx hash and pass them as a map to batch methods, eliminating redundant RPC calls when multiple notes/events share a transaction
  • Consolidates nullifier lookups into a chunked batch helper, replacing per-note RPC calls with a single batched call
  • Adds a uniqueBy utility to the foundation collection library for deduplicating arrays by a key function

@nchamo nchamo self-assigned this May 6, 2026
@nchamo nchamo requested a review from Thunkar May 6, 2026 13:57
Copy link
Copy Markdown
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.

Lovely! Would feel better if @mverzilli took a look too though

@nchamo nchamo requested a review from mverzilli May 6, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants