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 := 4012f174b967153a31926f370d77af389b2968c8
ETHEREUM_TARGET_VERSION := v1.10.14-0.20260908092055-4012f174b967
ETHEREUM_SUBMODULE_COMMIT_OR_TAG := 2548caac16b2d5a2021a6eba0aa23d7506230439
ETHEREUM_TARGET_VERSION := v1.10.14-0.20260916065048-2548caac16b2
TENDERMINT_TARGET_VERSION := v0.3.10-0.20260916055518-560fb469b16d


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.10-0.20260916055518-560fb469b16d

require github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967
require github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2

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 @@ -109,8 +109,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.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/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
9 changes: 6 additions & 3 deletions common/batch/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,12 @@ func decodeTypedTx(typeByte byte, reader io.Reader) (*eth.Transaction, error) {
}

// decodeMorphTx decodes a MorphTx from the reader. The type byte (0x7f) has already
// been consumed. MorphTx has two wire formats:
// - V0: type(0x7f) || RLP(fields) — next byte is RLP prefix (>= 0xC0)
// - V1: type(0x7f) || version(0x01) || RLP(fields) — next byte is version, then RLP prefix
// been consumed. MorphTx has two envelope forms:
// - V0: type(0x7f) || RLP(fields) — next byte is RLP prefix (>= 0xC0)
// - V1+: type(0x7f) || version(0x01, 0x02, ...) || RLP(fields)
//
// The batch layer preserves the version byte and delegates version-specific
// field decoding to core/types.Transaction.
func decodeMorphTx(reader io.Reader) (*eth.Transaction, error) {
var nextByte byte
if err := binary.Read(reader, binary.BigEndian, &nextByte); err != nil {
Expand Down
57 changes: 57 additions & 0 deletions common/batch/blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ package batch

import (
"bytes"
"math/big"
"testing"

"github.com/holiman/uint256"
"github.com/morph-l2/go-ethereum/common"
eth "github.com/morph-l2/go-ethereum/core/types"
"github.com/stretchr/testify/require"
)

Expand All @@ -23,3 +27,56 @@ func TestExtractInnerTxFullBytesAcceptsAvailablePayload(t *testing.T) {
require.NoError(t, err)
require.Equal(t, []byte{0xf8, 3, 1, 2, 3}, got)
}

func TestMorphTxV2BatchRoundTrip(t *testing.T) {
to := common.HexToAddress("0x1234")
tests := []struct {
name string
authList []eth.SetCodeAuthorization
}{
{name: "empty authorization list", authList: []eth.SetCodeAuthorization{}},
{
name: "non-empty authorization list",
authList: []eth.SetCodeAuthorization{{
ChainID: *uint256.NewInt(53077),
Address: common.HexToAddress("0x5678"),
Nonce: 7,
V: 1,
R: *uint256.NewInt(2),
S: *uint256.NewInt(3),
}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tx := eth.NewTx(&eth.MorphTx{
ChainID: big.NewInt(53077),
Nonce: 1,
GasTipCap: big.NewInt(1),
GasFeeCap: big.NewInt(2),
Gas: 100000,
To: &to,
Value: new(big.Int),
FeeTokenID: 1,
FeeLimit: big.NewInt(1000),
Version: eth.MorphTxVersion2,
AuthList: tt.authList,
V: new(big.Int),
R: new(big.Int).Lsh(big.NewInt(1), 255),
S: new(big.Int).Lsh(big.NewInt(1), 254),
})
encoded, err := tx.MarshalBinary()
require.NoError(t, err)
require.Equal(t, []byte{eth.MorphTxType, eth.MorphTxVersion2}, encoded[:2])

decoded, err := DecodeTxsFromBytes(encoded)
require.NoError(t, err)
require.Len(t, decoded, 1)
require.Equal(t, tx.Hash(), decoded[0].Hash())
reencoded, err := decoded[0].MarshalBinary()
require.NoError(t, err)
require.Equal(t, encoded, reencoded)
require.Equal(t, len(tt.authList), len(decoded[0].AsMorphTx().AuthList))
})
}
}
2 changes: 1 addition & 1 deletion common/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.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
github.com/morph-l2/morph-da-codec/bindings/codec v0.0.0-20260727095527-681727561e38
github.com/stretchr/testify v1.10.0
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a
Expand Down
4 changes: 2 additions & 2 deletions common/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,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.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/morph-da-codec/bindings/codec v0.0.0-20260727095527-681727561e38 h1:2OIgRP51TPMlpw9E82toxu/SQzN1hlYcxpJKC9jB0cs=
github.com/morph-l2/morph-da-codec/bindings/codec v0.0.0-20260727095527-681727561e38/go.mod h1:f6+BHrrHbRmEYplC1nmNjGdatQtMSa2CIK7CX8T1Nfc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
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.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
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 @@ -136,8 +136,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.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/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: 2 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P
github.com/morph-l2/go-ethereum v0.0.0-20260529141627-eb5fbf8f9748 h1:xxYv3ZbhCsdtgwC81wU3eRm0xNrc2oTx7PGYLPY92xU=
github.com/morph-l2/go-ethereum v0.0.0-20260529141627-eb5fbf8f9748/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
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.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.0.0-20260529095305-b1b3a3a1d806 h1:gJmofzJ0PnCCObETUH02AsSVS1YY4tLpUWYFhEggCmk=
github.com/morph-l2/tendermint v0.0.0-20260529095305-b1b3a3a1d806/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs=
github.com/morph-l2/tendermint v0.3.4/go.mod h1:TtCzp9l6Z6yDUiwv3TbqKqw8Q8RKp3fSz5+adO1/Y8w=
Expand Down
59 changes: 59 additions & 0 deletions node/derivation/batch_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"math/big"
"testing"

"github.com/holiman/uint256"
"github.com/morph-l2/go-ethereum/common"
eth "github.com/morph-l2/go-ethereum/core/types"
"github.com/morph-l2/go-ethereum/crypto/kzg4844"
Expand Down Expand Up @@ -48,6 +49,64 @@ func buildV1ParentHeader(parentIndex, nextStartBlock uint64) []byte {
}.Bytes()
}

func TestParseBatchPreservesMorphTxV2(t *testing.T) {
const startBlock = uint64(1000)
to := common.HexToAddress("0x1234")
tx := eth.NewTx(&eth.MorphTx{
ChainID: big.NewInt(53077),
Nonce: 1,
GasTipCap: big.NewInt(1),
GasFeeCap: big.NewInt(2),
Gas: 100000,
To: &to,
Value: new(big.Int),
FeeTokenID: 1,
FeeLimit: big.NewInt(1000),
Version: eth.MorphTxVersion2,
AuthList: []eth.SetCodeAuthorization{{
ChainID: *uint256.NewInt(53077),
Address: common.HexToAddress("0x5678"),
Nonce: 7,
V: 1,
R: *uint256.NewInt(2),
S: *uint256.NewInt(3),
}},
V: new(big.Int),
R: new(big.Int).Lsh(big.NewInt(1), 255),
S: new(big.Int).Lsh(big.NewInt(1), 254),
})
txBytes, err := tx.MarshalBinary()
require.NoError(t, err)
blockContext := (&types.WrappedBlock{
Number: startBlock,
Timestamp: 1_700_000_000,
BaseFee: big.NewInt(1_000_000_000),
GasLimit: 30_000_000,
}).BlockContextBytes(1, 0)
payload := append(blockContext, txBytes...)
compressed, err := zstd.CompressBatchBytes(payload)
require.NoError(t, err)
blobs := splitCompressedIntoBlobs(t, compressed)

batch := geth.RPCRollupBatch{
Version: 2,
ParentBatchHeader: buildV1ParentHeader(99, startBlock),
LastBlockNumber: startBlock,
Sidecar: eth.BlobTxSidecar{Blobs: blobs},
}
var bi BatchInfo
require.NoError(t, bi.ParseBatch(batch))
require.Len(t, bi.blockContexts, 1)
require.Len(t, bi.blockContexts[0].SafeL2Data.Transactions, 1)
require.Equal(t, txBytes, bi.blockContexts[0].SafeL2Data.Transactions[0])

var decoded eth.Transaction
require.NoError(t, decoded.UnmarshalBinary(bi.blockContexts[0].SafeL2Data.Transactions[0]))
require.Equal(t, uint8(eth.MorphTxType), decoded.Type())
require.Equal(t, eth.MorphTxVersion2, decoded.Version())
require.Len(t, decoded.SetCodeAuthorizations(), 1)
}

// splitCompressedIntoBlobs mirrors the tx-submitter strategy of compressing
// the entire payload as a single zstd stream and then slicing the compressed
// bytes into MaxBlobBytesSize chunks, each packed into a canonical blob.
Expand Down
4 changes: 2 additions & 2 deletions node/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ require (
github.com/hashicorp/golang-lru v1.0.2
github.com/hashicorp/raft v1.7.3
github.com/hashicorp/raft-boltdb/v2 v2.3.1
github.com/holiman/uint256 v1.2.4
github.com/mdlayher/vsock v1.2.1
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/spf13/viper v1.13.0
Expand Down Expand Up @@ -73,7 +74,6 @@ require (
github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/iden3/go-iden3-crypto v0.0.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions node/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.3.10-0.20260916055518-560fb469b16d h1:7vfVAK5eeHgdLxXG/1hMJLvgvE5QiYIfRA2nNYj6jPU=
github.com/morph-l2/tendermint v0.3.10-0.20260916055518-560fb469b16d/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
1 change: 1 addition & 0 deletions ops/l2-genesis/deploy-config/devnet-deploy-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"morph203Time": 0,
"viridianTime": 0,
"emeraldTime": 0,
"morphTxV2Time": 0,
"l2StakingSequencerMaxSize": 4,
"l2StakingUnDelegatedLockEpochs": 2,
"l2StakingRewardStartTime": 1728000000,
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.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
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 @@ -139,8 +139,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.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/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
7 changes: 4 additions & 3 deletions ops/l2-genesis/morph-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ type DeployConfig struct {
FundDevAccounts bool `json:"fundDevAccounts"`

// Upgrade configs
Morph203Time *uint64 `json:"morph203Time,omitempty"`
ViridianTime *uint64 `json:"viridianTime,omitempty"`
EmeraldTime *uint64 `json:"emeraldTime,omitempty"`
Morph203Time *uint64 `json:"morph203Time,omitempty"`
ViridianTime *uint64 `json:"viridianTime,omitempty"`
EmeraldTime *uint64 `json:"emeraldTime,omitempty"`
MorphTxV2Time *uint64 `json:"morphTxV2Time,omitempty"`
}

// GetDeployedAddresses will get the deployed addresses of deployed L1 contracts
Expand Down
6 changes: 6 additions & 0 deletions ops/l2-genesis/morph-chain-ops/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
emeraldTime = config.EmeraldTime
}

var morphTxV2Time *uint64
if config.MorphTxV2Time != nil {
morphTxV2Time = config.MorphTxV2Time
}

morphChainConfig := params.ChainConfig{
ChainID: new(big.Int).SetUint64(config.L2ChainID),
HomesteadBlock: big.NewInt(0),
Expand All @@ -73,6 +78,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
Morph203Time: morph203Time,
ViridianTime: viridianTime,
EmeraldTime: emeraldTime,
MorphTxV2Time: morphTxV2Time,
TerminalTotalDifficulty: big.NewInt(0),
Morph: params.MorphConfig{
UseZktrie: false,
Expand Down
4 changes: 4 additions & 0 deletions ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
func Test_BuildL2DeveloperGenesis(t *testing.T) {
address1 := common.BigToAddress(common.Big1)
startTime := uint64((time.Now().Unix()/86400 + 1) * 86400)
morphTxV2Time := uint64(0)
config := &DeployConfig{
L1ChainID: 900,
L2ChainID: 53077,
Expand Down Expand Up @@ -69,11 +70,14 @@ func Test_BuildL2DeveloperGenesis(t *testing.T) {
//MorphTokenDailyInflationRate: 1,

FundDevAccounts: true,
MorphTxV2Time: &morphTxV2Time,
}
curHeader := &types.Header{}
curHeader.BaseFee = new(big.Int).SetUint64(1)
l2Genesis, _, err := BuildL2DeveloperGenesis(config, nil, curHeader)
require.NoError(t, err)
require.Equal(t, &morphTxV2Time, l2Genesis.Config.MorphTxV2Time)
require.True(t, l2Genesis.Config.IsMorphTxV2(l2Genesis.Timestamp))

l2GenesisBlock := l2Genesis.ToBlock(nil)
genesisBatchHeaderBytes, err := GenesisBatchHeader(l2GenesisBlock.Header())
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.10-0.20260916055518-560fb469b16d

require (
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
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 @@ -161,8 +161,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.20260908092055-4012f174b967 h1:lgAgQYT34XY/l7+auFRHdqt7HsnCcAMNBGxd5DKiiHw=
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2 h1:0+xVWkiRkZc5CX/gxKUuyAjBumopmzVdzv56krs6eoE=
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs=
github.com/morph-l2/tendermint v0.3.10-0.20260916055518-560fb469b16d h1:7vfVAK5eeHgdLxXG/1hMJLvgvE5QiYIfRA2nNYj6jPU=
github.com/morph-l2/tendermint v0.3.10-0.20260916055518-560fb469b16d/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs=
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 @@ -8,7 +8,7 @@ replace (
)

require (
github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967
github.com/morph-l2/go-ethereum v1.10.14-0.20260916065048-2548caac16b2
github.com/morph-l2/remote-signer-client/go v0.0.0-20260312080033-d078d86ddbe9
github.com/prometheus/client_golang v1.17.0
github.com/sirupsen/logrus v1.9.3
Expand Down
Loading
Loading