Skip to content

fix: only override gas settings in executor when set - #820

Closed
gustavogama-cll wants to merge 1 commit into
mainfrom
ggama/fix/only-override-gas-params-when-set
Closed

fix: only override gas settings in executor when set#820
gustavogama-cll wants to merge 1 commit into
mainfrom
ggama/fix/only-override-gas-params-when-set

Conversation

@gustavogama-cll

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 29, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts EVM executor construction so gas settings from proposal metadata only override signer defaults when explicitly provided, preventing unintended GasLimit=0 (gas estimation) behavior on some chains.

Changes:

  • Make GasPrice override conditional on gasPrice being present (!= nil) in EVM additional fields.
  • Make GasLimit override conditional on gasLimit being non-zero in EVM additional fields.
  • Add inline rationale explaining why GasLimit=0 (estimation) can be problematic on certain RPCs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +79 to +83
auth.GasPrice = evmChainMetadata.GasPrice
}
if evmChainMetadata.GasLimit != 0 {
auth.GasLimit = evmChainMetadata.GasLimit
}
Comment on lines +75 to +79
// Only override when the proposal specifies a value; a zero GasLimit forces
// go-ethereum to estimate gas, which calls eth_getCode against the "pending"
// block and fails on chains (e.g. Avalanche Fuji) that no longer support it.
if evmChainMetadata.GasPrice != nil {
auth.GasPrice = evmChainMetadata.GasPrice
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
16.11% Technical Debt Ratio on New Code (required ≤ 4%)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@gustavogama-cll
gustavogama-cll deleted the ggama/fix/only-override-gas-params-when-set branch July 29, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants