Commit 6ccfebf
authored
chore: increase compute budget for table mania create lookup table (#450)
## Summary
Increased the compute budget for creating lookup tables in table mania
from 2,400 to 2,650 compute units to account for variation in PDA
derivation costs.
## Detail
The create lookup table instruction includes PDA derivation which can
vary in compute unit consumption by approximately 25 CUs. To ensure we
don't run out of compute units due to this variation, we've added a
safety buffer of 250 CUs (10x the observed variation).
Changes made:
- Updated `CREATE_AND_EXTEND_TABLE_CUS` constant from 2,400 to 2,650 CUs
- Added detailed documentation explaining the reasoning and referencing
test data
- Modified integration test to use `assert!` instead of `assert_eq!` to
allow for CU variation below the budgeted amount
The 250 CU buffer ensures reliable execution while maintaining
efficiency, as verified by test repository data showing PDA derivation
variation around 25 CUs.
See this repo to see how we determined the variation:
https://github.com/thlorenz/create-program-address-cus
This code is relevant to know it's only needed for create instructions:
https://github.com/solana-program/address-lookup-table/blob/main/program/src/processor.rs1 parent c24571a commit 6ccfebf
File tree
2 files changed
+7
-2
lines changed- magicblock-table-mania/src
- test-integration/test-table-mania/tests
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments