Skip to content
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

feat(price_pusher/solana): use an Address Lookup Table to reduce number of txs #2396

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented Feb 18, 2025

Purpose

Recently our merkle proof size grew due to newly added feeds. This caused two postUpdate ixs to no longer fit inside a single tx. This resulted in us needing to use more transactions to land our updates, which means increased operational costs of running the price pusher.

This PR uses Address Lookup Tables to save space in order to fit 2 postUpdate ixs in a single tx again.

ALT details

The following accounts are static and are indexed in the ALT:

  1. Pyth Solana Receiver
    rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ
  2. Treasury (id 0):
    GakrHE9QQeeJKoZ6oww9qzJZrzXY7C1jZdVfpYHc6KSz
  3. Config:
    DaWUKXCyXsnzcvLUyeJRWou8KTn7XtadgTsdhJ6RHS7b
  4. Wormhole Solana Receiver:
    HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ
  5. Wormhole Guardian Set PDA: 5gxPdahvSzcKySxXxPuRXZZ9s6h8hZ88XDVKavWpaQGn
  6. Compute budget program: ComputeBudget111111111111111111111111111111

The following ALTs have been created, owned by our SVM deployer key:

Pusher/SDK details

  • Added --address-lookup-table-account argument to the pusher to enable using an ALT. This should enable us to set a --updates-per-jito-bundle value of 6 (back from 4).
    • Surfaced the addressLookupTable ctor arg in pythSolanaReceiver.newTransactionBuilder so that any client can use an ALT.
  • Added --treasury-id argument to the pusher and the receiver SDK to be able to use a stable treasury account. The treasury account with id 0 is indexed in the ALTs above.
  • Updated VAA_SPLIT_INDEX to 700 from 750 to make space for the ALT. Without this change, the first part of the VAA doesn't fit in the first tx.

Testing

Copy link

vercel bot commented Feb 18, 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 Feb 20, 2025 6:29pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 6:29pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 6:29pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2025 6:29pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2025 6:29pm
insights ⬜️ Ignored (Inspect) Visit Preview Feb 20, 2025 6:29pm

@tejasbadadare tejasbadadare changed the title feat: add ALT to pusher to reduce number of txs feat(price_pusher/solana): use an Account Lookup Table to reduce number of txs Feb 18, 2025
@tejasbadadare tejasbadadare changed the title feat(price_pusher/solana): use an Account Lookup Table to reduce number of txs feat(price_pusher/solana): use an Address Lookup Table to reduce number of txs Feb 18, 2025
@tejasbadadare tejasbadadare marked this pull request as ready for review February 18, 2025 22:26
* This way, the packing of the instructions to post an encoded vaa is more efficient.
*/
export const VAA_SPLIT_INDEX = 755;
export const VAA_SPLIT_INDEX = 700;
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't seem tight
i think you can go up to 737

Copy link
Contributor Author

@tejasbadadare tejasbadadare Feb 19, 2025

Choose a reason for hiding this comment

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

highest i could get it to is 721, not sure where the extra space is coming from

@guibescos
Copy link
Contributor

you can also add the guardians account to the LTA

Copy link
Contributor

@guibescos guibescos left a comment

Choose a reason for hiding this comment

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

thank you! let's bump the pusher and deploy

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