Skip to content

Conversation

@tomiiide
Copy link
Contributor

@tomiiide tomiiide commented Nov 26, 2025

Which Jira task is linked to this PR?

https://lifi.atlassian.net/browse/LF-16736

Why was it implemented this way?

Explain the reasoning behind the implementation. Were there alternative approaches? Why was this solution chosen?

This PR adds support for Jito bundles to enable more complex transactions on the Solana network

Key changes

  • Adds JitoConnection class extending Solana's Connection with bundle-specific methods (simulateBundle, sendBundle, getTipAccounts)
  • Adds automatic detection of rpcs with jito support by checking for getTipAccounts method availability.
  • Adds sendAndConfirmBundle with parallel sending and polling support like the existing sendAndConfirmTransaction
  • Updates solanaStepExecutor to handle bundles and single transaction depending on the sdk config and transactions

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

An example bundle -> https://explorer.jito.wtf/bundle/4b63086c8da6af20e5e715e9b5dc3278abb4d99442a6a64deea285f3b6cf1a34

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the SDK API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

@tomiiide tomiiide changed the title Add jito bundles feat: add support for jito bundles Nov 26, 2025
@tomiiide tomiiide marked this pull request as ready for review November 28, 2025 13:05
@tomiiide tomiiide changed the title feat: add support for jito bundles feat(v3-solana): add support for jito bundles Nov 28, 2025
@tomiiide tomiiide self-assigned this Nov 28, 2025
@tomiiide tomiiide requested a review from chybisov December 3, 2025 14:31
@tomiiide tomiiide requested a review from effie-ms December 3, 2025 14:31
* @param signedTransactions - Array of signed transactions
* @returns Bundle ID, transaction signatures, and confirmation results
*/
export async function sendAndConfirmBundle(
Copy link
Member

Choose a reason for hiding this comment

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

This implementation diverges from how we handle standard transactions. Can we align it with the existing pattern so it's easier to maintain and follow?

  1. We should avoid running simulations inside a loop.
  2. The same loop should be used for connection handling, retrieving block height, confirming transactions, etc., rather than splitting the logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So with the bundle logic, we only simulate and send bundle once, and then poll for confirmation, correct?
I know in most configs would only have one rpc, but in a case where there are more than one what happens if the first connection fails, do we have a fallback to other connections?

This also implies that there'll be no need for resending logic which makes sense for bundles, correct?

* @param timeoutMs - Maximum time to wait in milliseconds (default: 60000)
* @returns true if bundle was confirmed, false if timeout
*/
async confirmBundle(
Copy link
Member

@chybisov chybisov Dec 12, 2025

Choose a reason for hiding this comment

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

Why do we need this? I see it's not used. Since it's a class, I'd remove everything we are not using from here to stay lean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't, removed.

Copy link
Member

@chybisov chybisov left a comment

Choose a reason for hiding this comment

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

Looks good. Let's wait for confirmation from QA before merging.

@chybisov chybisov merged commit 1557f06 into v3 Dec 16, 2025
@chybisov chybisov deleted the add-jito-bundles branch December 16, 2025 14:50
effie-ms pushed a commit that referenced this pull request Dec 18, 2025
Co-authored-by: Eugene Chybisov <imchybisov@gmail.com>
Co-authored-by: Eugene Chybisov <18644653+chybisov@users.noreply.github.com>
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.

4 participants