Skip to content

Conversation

@chengwenxi
Copy link
Contributor

@chengwenxi chengwenxi commented Jan 21, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Transaction gas limit cap now dynamically derives from the actual block gas limit instead of using a fixed limit value. This improves transaction gas limit handling to align with current block configurations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

The transaction gas limit cap in MorphEvm::new is now dynamically derived from the block's gas limit instead of using a fixed EIP-7825 Osaka 30M cap. The cfg_env.tx_gas_limit_cap is now set to input.block_env.gas_limit, making the transaction gas limit constraint dependent on the block configuration.

Changes

Cohort / File(s) Summary
Gas Limit Cap Configuration
crates/evm/src/evm.rs
Modified MorphEvm::new to derive tx_gas_limit_cap from block_env.gas_limit instead of using a hardcoded EIP-7825 Osaka 30M cap value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through blocks so tall,
Where gas limits once fixed, now dance with all,
Block-bound caps in harmony they flow,
Dynamic limits steal the show! 🐰⛽

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'refactor: remove tx gas limit' is vague about what is actually being changed; the PR derives tx gas limit cap from block gas limit rather than removing it entirely. Consider a more descriptive title that clarifies the main change, such as 'refactor: derive tx gas limit cap from block gas limit' or 'refactor: use block gas limit for tx gas limit cap'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

@chengwenxi
Copy link
Contributor Author

set tx_gas_limit_cap in cfg

@chengwenxi chengwenxi closed this Jan 21, 2026
@chengwenxi chengwenxi deleted the tx-gas-limit branch January 21, 2026 03:39
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.

3 participants