Skip to content

fix(rpc): eth_call and trace_call honor provided gas limit - #7701

Merged
LesnyRumcajs merged 1 commit into
mainfrom
fix-gas-limit-eth-call
Oct 2, 2026
Merged

LesnyRumcajs merged 1 commit into
mainfrom
fix-gas-limit-eth-call

Conversation

@LesnyRumcajs

@LesnyRumcajs LesnyRumcajs commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary of changes

Changes introduced in this pull request:

  • honor provided gas limit, if any.

Reference issue to close (if applicable)

Closes #7700

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Bug Fixes
    • eth_call and trace_call now respect the supplied gas limit, capped at the block gas limit. Calls with insufficient gas fail as they would on-chain.

@LesnyRumcajs
LesnyRumcajs requested a review from a team as a code owner October 2, 2026 08:50
@LesnyRumcajs
LesnyRumcajs requested review from EclesioMeloJunior and removed request for a team October 2, 2026 08:50
@LesnyRumcajs LesnyRumcajs added the RPC requires calibnet RPC checks to run on CI label Oct 2, 2026
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: 434f5b9f-ce3f-4f5e-b728-a12e6ba1f4ae

📥 Commits

Reviewing files that changed from the base of the PR and between 2fc65fd and 2fc65fd.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: 95b6e999-6ae5-47c7-a84d-db731ff39b19

📥 Commits

Reviewing files that changed from the base of the PR and between 6801552 and 2fc65fd.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/rpc/methods/eth/types.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

Call message conversion now honors a positive supplied gas limit, capped at the block gas limit. When gas is absent or zero, conversion uses the block gas limit. A test covers these cases and oversized values.

Changes

Call gas limit handling

Layer / File(s) Summary
Gas limit conversion and validation
src/rpc/methods/eth/types.rs, CHANGELOG.md
Message::try_from(EthCallMessage) uses a positive supplied gas value capped at BLOCK_GAS_LIMIT, or the block limit when gas is absent or zero. Tests cover the input boundaries and oversized values. The changelog records the fix for eth_call and trace_call.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: akaladarshi

Merge Risk: ⚪ Minimal · up to 2fc65

Both call methods honor the supplied gas limit, with insufficient-gas outcomes handled by their respective response formats. No material merge blocker is evident.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: eth_call and trace_call now honor the provided gas limit.
Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@LesnyRumcajs
LesnyRumcajs added this pull request to stack #7704 October 2, 2026 15:31
@LesnyRumcajs
LesnyRumcajs added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit d2c395f Oct 2, 2026
94 of 120 checks passed
@LesnyRumcajs
LesnyRumcajs deleted the fix-gas-limit-eth-call branch October 2, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC requires calibnet RPC checks to run on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gas cap is being ignored in eth_call

2 participants