Skip to content

Commit

Permalink
increased preflight instruction fee padding to 3 million
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Dec 11, 2023
1 parent c61b73f commit d46c0ac
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 d46c0ac

Please sign in to comment.