Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

decrease gas limit overshoot to 40% #1519

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/providers/eth_provider/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ where

let gas_used = self.estimate_gas_inner(request, block_id).await?;

// Increase the gas used by 200% to make sure the transaction will not fail due to gas.
// Increase the gas used by 40% to make sure the transaction will not fail due to gas.
// This is a temporary solution until we have a proper gas estimation.
// Does not apply to Hive feature otherwise end2end tests will fail.
let gas_used = if cfg!(feature = "hive") { gas_used } else { gas_used * 2 };
let gas_used = if cfg!(feature = "hive") { gas_used } else { gas_used * 140 / 100 };
Ok(U256::from(gas_used))
}

Expand Down
Loading