Skip to content

fix(jito_rpc): makes jito bundle atomic#610

Open
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
0xzrf:atomic_send_bundle
Open

fix(jito_rpc): makes jito bundle atomic#610
0xzrf wants to merge 2 commits intosolana-foundation:mainfrom
0xzrf:atomic_send_bundle

Conversation

@0xzrf
Copy link
Copy Markdown
Contributor

@0xzrf 0xzrf commented Apr 3, 2026

Summery

Simulates each transaction sent in the sendBundle rpc method and early returns if any of them fail.

Changes

  • Adds an iterator inside the SurfpoolJitoRpc::send_bundle function before sending transactions
  • Adds test to check if it returns the right error message

Note

This might not entirely replicate jito bundles. But since it's majorly used for testing purposes, it works well to say that the bundle is atomic

Closes #594

Copy link
Copy Markdown
Collaborator

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

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

Sadly this won't cut it. A jito bundle is likely to be a set of transactions that build off each other. For example:

  1. Transaction 1 - Create token account, fund it
  2. Transaction 2 - Put token from token account into escrow

In this case, since we're just simulating one after the other, tx 1 would succeed for simulation, and tx 2 would fail, because it depends on tx 1 being in affect.

You may be able to try a different loop:

  1. Simulate tx 1
  2. Execute tx 1
  3. Simulate tx 2
  4. Execute tx 2
  5. etc...

The only thing I'd want to check here is to confirm that all of the txs still land on the same block

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.

Update sendBundle method to actually be atomic

2 participants