Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################## update dependencies ####################
ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.1.2
ETHEREUM_TARGET_VERSION := morph-v2.1.2
ETHEREUM_SUBMODULE_COMMIT_OR_TAG := ref_key
ETHEREUM_TARGET_VERSION := v1.10.14-0.20260227035937-a805e930447c
TENDERMINT_TARGET_VERSION := v0.3.3


Expand Down
2 changes: 1 addition & 1 deletion bindings/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.0

replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.3

require github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
require github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c

require (
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions bindings/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
Expand Down
2 changes: 1 addition & 1 deletion contracts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.

require (
github.com/iden3/go-iden3-crypto v0.0.16
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the go-ethereum commit exists and check for breaking changes

echo "Checking if commit a805e930447c exists in morph-l2/go-ethereum..."
gh api repos/morph-l2/go-ethereum/commits/a805e930447c --jq '.sha, .commit.message' 2>&1 || echo "Commit check failed or not found"

echo -e "\n--- Checking commit details ---"
gh api repos/morph-l2/go-ethereum/commits/a805e930447c --jq '.commit.author.date, .commit.message' 2>&1 || echo "Unable to retrieve commit details"

Repository: morph-l2/morph

Length of output: 509


🌐 Web query:

morph-l2/go-ethereum commit a805e930447c breaking changes

💡 Result:

Commit a805e930447c (“fix sth”) in morph-l2/go-ethereum introduces these potentially breaking changes (mainly for downstream code and persisted-data assumptions):

  • Receipt RLP schema change (Morph-specific fields): In storedReceiptRLP (used for receipt storage/encoding), Version, Reference, and Memo were changed to rlp:"optional", and Reference’s type changed from *common.Reference to []byte to avoid decode issues when empty. Any code depending on the old field types / always-present fields (or decoding receipts with the old exact struct layout) may break. [1]
  • Reorg behavior change (index cleanup): During chain reorgs, the code now additionally deletes reference index entries for “truly deleted” MorphTx transactions by iterating the old chain to get block context (timestamp, tx index). If tooling relied on the previous (leakier) index behavior, results can change. [1]
  • MorphTx.copy() semantics for FeeLimit: The copy logic no longer pre-allocates FeeLimit; instead it allocates it only when non-nil (cpy.FeeLimit = new(big.Int).Set(tx.FeeLimit)). Code that assumed FeeLimit is always non-nil after copying may break. [1]

Sources: [1]


🌐 Web query:

go-ethereum v1.10.14 breaking changes migration

💡 Result:

go-ethereum (geth) v1.10.14: breaking changes / migration notes

  1. “Fast sync” is removed
  • Impact: nodes/configs using --syncmode fast will fail to start or must be changed.
  • Migration: switch to snap sync (default in the 1.10.x line) or full sync (e.g., --syncmode=snap or --syncmode=full). [2]
  • This removal is also called out by downstream operators as a startup-breaking config change. [3]
  1. Go library / internal API moves that can break builds
    If you embed geth as a library or compile tools against its packages, v1.10.14 includes package/layout changes:
  • Built-in EVM trace loggers moved from core/vm to a dedicated package (update imports/usages accordingly). [1]
  • EIP-712 typed-data structs moved from signer/core to signer/core/apitypes (update imports). [1]
  1. Opcode name changes (source-compat implications for tooling)
  • Internal opcode names were modernized (e.g., SHA3 → KECCAK256, SUICIDE → SELFDESTRUCT). If your tooling matches on these names (debuggers/tracers/log parsers), update expectations. [1]

Primary reference: the v1.10.14 release notes (“Hourglass Nebula”). [1]


Update contracts module for go-ethereum breaking changes in commit a805e930447c.

This Morph-specific commit introduces several breaking changes that will require code updates:

  • Receipt RLP schema: Reference field type changed from *common.Reference to []byte, and Version, Reference, Memo are now optional. Update any receipt encoding/decoding or storage logic.
  • Chain reorg behavior: Reference index cleanup now deletes index entries for reorg'd transactions. Update reorg handlers if they depend on index state.
  • MorphTx.copy() semantics: FeeLimit is no longer pre-allocated during copy. Update code that assumes FeeLimit is always non-nil after copying.
  • go-ethereum v1.10.14 changes: Fast sync is removed (migrate to snap sync), EVM trace loggers and EIP-712 types have moved packages (update imports), opcode names changed (SHA3 → KECCAK256, SUICIDE → SELFDESTRUCT).

Review and update the contracts module to handle these changes before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@contracts/go.mod` at line 9, Update the contracts module to account for
go-ethereum commit a805e930447c breaking changes: change any receipt
encoding/decoding or storage logic that expects Receipt.Reference as
*common.Reference to handle []byte and treat Version, Reference, Memo as
optional (nil/empty) when serializing/deserializing; update reorg handlers (any
functions named like handleReorg, processReorg, or index cleanup routines) to
assume reference index entries may be deleted for reorged transactions and avoid
relying on stale indexes; modify code using MorphTx.copy() (and any callers that
access MorphTx.FeeLimit) to handle FeeLimit possibly being nil after copy (add
nil checks or initialize FeeLimit where needed); update imports/usages of EVM
trace loggers and EIP-712 types to their new packages and rename opcode
constants (replace SHA3→KECCAK256, SUICIDE→SELFDESTRUCT) wherever referenced.
Ensure all changes touch the symbols Receipt, Reference, MorphTx.copy /
MorphTx.FeeLimit, and reorg/index handler functions.

github.com/stretchr/testify v1.10.0
)

Expand Down
4 changes: 2 additions & 2 deletions contracts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
Expand Down
2 changes: 1 addition & 1 deletion go-ethereum
Submodule go-ethereum updated 54 files
+5 −2 accounts/abi/bind/backends/simulated.go
+63 −6 accounts/abi/bind/base.go
+8 −1 accounts/external/backend.go
+18 −6 cmd/evm/internal/t8ntool/execution.go
+4 −4 cmd/geth/chaincmd.go
+3 −3 cmd/geth/config.go
+1 −1 cmd/geth/main.go
+3 −3 cmd/utils/flags.go
+182 −2 common/types.go
+14 −2 core/block_validator.go
+24 −20 core/block_validator_test.go
+120 −5 core/blockchain.go
+474 −0 core/blockchain_test.go
+3 −3 core/genesis.go
+32 −32 core/mpt_fork_test.go
+3 −0 core/rawdb/accessors_chain.go
+128 −0 core/rawdb/accessors_reference_index.go
+337 −0 core/rawdb/reference_index_iterator.go
+27 −0 core/rawdb/schema.go
+7 −1 core/state_processor.go
+3 −0 core/state_transition.go
+2 −2 core/tx_list.go
+48 −6 core/tx_pool.go
+571 −0 core/tx_pool_test.go
+0 −149 core/types/alt_fee_tx.go
+62 −46 core/types/gen_receipt_json.go
+25 −10 core/types/l2trace.go
+368 −0 core/types/morph_tx.go
+395 −0 core/types/morph_tx_compat_test.go
+97 −8 core/types/receipt.go
+739 −10 core/types/receipt_test.go
+151 −34 core/types/transaction.go
+20 −6 core/types/transaction_marshalling.go
+1 −1 core/types/transaction_signing.go
+749 −12 core/types/transaction_test.go
+2 −2 eth/backend.go
+1 −1 eth/catalyst/l2_api.go
+2 −2 eth/ethconfig/config.go
+19 −0 ethclient/ethclient.go
+3 −3 graphql/graphql.go
+5 −1 interfaces.go
+98 −12 internal/ethapi/api.go
+5 −0 internal/ethapi/backend.go
+143 −16 internal/ethapi/transaction_args.go
+2 −2 les/client.go
+41 −2 les/odr_test.go
+21 −1 light/odr_test.go
+2 −2 light/txpool.go
+16 −15 params/config.go
+13 −4 rollup/fees/rollup_fee.go
+5 −2 rollup/tracing/tracing.go
+15 −0 rpc/types.go
+21 −3 signer/core/apitypes/types.go
+11 −5 tests/state_test_util.go
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,7 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P
github.com/morph-l2/go-ethereum v1.10.14-0.20251125061742-69718a9dcab9/go.mod h1:tiFPeidxjoCmLj18ne9H3KQdIGTCvRC30qlef06Fd9M=
github.com/morph-l2/go-ethereum v1.10.14-0.20260206063816-522b70a5f16f h1:e8gfduHc4AKlR0fD6J3HXveP2Gp4PMvN2UfA9CYEvEc=
github.com/morph-l2/go-ethereum v1.10.14-0.20260206063816-522b70a5f16f/go.mod h1:tiFPeidxjoCmLj18ne9H3KQdIGTCvRC30qlef06Fd9M=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae h1:VeRdUYdCw49yizlSbMEn2SZ+gT+3IUKx8BqxyQdz+BY=
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
Expand Down
36 changes: 18 additions & 18 deletions node/core/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ func (e *Executor) CalculateCapWithProposalBlock(currentBlockBytes []byte, curre
return false, err
}

// MPT fork: force batch points on the 1st and 2nd post-fork blocks, so the 1st post-fork block
// Jade fork: force batch points on the 1st and 2nd post-fork blocks, so the 1st post-fork block
// becomes a single-block batch: [H1, H2).
force, err := e.forceBatchPointForMPTFork(height, block.Timestamp, block.StateRoot, block.Hash)
force, err := e.forceBatchPointForJadeFork(height, block.Timestamp, block.StateRoot, block.Hash)
if err != nil {
return false, err
}
if force {
e.logger.Info("MPT fork: force batch point", "height", height, "timestamp", block.Timestamp)
e.logger.Info("Jade fork: force batch point", "height", height, "timestamp", block.Timestamp)
return true, nil
}

Expand All @@ -198,27 +198,27 @@ func (e *Executor) CalculateCapWithProposalBlock(currentBlockBytes []byte, curre
return exceeded, err
}

// forceBatchPointForMPTFork forces batch points at the 1st and 2nd block after the MPT fork time.
// forceBatchPointForJadeFork forces batch points at the 1st and 2nd block after the Jade fork time.
//
// Design goals:
// - Minimal change: only affects batch-point decision logic.
// - Stability: CalculateCapWithProposalBlock can be called multiple times at the same height; return must be consistent.
// - Performance: after handling (or skipping beyond) the fork boundary, no more HeaderByNumber calls are made.
func (e *Executor) forceBatchPointForMPTFork(height uint64, blockTime uint64, stateRoot common.Hash, blockHash common.Hash) (bool, error) {
func (e *Executor) forceBatchPointForJadeFork(height uint64, blockTime uint64, stateRoot common.Hash, blockHash common.Hash) (bool, error) {
// If we already decided to force at this height, keep returning true without extra RPCs.
if e.mptForkForceHeight == height && height != 0 {
if e.jadeForkForceHeight == height && height != 0 {
return true, nil
}
// If fork boundary is already handled and this isn't a forced height, fast exit.
if e.mptForkStage >= 2 {
if e.jadeForkStage >= 2 {
return false, nil
}

// Ensure we have fork time cached (0 means disabled).
if e.mptForkTime == 0 {
e.mptForkTime = e.l2Client.MPTForkTime()
if e.jadeForkTime == 0 {
e.jadeForkTime = e.l2Client.JadeForkTime()
}
forkTime := e.mptForkTime
forkTime := e.jadeForkTime
if forkTime == 0 || blockTime < forkTime {
return false, nil
}
Expand All @@ -234,24 +234,24 @@ func (e *Executor) forceBatchPointForMPTFork(height uint64, blockTime uint64, st
if parent.Time < forkTime {
// Log H1 (the 1st post-fork block) state root
// This stateRoot is intended to be used as the Rollup contract "genesis state root"
// when we reset/re-initialize the genesis state root during the MPT upgrade.
// when we reset/re-initialize the genesis state root during the Jade upgrade.
e.logger.Info(
"MPT_FORK_H1_GENESIS_STATE_ROOT",
"JADE_FORK_H1_GENESIS_STATE_ROOT",
"height", height,
"timestamp", blockTime,
"forkTime", forkTime,
"stateRoot", stateRoot.Hex(),
"blockHash", blockHash.Hex(),
)
e.mptForkStage = 1
e.mptForkForceHeight = height
e.jadeForkStage = 1
e.jadeForkForceHeight = height
return true, nil
}

// If parent is already post-fork, we may be at the 2nd post-fork block (H2) or later.
if height < 2 {
// We cannot be H2; mark done to avoid future calls.
e.mptForkStage = 2
e.jadeForkStage = 2
return false, nil
}

Expand All @@ -261,13 +261,13 @@ func (e *Executor) forceBatchPointForMPTFork(height uint64, blockTime uint64, st
}
if grandParent.Time < forkTime {
// This is H2 (2nd post-fork block).
e.mptForkStage = 2
e.mptForkForceHeight = height
e.jadeForkStage = 2
e.jadeForkForceHeight = height
return true, nil
}

// Beyond H2: nothing to do (can't retroactively fix). Mark done for performance.
e.mptForkStage = 2
e.jadeForkStage = 2
return false, nil
}

Expand Down
10 changes: 5 additions & 5 deletions node/core/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ type Executor struct {
rollupABI *abi.ABI
batchingCache *BatchingCache

// MPT fork handling: force batch points at the 1st and 2nd block after fork.
// Jade fork handling: force batch points at the 1st and 2nd block after fork.
// This state machine exists to avoid repeated HeaderByNumber calls after the fork is handled,
// while keeping results stable if CalculateCapWithProposalBlock is called multiple times at the same height.
mptForkTime uint64 // cached from geth eth_config.morph.mptForkTime (0 means disabled/unknown)
mptForkStage uint8 // 0: not handled, 1: forced H1, 2: done (forced H2 or skipped beyond H2)
mptForkForceHeight uint64 // if equals current height, must return true (stability across multiple calls)
jadeForkTime uint64 // cached from geth eth_config.morph.jadeForkTime (0 means disabled/unknown)
jadeForkStage uint8 // 0: not handled, 1: forced H1, 2: done (forced H2 or skipped beyond H2)
jadeForkForceHeight uint64 // if equals current height, must return true (stability across multiple calls)

logger tmlog.Logger
metrics *Metrics
Expand Down Expand Up @@ -155,7 +155,7 @@ func NewExecutor(newSyncFunc NewSyncerFunc, config *Config, tmPubKey crypto.PubK
batchingCache: NewBatchingCache(),
UpgradeBatchTime: config.UpgradeBatchTime,
blsKeyCheckForkHeight: config.BlsKeyCheckForkHeight,
mptForkTime: l2Client.MPTForkTime(),
jadeForkTime: l2Client.JadeForkTime(),
logger: logger,
metrics: PrometheusMetrics("morphnode"),
}
Expand Down
2 changes: 1 addition & 1 deletion node/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/hashicorp/golang-lru v1.0.2
github.com/holiman/uint256 v1.2.4
github.com/klauspost/compress v1.17.9
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
github.com/prometheus/client_golang v1.17.0
github.com/spf13/viper v1.13.0
github.com/stretchr/testify v1.10.0
Expand Down
4 changes: 2 additions & 2 deletions node/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.3.3 h1:zsmzVJfKp+NuCr45ZUUY2ZJjnHAVLzwJLID6GxBR4i4=
github.com/morph-l2/tendermint v0.3.3/go.mod h1:TtCzp9l6Z6yDUiwv3TbqKqw8Q8RKp3fSz5+adO1/Y8w=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
4 changes: 2 additions & 2 deletions node/types/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ func DecodeTxsFromBytes(txsBytes []byte) (eth.Transactions, error) {
return nil, err
}
innerTx = new(eth.SetCodeTx)
case eth.AltFeeTxType:
case eth.MorphTxType:
if err := binary.Read(reader, binary.BigEndian, &firstByte); err != nil {
return nil, err
}
innerTx = new(eth.AltFeeTx)
innerTx = new(eth.MorphTx)
Comment on lines +156 to +160
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Searching for MorphTxType definition ==="
rg -n "MorphTxType" --type go | head -20

echo ""
echo "=== Searching for MorphTx struct definition ==="
rg -n "type MorphTx struct" --type go

echo ""
echo "=== Checking the blob.go file context ==="
sed -n '150,165p' node/types/blob.go

echo ""
echo "=== Searching for any remaining AltFeeTx references ==="
rg -n "AltFeeTx" --type go

echo ""
echo "=== Searching for MorphTx usage in blob.go ==="
rg -n "MorphTx" node/types/blob.go

Repository: morph-l2/morph

Length of output: 954


🏁 Script executed:

#!/bin/bash

echo "=== Checking imports in blob.go ==="
head -30 node/types/blob.go

echo ""
echo "=== Checking if go.mod exists and contains go-ethereum dependency ==="
if [ -f go.mod ]; then
  echo "Found go.mod:"
  rg "morph-l2/go-ethereum|ethereum" go.mod
fi

echo ""
echo "=== Searching for eth alias definitions ==="
rg -B5 "case eth\." node/types/blob.go | head -20

Repository: morph-l2/morph

Length of output: 1559


🏁 Script executed:

#!/bin/bash

echo "=== Finding and examining go.mod ==="
find . -name "go.mod" -type f | head -5

echo ""
echo "=== Checking go.mod content for go-ethereum ==="
if [ -f ./go.mod ]; then
  rg "go-ethereum" ./go.mod -A 1
fi

echo ""
echo "=== Verifying other transaction types exist (AccessListTx, DynamicFeeTx, SetCodeTx) ==="
rg "AccessListTxType|DynamicFeeTxType|SetCodeTxType" node/types/blob.go

Repository: morph-l2/morph

Length of output: 569


🏁 Script executed:

#!/bin/bash

echo "=== Examining node/go.mod for go-ethereum dependency ==="
cat node/go.mod | grep -A 2 "go-ethereum"

echo ""
echo "=== Looking for any morph-l2/go-ethereum references in node/go.mod ==="
rg "morph-l2/go-ethereum" node/go.mod

echo ""
echo "=== Checking if MorphTxType is referenced elsewhere in the codebase ==="
rg -n "MorphTxType|MorphTx" --type go | grep -v "Binary"

echo ""
echo "=== Checking git info to understand the dependency version ==="
if [ -f node/go.mod ]; then
  tail -50 node/go.mod | head -30
fi

Repository: morph-l2/morph

Length of output: 2473


🌐 Web query:

morph-l2/go-ethereum MorphTxType MorphTx core/types

💡 Result:

In morph-l2/go-ethereum there isn’t a MorphTxType / MorphTx in core/types.

Morph-specific transaction types are defined in core/types/transaction.go as: L1MessageTxType = 0x7E and AltFeeTxType = 0x7F (alongside the standard geth tx types). The typed-tx decoder (decodeTyped) instantiates L1MessageTx or AltFeeTx for these type bytes. [1]

Implementations live in:

  • core/types/l1_message_tx.go: type L1MessageTx struct { ... } with txType() byte { return L1MessageTxType }. [2]
  • core/types/alt_fee_tx.go: type AltFeeTx struct { ... } with txType() byte { return AltFeeTxType }. [3]

If you saw MorphTxType in older discussions/patches, it’s likely an older/renamed name for one of these custom typed transactions (most commonly AltFeeTx). [1][3]

Sources: [1] [2] [3]


MorphTxType and MorphTx do not exist in the go-ethereum dependency and will cause a compilation error.

The morph-l2/go-ethereum library (v1.10.14-0.20260227040115-e6c501a8d680) defines custom transaction types as AltFeeTxType (0x7F) with corresponding AltFeeTx struct in core/types/alt_fee_tx.go, not MorphTxType/MorphTx. Either update the go-ethereum dependency to include these new types, or revert to the original AltFeeTxType/AltFeeTx references.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@node/types/blob.go` around lines 156 - 160, The code references non-existent
symbols MorphTxType and MorphTx (seen where you read firstByte and set innerTx =
new(eth.MorphTx)), which will fail to compile; replace these with the correct
go-ethereum custom tx symbols AltFeeTxType and AltFeeTx (or update the
go-ethereum dependency if you intend to use Morph types), and ensure the switch
case uses eth.AltFeeTxType and innerTx = new(eth.AltFeeTx) so binary.Read and
subsequent handling use the proper types.

default:
if firstByte <= 0xf7 { // legacy tx first byte must be greater than 0xf7(247)
return nil, fmt.Errorf("not supported tx type: %d", firstByte)
Expand Down
30 changes: 15 additions & 15 deletions node/types/retryable_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ type forkConfig struct {

// morphExtension contains Morph-specific configuration fields
type morphExtension struct {
UseZktrie bool `json:"useZktrie"`
MPTForkTime *uint64 `json:"mptForkTime,omitempty"`
UseZktrie bool `json:"useZktrie"`
JadeForkTime *uint64 `json:"jadeForkTime,omitempty"`
}

// GethConfig holds the configuration fetched from geth via eth_config API
Expand Down Expand Up @@ -105,28 +105,28 @@ func FetchGethConfig(rpcURL string, logger tmlog.Logger) (*GethConfig, error) {
logger.Info("Fetched useZktrie from geth", "useZktrie", config.UseZktrie)
}

// Try to get mptForkTime from current config
if resp.Current != nil && resp.Current.Morph != nil && resp.Current.Morph.MPTForkTime != nil {
config.SwitchTime = *resp.Current.Morph.MPTForkTime
logger.Info("Fetched MPT fork time from geth", "mptForkTime", config.SwitchTime, "source", "current")
// Try to get jadeForkTime from current config
if resp.Current != nil && resp.Current.Morph != nil && resp.Current.Morph.JadeForkTime != nil {
config.SwitchTime = *resp.Current.Morph.JadeForkTime
logger.Info("Fetched Jade fork time from geth", "jadeForkTime", config.SwitchTime, "source", "current")
return config, nil
}

// Fallback to next config
if resp.Next != nil && resp.Next.Morph != nil && resp.Next.Morph.MPTForkTime != nil {
config.SwitchTime = *resp.Next.Morph.MPTForkTime
logger.Info("Fetched MPT fork time from geth", "mptForkTime", config.SwitchTime, "source", "next")
if resp.Next != nil && resp.Next.Morph != nil && resp.Next.Morph.JadeForkTime != nil {
config.SwitchTime = *resp.Next.Morph.JadeForkTime
logger.Info("Fetched Jade fork time from geth", "jadeForkTime", config.SwitchTime, "source", "next")
return config, nil
}

// Fallback to last config
if resp.Last != nil && resp.Last.Morph != nil && resp.Last.Morph.MPTForkTime != nil {
config.SwitchTime = *resp.Last.Morph.MPTForkTime
logger.Info("Fetched MPT fork time from geth", "mptForkTime", config.SwitchTime, "source", "last")
if resp.Last != nil && resp.Last.Morph != nil && resp.Last.Morph.JadeForkTime != nil {
config.SwitchTime = *resp.Last.Morph.JadeForkTime
logger.Info("Fetched Jade fork time from geth", "jadeForkTime", config.SwitchTime, "source", "last")
return config, nil
}

logger.Info("MPT fork time not configured in geth, switch disabled")
logger.Info("Jade fork time not configured in geth, switch disabled")
return config, nil
}

Expand All @@ -141,9 +141,9 @@ type RetryableClient struct {
logger tmlog.Logger
}

// MPTForkTime returns the configured MPT fork/switch timestamp fetched from geth (eth_config).
// JadeForkTime returns the configured Jade fork/switch timestamp fetched from geth (eth_config).
// Note: this is a local value stored in the client; it does not perform any RPC.
func (rc *RetryableClient) MPTForkTime() uint64 {
func (rc *RetryableClient) JadeForkTime() uint64 {
return rc.switchTime
}

Expand Down
2 changes: 1 addition & 1 deletion ops/l2-genesis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.

require (
github.com/holiman/uint256 v1.2.4
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
github.com/stretchr/testify v1.10.0
github.com/urfave/cli v1.22.17
)
Expand Down
4 changes: 2 additions & 2 deletions ops/l2-genesis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
Expand Down
2 changes: 1 addition & 1 deletion ops/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24.0
replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.3

require (
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
github.com/tendermint/tendermint v0.35.9
)

Expand Down
4 changes: 2 additions & 2 deletions ops/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.3.3 h1:zsmzVJfKp+NuCr45ZUUY2ZJjnHAVLzwJLID6GxBR4i4=
github.com/morph-l2/tendermint v0.3.3/go.mod h1:TtCzp9l6Z6yDUiwv3TbqKqw8Q8RKp3fSz5+adO1/Y8w=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
2 changes: 1 addition & 1 deletion oracle/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.
require (
github.com/go-kit/kit v0.12.0
github.com/morph-l2/externalsign v0.3.1
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
github.com/prometheus/client_golang v1.17.0
github.com/stretchr/testify v1.10.0
github.com/tendermint/tendermint v0.35.9
Expand Down
4 changes: 2 additions & 2 deletions oracle/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/externalsign v0.3.1 h1:UYFDZFB0L85A4rDvuwLNBiGEi0kSmg9AZ2v8Q5O4dQo=
github.com/morph-l2/externalsign v0.3.1/go.mod h1:b6NJ4GUiiG/gcSJsp3p8ExsIs4ZdphlrVALASnVoGJE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141 h1:A8eygErKU6WKMipGWIemzwLeYkIGLd9yb/Ry3x+J9PQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c h1:gwZ9wzdiQAfnFfYD/FM6AzXIp4AxuoddFBg+aONHRcQ=
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.3.3 h1:zsmzVJfKp+NuCr45ZUUY2ZJjnHAVLzwJLID6GxBR4i4=
github.com/morph-l2/tendermint v0.3.3/go.mod h1:TtCzp9l6Z6yDUiwv3TbqKqw8Q8RKp3fSz5+adO1/Y8w=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
2 changes: 1 addition & 1 deletion token-price-oracle/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ replace (

require (
github.com/morph-l2/externalsign v0.3.1
github.com/morph-l2/go-ethereum v1.10.14-0.20260211074551-4f0f6e6bd141
github.com/morph-l2/go-ethereum v1.10.14-0.20260227035937-a805e930447c
github.com/prometheus/client_golang v1.17.0
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli v1.22.17
Expand Down
Loading
Loading