From 226766b305f4726fa44b836486c595c534040541 Mon Sep 17 00:00:00 2001 From: shawn Date: Mon, 11 Dec 2023 15:11:40 -0800 Subject: [PATCH] increased the instruction padding for preflight fees to 3 million (#1124) --- cmd/soroban-rpc/lib/preflight/src/fees.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/soroban-rpc/lib/preflight/src/fees.rs b/cmd/soroban-rpc/lib/preflight/src/fees.rs index 1cfc16b16e..3e08a71201 100644 --- a/cmd/soroban-rpc/lib/preflight/src/fees.rs +++ b/cmd/soroban-rpc/lib/preflight/src/fees.rs @@ -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 {