Skip to content

Feat: merge rlease v2.2.1 - Prague refactoring#104

Merged
mrLSD merged 3 commits intomasterfrom
current-prague-hard-fork
Feb 3, 2026
Merged

Feat: merge rlease v2.2.1 - Prague refactoring#104
mrLSD merged 3 commits intomasterfrom
current-prague-hard-fork

Conversation

@mrLSD
Copy link
Copy Markdown
Member

@mrLSD mrLSD commented Feb 3, 2026

  • Gasometr: refactoring and improvements

  • Bump version to: v2.2.1

  • Extend doc comment for calculate_intrinsic_gas_and_gas_floor

  • feat: introduce gas_floor_base_cost for EIP-7623 compliance (feat: introduce gas_floor_base_cost for EIP-7623 compliance #101)

  • feat: introduce gas_floor_base_cost for EIP-7623 compliance

  • fix: replace simple arithmetic operations with saturating_* analogs for gas calculations

  • chore: remove gas_floor_base_cost constant


Summary by CodeRabbit

  • Refactor

    • Reworked gas calculation and transaction verification for clearer separation of concerns and maintainability.
    • Improved floor-gas handling with better compliance to EIP-2028 and EIP-7623.
  • Behavior

    • Transaction processing now computes intrinsic gas and floor gas separately and enforces gas limits and optional gas-floor checks.
  • Documentation

    • Minor doc note about a planned config rename in a future release.

* Gasometr: refactoring and improvements

* Bump version to: v2.2.1

* Extend doc comment for calculate_intrinsic_gas_and_gas_floor

* feat: introduce gas_floor_base_cost for EIP-7623 compliance (#101)

* feat: introduce gas_floor_base_cost for EIP-7623 compliance

* fix: replace simple arithmetic operations with saturating_* analogs for gas calculations

* chore: remove gas_floor_base_cost constant

---------

Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 3, 2026

Walkthrough

Refactors the gasometer to extract intrinsic and floor gas computation into three new functions: calculate_intrinsic_gas_and_gas_floor(), intrinsic_gas_and_gas_floor(), and verify_transaction(). record_transaction() now delegates to verify_transaction(). Adds a TODO comment to runtime::Config.gas_transaction_call.

Changes

Cohort / File(s) Summary
Gasometer refactor
evm/src/gasometer/mod.rs
Added calculate_intrinsic_gas_and_gas_floor(data, access_list, authorization_list_len, config, is_contract_creation), intrinsic_gas_and_gas_floor(cost, config), and verify_transaction(&mut self, cost). record_transaction() now calls verify_transaction(); intrinsic gas and floor-gas logic moved into helpers; preserved logging and event emission.
Runtime doc
evm/src/runtime/mod.rs
Added a TODO doc comment on Config.gas_transaction_call noting planned rename in 3.0.0 (no API change).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • aleksuss
  • birchmd

Poem

🐰 With careful hops I count each gas and floor,
I split the costs and check the limit's door,
Verify, record, and log the trace,
A rabbit's song for tidy code and grace,
Hop on—transactions balanced evermore.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat: merge rlease v2.2.1 - Prague refactoring' references gasometer refactoring and EIP-7623 compliance work, which aligns with the main changes in the PR modifying gasometer gas calculation logic.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch current-prague-hard-fork

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

@mrLSD mrLSD self-assigned this Feb 3, 2026
@mrLSD mrLSD changed the title Release: v2.2.1 - Prague refactoring Feat: merge rlease v2.2.1 - Prague refactoring Feb 3, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@evm/src/gasometer/mod.rs`:
- Around line 505-511: Fix the typo in the comment ("cas_cost" → "gas_cost") and
make the gas check use the same accessor consistently: replace the earlier use
of self.gas() with self.gas_limit() so the EIP-7623 floor check uses
self.gas_limit() for both comparisons; update the comment to read "gas_cost" and
ensure the conditional still checks self.config.has_floor_gas &&
self.gas_limit() < floor_gas and sets self.inner = Err(ExitError::OutOfGas) /
returns Err(ExitError::OutOfGas) as before.

Comment thread evm/src/gasometer/mod.rs
@mrLSD mrLSD merged commit 7e5d817 into master Feb 3, 2026
7 checks passed
@mrLSD mrLSD deleted the current-prague-hard-fork branch February 3, 2026 18:49
@coderabbitai coderabbitai Bot mentioned this pull request Feb 4, 2026
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