diff --git a/Makefile b/Makefile index baa590a39..3a0306c27 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/bindings/go.mod b/bindings/go.mod index e5751d4a4..e9dd2b9ca 100644 --- a/bindings/go.mod +++ b/bindings/go.mod @@ -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.20260918082206-5a0d0d7718aa require ( github.com/VictoriaMetrics/fastcache v1.12.2 // indirect diff --git a/bindings/go.sum b/bindings/go.sum index 4b0fb2573..c73a1ce68 100644 --- a/bindings/go.sum +++ b/bindings/go.sum @@ -109,8 +109,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/common/batch/blob.go b/common/batch/blob.go index 74d977341..0ab2ce1e4 100644 --- a/common/batch/blob.go +++ b/common/batch/blob.go @@ -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 { diff --git a/common/batch/blob_test.go b/common/batch/blob_test.go index 31ada97ed..d0333e612 100644 --- a/common/batch/blob_test.go +++ b/common/batch/blob_test.go @@ -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" ) @@ -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(ð.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)) + }) + } +} diff --git a/common/go.mod b/common/go.mod index ab44dd85f..94d781644 100644 --- a/common/go.mod +++ b/common/go.mod @@ -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.20260918082206-5a0d0d7718aa 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 diff --git a/common/go.sum b/common/go.sum index 4c0a02f8e..b06d08d25 100644 --- a/common/go.sum +++ b/common/go.sum @@ -148,8 +148,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/contracts/go.mod b/contracts/go.mod index 3d3da7cce..f9b5204ab 100644 --- a/contracts/go.mod +++ b/contracts/go.mod @@ -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.20260918082206-5a0d0d7718aa github.com/stretchr/testify v1.10.0 ) diff --git a/contracts/go.sum b/contracts/go.sum index 8a0917f3c..a807108d6 100644 --- a/contracts/go.sum +++ b/contracts/go.sum @@ -136,8 +136,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/go-ethereum b/go-ethereum index 4012f174b..5a0d0d771 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 4012f174b967153a31926f370d77af389b2968c8 +Subproject commit 5a0d0d7718aa4590fea31a51c45c0c91c6e93420 diff --git a/go.work.sum b/go.work.sum index feb69c4bf..22d274257 100644 --- a/go.work.sum +++ b/go.work.sum @@ -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= diff --git a/node/derivation/batch_info_test.go b/node/derivation/batch_info_test.go index 38e9eec82..e3d4904ed 100644 --- a/node/derivation/batch_info_test.go +++ b/node/derivation/batch_info_test.go @@ -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" @@ -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(ð.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. diff --git a/node/go.mod b/node/go.mod index c0e8107b4..8c9041f45 100644 --- a/node/go.mod +++ b/node/go.mod @@ -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.20260918082206-5a0d0d7718aa github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/spf13/viper v1.13.0 @@ -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 diff --git a/node/go.sum b/node/go.sum index a607b5d06..545c84760 100644 --- a/node/go.sum +++ b/node/go.sum @@ -414,8 +414,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/ops/l2-genesis/deploy-config/devnet-deploy-config.json b/ops/l2-genesis/deploy-config/devnet-deploy-config.json index 9a16a5369..e0b47f912 100644 --- a/ops/l2-genesis/deploy-config/devnet-deploy-config.json +++ b/ops/l2-genesis/deploy-config/devnet-deploy-config.json @@ -29,6 +29,7 @@ "morph203Time": 0, "viridianTime": 0, "emeraldTime": 0, + "celadonTime": 0, "l2StakingSequencerMaxSize": 4, "l2StakingUnDelegatedLockEpochs": 2, "l2StakingRewardStartTime": 1728000000, diff --git a/ops/l2-genesis/go.mod b/ops/l2-genesis/go.mod index 02a705444..b35fe6aa4 100644 --- a/ops/l2-genesis/go.mod +++ b/ops/l2-genesis/go.mod @@ -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.20260918082206-5a0d0d7718aa github.com/stretchr/testify v1.10.0 github.com/urfave/cli v1.22.17 ) diff --git a/ops/l2-genesis/go.sum b/ops/l2-genesis/go.sum index 6d3f57e8c..9590ea1c4 100644 --- a/ops/l2-genesis/go.sum +++ b/ops/l2-genesis/go.sum @@ -139,8 +139,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/ops/l2-genesis/morph-chain-ops/genesis/config.go b/ops/l2-genesis/morph-chain-ops/genesis/config.go index a87f38c04..7128ea243 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/config.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/config.go @@ -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"` + CeladonTime *uint64 `json:"celadonTime,omitempty"` } // GetDeployedAddresses will get the deployed addresses of deployed L1 contracts diff --git a/ops/l2-genesis/morph-chain-ops/genesis/genesis.go b/ops/l2-genesis/morph-chain-ops/genesis/genesis.go index 4a5cf3b42..2d904074e 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/genesis.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/genesis.go @@ -50,6 +50,11 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro emeraldTime = config.EmeraldTime } + var celadonTime *uint64 + if config.CeladonTime != nil { + celadonTime = config.CeladonTime + } + morphChainConfig := params.ChainConfig{ ChainID: new(big.Int).SetUint64(config.L2ChainID), HomesteadBlock: big.NewInt(0), @@ -73,6 +78,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro Morph203Time: morph203Time, ViridianTime: viridianTime, EmeraldTime: emeraldTime, + CeladonTime: celadonTime, TerminalTotalDifficulty: big.NewInt(0), Morph: params.MorphConfig{ UseZktrie: false, diff --git a/ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go b/ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go index 4c507f96c..1488f2825 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go @@ -14,6 +14,7 @@ import ( func Test_BuildL2DeveloperGenesis(t *testing.T) { address1 := common.BigToAddress(common.Big1) startTime := uint64((time.Now().Unix()/86400 + 1) * 86400) + celadonTime := uint64(0) config := &DeployConfig{ L1ChainID: 900, L2ChainID: 53077, @@ -69,11 +70,14 @@ func Test_BuildL2DeveloperGenesis(t *testing.T) { //MorphTokenDailyInflationRate: 1, FundDevAccounts: true, + CeladonTime: &celadonTime, } curHeader := &types.Header{} curHeader.BaseFee = new(big.Int).SetUint64(1) l2Genesis, _, err := BuildL2DeveloperGenesis(config, nil, curHeader) require.NoError(t, err) + require.Equal(t, &celadonTime, l2Genesis.Config.CeladonTime) + require.True(t, l2Genesis.Config.IsCeladon(l2Genesis.Timestamp)) l2GenesisBlock := l2Genesis.ToBlock(nil) genesisBatchHeaderBytes, err := GenesisBatchHeader(l2GenesisBlock.Header()) diff --git a/ops/tools/go.mod b/ops/tools/go.mod index bc36026e2..ba2923b2a 100644 --- a/ops/tools/go.mod +++ b/ops/tools/go.mod @@ -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.20260918082206-5a0d0d7718aa github.com/tendermint/tendermint v0.35.9 ) diff --git a/ops/tools/go.sum b/ops/tools/go.sum index 6bde6fe22..d0cc82640 100644 --- a/ops/tools/go.sum +++ b/ops/tools/go.sum @@ -161,8 +161,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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= diff --git a/token-price-oracle/go.mod b/token-price-oracle/go.mod index 66cf834a7..53f1090b1 100644 --- a/token-price-oracle/go.mod +++ b/token-price-oracle/go.mod @@ -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.20260918082206-5a0d0d7718aa 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 diff --git a/token-price-oracle/go.sum b/token-price-oracle/go.sum index e21579afc..80110df22 100644 --- a/token-price-oracle/go.sum +++ b/token-price-oracle/go.sum @@ -143,8 +143,10 @@ 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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= github.com/morph-l2/remote-signer-client/go v0.0.0-20260312080033-d078d86ddbe9 h1:d2nKLUgiEJsQmpSWEiGbsC+sZXQCM4y/3EzyXkoMM60= github.com/morph-l2/remote-signer-client/go v0.0.0-20260312080033-d078d86ddbe9/go.mod h1:slD6GmYEwLHn4Yj/kO8/1QF3iaYlVVAXg2ZnGr8SW/8= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= diff --git a/tx-submitter/go.mod b/tx-submitter/go.mod index 57fbe4d7b..d00c4c095 100644 --- a/tx-submitter/go.mod +++ b/tx-submitter/go.mod @@ -9,7 +9,7 @@ require ( github.com/crate-crypto/go-eth-kzg v1.4.0 github.com/holiman/uint256 v1.2.4 github.com/morph-l2/externalsign v0.3.1 - github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 + github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa github.com/prometheus/client_golang v1.17.0 github.com/stretchr/testify v1.10.0 github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a diff --git a/tx-submitter/go.sum b/tx-submitter/go.sum index f96d02b4b..918cb7542 100644 --- a/tx-submitter/go.sum +++ b/tx-submitter/go.sum @@ -161,8 +161,10 @@ 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.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/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa h1:u/iArDoGkMmMdWX+++JhadbYt05A4iQFZdXYvIRqX94= +github.com/morph-l2/go-ethereum v1.10.14-0.20260918082206-5a0d0d7718aa/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=