You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: avoid CU budget exceeded for lookup table management (#455)
## Summary
Multiply all current budget values by `7` in order to avoid CU budget
exceeded issues when
managing lookup tables.
<!-- greptile_comment -->
## Greptile Summary
This PR addresses compute unit (CU) budget exceeded errors in lookup
table management operations by introducing a safety multiplier of 7x to
all CU budget values. The change affects create/extend, extend,
deactivate, and close table operations in the table-mania module.
Key changes:
- Introduces `SAFETY_MULTIPLIER: u32 = 7`
- Updates compute unit budgets for table operations:
- Create and extend: ~18,550 CUs (up from ~2,650)
- Extend: 8,400 CUs (up from 1,200)
- Deactivate: 7,350 CUs (up from 1,050)
- Close: 7,350 CUs (up from 1,050)
The PR also updates test assertions to use upper bounds instead of exact
matches for CU consumption, making tests more resilient to variations in
actual CU usage.
## Confidence score: 4/5
1. This PR is safe to merge as it conservatively increases compute
budgets based on empirical observations
2. The score of 4 reflects that while the changes are well-tested and
solve an immediate issue, the 7x multiplier is somewhat arbitrary and
might be more than necessary
3. Files needing attention:
- magicblock-table-mania/src/compute_budget.rs - verify if 7x multiplier
is the optimal value
<sub>2 files reviewed, no comments</sub>
<sub>[Edit PR Review Bot
Settings](https://app.greptile.com/review/github) |
[Greptile](https://greptile.com?utm_source=greptile_expert&utm_medium=github&utm_campaign=code_reviews&utm_content=magicblock-validator_455)</sub>
<!-- /greptile_comment -->
0 commit comments