Skip to content

fix(rpc): Disable base fee/eip-3607 on debug_traceCall#3162

Open
exeokan wants to merge 7 commits intonightlyfrom
ege/trace-call-base-fee
Open

fix(rpc): Disable base fee/eip-3607 on debug_traceCall#3162
exeokan wants to merge 7 commits intonightlyfrom
ege/trace-call-base-fee

Conversation

@exeokan
Copy link
Contributor

@exeokan exeokan commented Feb 23, 2026

Description

When no gas price/ base fee is provided in debug_traceCall transaction params, gas price is set to 0, and the trace fails because gas price < block base fee.

With this PR, we mirror reth behaviour and disable the base fee check on debug_traceCall.
Also disabled to eip-3607 and block gas limit to match our eth_call impl.

Example call:

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "debug_traceCall",
    "params": [
        {
            "from": "0x0f820f428ae436c1000b27577bf5bbf09bfec8f2",
            "value": "0x0"
        }
    ]
}

Nightly:

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32003,
        "message": "max fee per gas less than block base fee"
    }
}

Head:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "failed": false,
        "gas": 53000,
        "returnValue": "",
        "structLogs": [
            {
                "pc": 0,
                "op": "STOP",
                "gas": 29947000,
                "gasCost": 0,
                "depth": 1,
                "stack": []
            }
        ]
    }
}

Copilot AI review requested due to automatic review settings February 23, 2026 13:49
@exeokan exeokan requested a review from a team as a code owner February 23, 2026 13:49
@github-actions
Copy link

⚠️ Changelog entry missing

No changes detected in CHANGELOG.md.

Recommendation:

fix(rpc): Disable base fee on debug_traceCall

Please add an entry to the CHANGELOG.md or dismiss this if the change doesn't require documentation.

To dismiss: Reply with /skip-changelog in any comment.

Copy link
Contributor

Copilot AI left a comment

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 fixes an issue where debug_traceCall fails when no gas price or base fee is provided in the transaction parameters. The fix disables base fee validation for trace calls to align with behavior in reth and other Ethereum clients, allowing simulated transactions with gas prices below the block base fee to execute successfully for tracing purposes.

Changes:

  • Modified debug_trace_call to set cfg_env.disable_base_fee = true, preventing base fee validation during trace execution
  • Changed cfg_env from immutable to mutable binding to allow configuration modification

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

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.3%. Comparing base (ce550b9) to head (164e911).

Additional details and impacted files
Files with missing lines Coverage Δ
crates/evm/src/query.rs 89.8% <100.0%> (+<0.1%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@exeokan exeokan changed the title fix(rpc): Disable base fee on debug_traceCall fix(rpc): Disable base fee/eip-3607 on debug_traceCall Feb 26, 2026
@exeokan
Copy link
Contributor Author

exeokan commented Feb 26, 2026

I want to note that even though I added disable_block_gas_limit = true to match our eth_call implementation, we cap the gas limit by block gas limit in create_txn_env, so it has no effect. This is also true for eth_call.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jfldde
jfldde previously approved these changes Feb 26, 2026
@eyusufatik
Copy link
Member

Also disabled to eip-3607 and block gas limit to match our eth_call impl.
is this the behaviour in geth/reht

@exeokan exeokan added this to the v2.3.0 milestone Mar 2, 2026
@exeokan
Copy link
Contributor Author

exeokan commented Mar 2, 2026

Also disabled to eip-3607 and block gas limit to match our eth_call impl.
is this the behaviour in geth/reht

Yes, on reth: call.rs

on geth:
NoBaseFee is set here: api.go
SkipTransactionChecks is set here: transaction_args.go

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.

5 participants