Skip to content

Commit

Permalink
increased the instruction padding for preflight fees to 3 million (#1124
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sreuland authored Dec 11, 2023
1 parent e9035f3 commit 226766b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/soroban-rpc/lib/preflight/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ fn calculate_host_function_soroban_resources(
.map(|c| c.encoded_new_value.as_ref().map_or(0, Vec::len) as u32)
.sum();

// Add a 20% leeway with a minimum of 1 million instructions
// Add a 20% leeway with a minimum of 3 million instructions
let budget_instructions = budget
.get_cpu_insns_consumed()
.context("cannot get instructions consumed")?;
let instructions = max(
budget_instructions + 1000000,
budget_instructions + 3000000,
budget_instructions * 120 / 100,
);
Ok(SorobanResources {
Expand Down

0 comments on commit 226766b

Please sign in to comment.