Skip to content

perf(sdk): pipeline EOAWallet.sendBatch receipt waits#507

Draft
its-everdred wants to merge 5 commits into
mainfrom
kevin/perf-sdk-pipeline
Draft

perf(sdk): pipeline EOAWallet.sendBatch receipt waits#507
its-everdred wants to merge 5 commits into
mainfrom
kevin/perf-sdk-pipeline

Conversation

@its-everdred

@its-everdred its-everdred commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #456

Problem

EOAWallet.sendBatch previously sent a transaction, waited for its receipt, then moved to the next transaction. That kept ordered batches safe, but it also serialized the slow part of the flow: a cold-path swap with approval, Permit2 approval, and swap had to wait roughly one block per transaction before the next one could even be submitted. Fully parallel broadcasts are not a safe replacement because viem's nonce manager guarantees unique nonces, not that racing sends consume nonces in array order, so an ordered batch could assign the swap nonce before its approval nonce.

Solution

  • Broadcast transactions sequentially so nonce order still matches input order.
  • Wait for all receipts in parallel and return receipts in input order.
  • Add unit coverage for broadcast order, parallel waits, failure handling, and input-order receipts.

@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for actions-ui ready!

Name Link
🔨 Latest commit 27f399f
🔍 Latest deploy log https://app.netlify.com/projects/actions-ui/deploys/6a3efd085366c400080691e8
😎 Deploy Preview https://deploy-preview-507--actions-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

perf(sdk): pipeline EOAWallet.sendBatch for additional ~3.5s win

1 participant