Skip to content

feat: enforce CPU-instruction budget guard in resolution path#767

Merged
greatest0fallt1me merged 9 commits into
Predictify-org:masterfrom
annacodervibe:feat/cpu-instruction-budget-guard
Jun 29, 2026
Merged

feat: enforce CPU-instruction budget guard in resolution path#767
greatest0fallt1me merged 9 commits into
Predictify-org:masterfrom
annacodervibe:feat/cpu-instruction-budget-guard

Conversation

@annacodervibe

Copy link
Copy Markdown

Closes #599

- Add OperationWouldExceedBudget error variant (418)
- Add BudgetGuard helper in gas.rs with pre/post checkpoint tracking
- Wire guard into MarketResolutionManager::resolve_market at 5 checkpoints
- Wire guard into distribute_payouts loop with 10-iteration intervals
- Add unit tests for budget abort with synthetic low budget
- No unwrap() on Result from budget queries

Closes Predictify-org#599
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@annacodervibe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me greatest0fallt1me merged commit bc2b192 into Predictify-org:master Jun 29, 2026
1 check failed
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.

Add CPU-instruction budget guard around resolve_market and distribute_payouts hot path

3 participants