Skip to content

feat: support multiple JITO endpoints with round-robin retry #2664

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Multiple JITO Endpoints Support

This PR adds support for multiple JITO endpoints in the Solana price pusher with a round-robin retry mechanism.

Changes:

  • Modified sendTransactionsJito to accept a list of SearcherClients
  • Updated SolanaPricePusherJito class to accept multiple endpoints
  • Modified command handler to process comma-separated JITO endpoints
  • Updated RPC selector script to write multiple healthy endpoints

Implementation details:

  • Uses first successful endpoint
  • Maintains dynamic JITO tips feature
  • Implements time-based retry mechanism that cycles through endpoints
  • Logs warnings when cycling through endpoints

Link to Devin run: https://app.devin.ai/sessions/4b444e4e547842658001b352436f6970
Requested by: Ali Behjati ([email protected])

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner May 8, 2025 12:20
Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm
entropy-explorer ❌ Failed (Inspect) May 9, 2025 6:29pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 6:29pm

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@@ -50,7 +50,7 @@ export default {
default: 50000,
} as Options,
"jito-endpoint": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rename this param to jito-endpoints for clarity

Comment on lines +85 to +95
while (Date.now() - startTime < maxRetryTimeMs) {
const currentClient = clients[clientIndex];
try {
await currentClient.sendBundle(bundle);
return firstTransactionSignature;
} catch (err: any) {
lastError = err;
clientIndex = (clientIndex + 1) % clients.length;
await new Promise((resolve) => setTimeout(resolve, 500));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

(aside) @guibescos do you know how many jito endpoints we can round robin against? the ratelimit retry logic is a little funky here if there are only 2 or 3.

Copy link
Contributor

Choose a reason for hiding this comment

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

(aside) cc @ali-bahjati

Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

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.

2 participants