-
Notifications
You must be signed in to change notification settings - Fork 100
feat(v3-solana): add support for jito bundles #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * @param signedTransactions - Array of signed transactions | ||
| * @returns Bundle ID, transaction signatures, and confirmation results | ||
| */ | ||
| export async function sendAndConfirmBundle( |
There was a problem hiding this comment.
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?
- We should avoid running simulations inside a loop.
- The same loop should be used for connection handling, retrieving block height, confirming transactions, etc., rather than splitting the logic.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't, removed.
chybisov
left a comment
There was a problem hiding this 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.
Co-authored-by: Eugene Chybisov <imchybisov@gmail.com> Co-authored-by: Eugene Chybisov <18644653+chybisov@users.noreply.github.com>
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
getTipAccountsmethod availability.sendAndConfirmBundlewith parallel sending and polling support like the existingsendAndConfirmTransactionsolanaStepExecutorto handle bundles and single transaction depending on the sdk config and transactionsVisual 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