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

fix: handle compute unit + lookup tables, and improve flaky tests #965

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

aalu1418
Copy link
Collaborator

@aalu1418 aalu1418 commented Dec 9, 2024

Description

  • fix flaky test for GetBlocks slot generation != block generation so it can lag behind - increase timeout to reduce flakiness
  • fix compute budget handling instructions for lookup tables (need to account for shifted account indices when using lookup tables)

@aalu1418 aalu1418 force-pushed the fix/handle-compute-unit-and-lookup-tables branch from e0678bc to bd6a260 Compare December 9, 2024 19:45
@aalu1418 aalu1418 marked this pull request as ready for review December 9, 2024 20:19
@aalu1418 aalu1418 requested a review from a team as a code owner December 9, 2024 20:19
jmank88
jmank88 previously approved these changes Dec 9, 2024

// lookup table addresses are indexed after the tx.Message.AccountKeys
// higher indices must be increased
// https://github.com/gagliardetto/solana-go/blob/da2193071f56059aa35010a239cece016c4e827f/transaction.go#L440
Copy link
Contributor

Choose a reason for hiding this comment

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

If solana-go lib does the same, why do we need a wrapper here? Can not we use just the library instead? I'm thinking that we need to avoid having any other bug on our side in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it doesn't do the exact same thing - this comment is mostly just pointing out that lookup table addresses are indexes that are larger than the normal message.accountkeys array

solana-go requires a user to predeclare all instructions and then compile things together
our utility allows modification of an compiled transaction to include compute budget instructions

@aalu1418 aalu1418 merged commit 1357aa0 into develop Dec 10, 2024
35 checks passed
@aalu1418 aalu1418 deleted the fix/handle-compute-unit-and-lookup-tables branch December 10, 2024 15:41
silaslenihan pushed a commit that referenced this pull request Dec 11, 2024
* fix: handle compute unit + lookup tables, and improve flaky tests

* more complex: multiple instructions + multiple indices
dhaidashenko pushed a commit that referenced this pull request Dec 20, 2024
* fix: handle compute unit + lookup tables, and improve flaky tests

* more complex: multiple instructions + multiple indices
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.

5 participants