Skip to content

Conversation

@chengwenxi
Copy link
Contributor

@chengwenxi chengwenxi commented Jan 26, 2026

Summary by CodeRabbit

  • Refactor
    • Updated transaction type naming and terminology across transaction processing, receipt handling, and validation components.
    • Renamed public method names and type identifiers throughout the system to align with new conventions.
    • Modified trait implementations and encoding/decoding logic to reflect updated naming.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Systematic renaming of AltFee-related constructs to Morph terminology across transaction, receipt, and execution handler modules. Updates include enum variants (MorphReceipt, MorphTxEnvelope), type names (TxAltFee → TxMorph), constants (ALT_FEE_TX_TYPE_ID → MORPH_TX_TYPE_ID), method signatures, public API exports, and documentation. Core logic and control flow remain unchanged.

Changes

Cohort / File(s) Summary
Transaction Type Definitions
crates/primitives/src/transaction/morph_transaction.rs
Renamed TxAltFee struct to TxMorph, replaced ALT_FEE_TX_TYPE_ID with MORPH_TX_TYPE_ID, updated all trait implementations (Typed2718, Transaction, RlpEcdsaEncodableTx, etc.), renamed extension trait from TxAltFeeExt to TxMorphExt, updated tests and documentation
Transaction Module Exports
crates/primitives/src/transaction/mod.rs
Removed pub mod alt_fee, added pub mod morph_transaction, updated exports from ALT_FEE_TX_TYPE_ID, TxAltFee, TxAltFeeExt to MORPH_TX_TYPE_ID, TxMorph, TxMorphExt
Transaction Envelope
crates/primitives/src/transaction/envelope.rs
Replaced MorphTxEnvelope::AltFee(Signed<TxAltFee>) variant with MorphTxEnvelope::Morph(Signed<TxMorph>), updated imports, updated all match arms and trait implementations (tx_type, queue_index, TxHashRef, SignerRecoverable, codecs) to reference Morph
Receipt Structures
crates/primitives/src/receipt/receipt.rs, crates/primitives/src/receipt/mod.rs
Renamed MorphReceipt::AltFee variant to MorphReceipt::Morph, renamed constructor from with_alt_fee() to with_morph_tx(), renamed predicate from is_alt_fee() to is_morph_tx(), updated all match arms in encoding/decoding/RLP methods, updated test helpers and expectations
EVM Block Receipt
crates/evm/src/block/receipt.rs
Updated match arm to map MorphTxType::AltFee to MorphTxType::Morph, replaced MorphReceipt::AltFee with MorphReceipt::Morph variant
Public API Surface
crates/primitives/src/lib.rs
Updated public re-exports: removed ALT_FEE_TX_TYPE_ID, TxAltFee, TxAltFeeExt; added MORPH_TX_TYPE_ID, TxMorph, TxMorphExt
Execution Handler Logic
crates/revm/src/handler.rs, crates/revm/src/tx.rs
Replaced is_alt_fee_tx() predicate with is_morph_tx(), updated references from ALT_FEE_TX_TYPE_ID to MORPH_TX_TYPE_ID, updated token-fee deduction/reimbursement paths in validate_against_state_and_deduct_caller() and reimburse_caller(), updated reward_beneficiary() condition
EVM Documentation
crates/revm/src/lib.rs
Updated documentation comments from "AltFee transaction support" to "Morph transaction fee support" in TokenFeeInfo description

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • anylots

Poem

🐰 A hop through code, from Alt to Morph so spry,
Types and variants dance as we rename on by,
Receipts and transactions in harmony align,
Old names fade like morning dew in morning's shine,
The logic stays true, just with a fresher sign! ✨

🚥 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 PR title accurately and concisely describes the primary change: renaming AltFee terminology to MorphTransaction throughout the codebase.
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.

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