Skip to content

Conversation

guibescos
Copy link
Contributor

@guibescos guibescos commented Jul 10, 2024

Solana devnet pusher doesn't work great.
Since we have no Jito, we need to land many transactions sequentially. And until now it sequentially follows the order in price-config.yaml. In periods of bad landing rate it crashes before getting to the end of the sequence. Therefore price feeds towards the end of the list never get updated.

By randomizing the order of price updates to avoid the imbalance between the top of the list and the bottom of the list in terms of frequency of updates.

Copy link

vercel bot commented Jul 10, 2024

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 Jul 11, 2024 1:53pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Jul 11, 2024 1:53pm

@guibescos guibescos changed the title fix: randomize price feed ids fix(price-pusher): randomize price feed ids Jul 10, 2024
@@ -93,10 +93,11 @@ export class SolanaPricePusher implements IPricePusher {
return;
}

const shuffledPriceIds = priceIds.sort(() => Math.random() - 0.5);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmmm is this key computed only once? :? I'm wondering if it would crash if it's recalibrated each time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand your comment

@guibescos guibescos merged commit f5af412 into main Jul 11, 2024
@guibescos guibescos deleted the fix/random-price-feed-ids branch July 11, 2024 13:52
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