-
Notifications
You must be signed in to change notification settings - Fork 315
feat(price_pusher/solana): use an Address Lookup Table to reduce number of txs #2396
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
target_chains/solana/sdk/js/pyth_solana_receiver/src/PythSolanaReceiver.ts
Outdated
Show resolved
Hide resolved
| * 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; |
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 doesn't seem tight
i think you can go up to 737
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.
highest i could get it to is 721, not sure where the extra space is coming from
target_chains/solana/sdk/js/pyth_solana_receiver/examples/update_price_feed.ts
Outdated
Show resolved
Hide resolved
|
you can also add the guardians account to the LTA |
guibescos
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.
thank you! let's bump the pusher and deploy
Purpose
Recently our merkle proof size grew due to newly added feeds. This caused two
postUpdateixs 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:
rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ
GakrHE9QQeeJKoZ6oww9qzJZrzXY7C1jZdVfpYHc6KSz
DaWUKXCyXsnzcvLUyeJRWou8KTn7XtadgTsdhJ6RHS7b
HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ
The following ALTs have been created, owned by our SVM deployer key:
Pusher/SDK details
--address-lookup-table-accountargument to the pusher to enable using an ALT. This should enable us to set a--updates-per-jito-bundlevalue of 6 (back from 4).addressLookupTablector arg inpythSolanaReceiver.newTransactionBuilderso that any client can use an ALT.--treasury-idargument 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.VAA_SPLIT_INDEXto 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
--updates-per-jito-bundle 6with the ALT. First tx of the bundle: https://solscan.io/tx/4QEj9GkNUJ2HMwoqKA9KZDkB1r3SR6KWCuViNEmnCyPAyXZAiKA9P7m4CRVba3UBTs9w7oPPcjxZYhxiwcvKdtQ8