Skip to content

Commit 141d6a5

Browse files
authored
fix: increase compute budgets due to (#537)
In some cases we run out of compute budget, like [here](https://explorer.solana.com/tx/5hAp9eswfdxCiQvGRg1EzwYhyvffNqmX6mfxV7LTYKtcMRnd4wgEn6H7EJirzZqXVt336xiGhmXjPTjEKSQaC4Pu?cluster=devnet) <!-- greptile_comment --> ## Greptile Summary Updated On: 2025-09-11 09:05:28 UTC This PR addresses compute budget exhaustion issues by increasing the compute unit (CU) limits for three task types in the committor service. The changes modify the `compute_units()` method implementations for both `ArgsTask` and `BufferTask` enums in `magicblock-committor-service/src/tasks/mod.rs`. Specifically, the compute budgets are increased as follows: - **Commit tasks**: 65,000 → 75,000 CU (+15%) - **Undelegate tasks**: 50,000 → 60,000 CU (+20%) - **Finalize tasks**: 40,000 → 60,000 CU (+50%) These changes ensure consistency between `ArgsTask::Commit` and `BufferTask::Commit` variants, both now using 75,000 CU. The modifications are in response to production transaction failures where operations exceeded their allocated compute budgets, as evidenced by the failed transaction referenced in the PR description. This is a defensive programming approach to prevent runtime failures in the blockchain environment where compute unit limits are strictly enforced and exceeded limits cause transaction failures. ## Confidence score: 5/5 - This PR is safe to merge with minimal risk as it only increases compute budget limits without changing core logic - Score reflects simple, well-understood changes that address a concrete production issue with clear evidence - No files require special attention as the changes are straightforward numerical increases <!-- /greptile_comment -->
1 parent 3fb36ab commit 141d6a5

File tree

1 file changed

+4
-4
lines changed
  • magicblock-committor-service/src/tasks

1 file changed

+4
-4
lines changed

magicblock-committor-service/src/tasks/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ impl BaseTask for ArgsTask {
186186

187187
fn compute_units(&self) -> u32 {
188188
match self {
189-
Self::Commit(_) => 65_000,
189+
Self::Commit(_) => 75_000,
190190
Self::BaseAction(task) => task.action.compute_units,
191-
Self::Undelegate(_) => 50_000,
192-
Self::Finalize(_) => 40_000,
191+
Self::Undelegate(_) => 60_000,
192+
Self::Finalize(_) => 60_000,
193193
}
194194
}
195195

@@ -307,7 +307,7 @@ impl BaseTask for BufferTask {
307307

308308
fn compute_units(&self) -> u32 {
309309
match self {
310-
Self::Commit(_) => 65_000,
310+
Self::Commit(_) => 75_000,
311311
}
312312
}
313313

0 commit comments

Comments
 (0)