From 3ab2ec4ce8a4bdf19d2daee12b8256edf22ecc77 Mon Sep 17 00:00:00 2001 From: "allen.wu" Date: Thu, 10 Sep 2026 17:23:22 +0800 Subject: [PATCH 1/3] add sequencer init logic for qa deploy --- Makefile | 6 ++--- bindings/go.mod | 4 +-- bindings/go.sum | 4 +-- common/go.mod | 4 +-- common/go.sum | 4 +-- contracts/deploy/022-SequencerInit.ts | 34 ++++++++++++++++++++++++++ contracts/go.mod | 4 +-- contracts/go.sum | 4 +-- contracts/src/deploy-config/l1.ts | 2 +- contracts/src/deploy-config/qanetl1.ts | 5 ++++ go-ethereum | 2 +- node/go.mod | 4 +-- node/go.sum | 8 +++--- ops/l2-genesis/go.mod | 4 +-- ops/l2-genesis/go.sum | 4 +-- ops/tools/go.mod | 4 +-- ops/tools/go.sum | 8 +++--- token-price-oracle/go.mod | 2 +- token-price-oracle/go.sum | 4 +-- tx-submitter/go.mod | 4 +-- tx-submitter/go.sum | 4 +-- 21 files changed, 79 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index 47dd01abf..2504d27b7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ################## update dependencies #################### -ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.2.6 -ETHEREUM_TARGET_VERSION := morph-v2.2.6 -TENDERMINT_TARGET_VERSION := v0.3.9 +ETHEREUM_SUBMODULE_COMMIT_OR_TAG := 4012f174b967153a31926f370d77af389b2968c8 +ETHEREUM_TARGET_VERSION := v1.10.14-0.20260908092055-4012f174b967 +TENDERMINT_TARGET_VERSION := v0.3.10-0.20260902105027-c75ab47bb1aa ETHEREUM_MODULE_NAME := github.com/morph-l2/go-ethereum diff --git a/bindings/go.mod b/bindings/go.mod index 6dbb1a82a..a8208e668 100644 --- a/bindings/go.mod +++ b/bindings/go.mod @@ -2,9 +2,9 @@ module morph-l2/bindings go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa -require github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 +require github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 require ( github.com/VictoriaMetrics/fastcache v1.12.2 // indirect diff --git a/bindings/go.sum b/bindings/go.sum index 6352d3284..4b0fb2573 100644 --- a/bindings/go.sum +++ b/bindings/go.sum @@ -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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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/go.mod b/common/go.mod index 1b67b1876..6225262e8 100644 --- a/common/go.mod +++ b/common/go.mod @@ -2,11 +2,11 @@ module morph-l2/common go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( github.com/holiman/uint256 v1.2.4 - github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 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 0406a85c0..4c0a02f8e 100644 --- a/common/go.sum +++ b/common/go.sum @@ -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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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/deploy/022-SequencerInit.ts b/contracts/deploy/022-SequencerInit.ts index be82cd1e9..a5457fdb7 100644 --- a/contracts/deploy/022-SequencerInit.ts +++ b/contracts/deploy/022-SequencerInit.ts @@ -66,6 +66,40 @@ export const SequencerInit = async ( console.log('L1SequencerProxy upgrade success') } + + const L1Sequencer = new ethers.Contract( + L1SequencerProxyAddress, + L1SequencerFactory.interface, + deployer, + ) + + const firstSequencer: string = process.env.firstSequencerAddress || configTmp.firstSequencerAddress + if (!firstSequencer) { + // Networks that register the first sequencer out-of-band (devnet does it + // from ops/devnet-morph) leave this unset. + console.log('firstSequencerAddress not configured, skipping setFirstSequencer') + return '' + } + if (!ethers.utils.isAddress(firstSequencer)) { + return `invalid firstSequencerAddress: ${firstSequencer}` + } + + if ((await L1Sequencer.getSequencerHistoryLength()).gt(0)) { + console.log('First sequencer already set:', await L1Sequencer.getSequencer()) + return '' + } + + console.log('Setting first sequencer:', firstSequencer) + const tx = await L1Sequencer.setFirstSequencer(firstSequencer) + await tx.wait() + + await assertContractVariable( + L1Sequencer, + 'getSequencer', + firstSequencer, + ) + + console.log('setFirstSequencer success') return '' } diff --git a/contracts/go.mod b/contracts/go.mod index ee02e8ff0..6e26c3181 100644 --- a/contracts/go.mod +++ b/contracts/go.mod @@ -2,11 +2,11 @@ module morph-l2/contract go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( github.com/iden3/go-iden3-crypto v0.0.16 - github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 github.com/stretchr/testify v1.10.0 ) diff --git a/contracts/go.sum b/contracts/go.sum index 1c5f50533..8a0917f3c 100644 --- a/contracts/go.sum +++ b/contracts/go.sum @@ -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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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/contracts/src/deploy-config/l1.ts b/contracts/src/deploy-config/l1.ts index 6f09ba7eb..39d66bc54 100644 --- a/contracts/src/deploy-config/l1.ts +++ b/contracts/src/deploy-config/l1.ts @@ -29,7 +29,7 @@ const config = { batchSubmitterAddresses: ['0x70997970C51812dc3A010C7d01b50e0d17dc79C8'], rollupChallenger: '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65', // genesis config - batchHeader: '0x00000000000000000000000000000000000000000000000000886e14341b355178d11a2c9f985f60a1a195973078b688a11aeaebb0c95db595010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000002d20dde82426d971e398b3cba11ebb60d0d740b799f85e2f95fd12a1faad8e2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + batchHeader: '0x02000000000000000000000000000000000000000000000000033381279662858b9240915922a690bd410becba37d50220304302978c371d8f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000003be2f705e6212060d5aac5159a35014ea3ccc29ba2161c0fc658867061294d960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', // submitter initialize config submitterOwner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', diff --git a/contracts/src/deploy-config/qanetl1.ts b/contracts/src/deploy-config/qanetl1.ts index b869fa25c..5c76700ec 100644 --- a/contracts/src/deploy-config/qanetl1.ts +++ b/contracts/src/deploy-config/qanetl1.ts @@ -31,6 +31,11 @@ const config = { submitterChallengeDeposit: 1, // 1 ether submitterMinimumStake: 1, // 1 ether submitterRewardPercentage: 50, + // L1Sequencer initialize config + // First single-mode sequencer, active from L2 block 0. Leave empty to skip + // setFirstSequencer; can also be overridden by the firstSequencerAddress env var. + firstSequencerAddress: '', + // register sequencers l2SequencerAddresses: [ "0x25d36d94b64165f72a817ae0ff9bad2ce6914c70", diff --git a/go-ethereum b/go-ethereum index 5744b8f66..4012f174b 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 5744b8f66ec4070a535ed12200db48028df29d93 +Subproject commit 4012f174b967153a31926f370d77af389b2968c8 diff --git a/node/go.mod b/node/go.mod index 58d149343..27f18aee8 100644 --- a/node/go.mod +++ b/node/go.mod @@ -2,7 +2,7 @@ module morph-l2/node go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( github.com/cenkalti/backoff/v4 v4.1.3 @@ -13,7 +13,7 @@ require ( github.com/hashicorp/raft v1.7.3 github.com/hashicorp/raft-boltdb/v2 v2.3.1 github.com/mdlayher/vsock v1.2.1 - github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/spf13/viper v1.13.0 diff --git a/node/go.sum b/node/go.sum index 10fe62c49..898aa3470 100644 --- a/node/go.sum +++ b/node/go.sum @@ -414,10 +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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= -github.com/morph-l2/tendermint v0.3.9 h1:0jiFtMpVmVImCAFrMFTIvTX7jfJwzaQFyLQoLccP5A8= -github.com/morph-l2/tendermint v0.3.9/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs= +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/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa h1:GV16+/e1ibDFfnmzm9UsIaF9+nxETM0FZiaHdX78nhA= +github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= diff --git a/ops/l2-genesis/go.mod b/ops/l2-genesis/go.mod index 92f652ca3..931c63df4 100644 --- a/ops/l2-genesis/go.mod +++ b/ops/l2-genesis/go.mod @@ -2,11 +2,11 @@ module morph-l2/morph-deployer go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( github.com/holiman/uint256 v1.2.4 - github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 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 f0979324c..6d3f57e8c 100644 --- a/ops/l2-genesis/go.sum +++ b/ops/l2-genesis/go.sum @@ -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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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/tools/go.mod b/ops/tools/go.mod index 71959b6be..51ed7f8b2 100644 --- a/ops/tools/go.mod +++ b/ops/tools/go.mod @@ -2,10 +2,10 @@ module morph-l2/tools go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( - github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 github.com/tendermint/tendermint v0.35.9 ) diff --git a/ops/tools/go.sum b/ops/tools/go.sum index b08bc073c..8e810995e 100644 --- a/ops/tools/go.sum +++ b/ops/tools/go.sum @@ -161,10 +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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= -github.com/morph-l2/tendermint v0.3.9 h1:0jiFtMpVmVImCAFrMFTIvTX7jfJwzaQFyLQoLccP5A8= -github.com/morph-l2/tendermint v0.3.9/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs= +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/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa h1:GV16+/e1ibDFfnmzm9UsIaF9+nxETM0FZiaHdX78nhA= +github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa/go.mod h1:qpiwqfcCB89dBYfqVJOc/HjGxDp3OdDlthgttJJYyRs= 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/token-price-oracle/go.mod b/token-price-oracle/go.mod index d74e33cf7..66cf834a7 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.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 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 98189dc61..e21579afc 100644 --- a/token-price-oracle/go.sum +++ b/token-price-oracle/go.sum @@ -143,8 +143,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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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 32d563c34..6dee4d00c 100644 --- a/tx-submitter/go.mod +++ b/tx-submitter/go.mod @@ -2,14 +2,14 @@ module morph-l2/tx-submitter go 1.24.0 -replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.9 +replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.10-0.20260902105027-c75ab47bb1aa require ( github.com/consensys/gnark-crypto v0.16.0 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.20260824023452-5744b8f66ec4 + github.com/morph-l2/go-ethereum v1.10.14-0.20260908092055-4012f174b967 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 359c2c19b..f96d02b4b 100644 --- a/tx-submitter/go.sum +++ b/tx-submitter/go.sum @@ -161,8 +161,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.20260824023452-5744b8f66ec4 h1:HCXegM088SPDt3wITDEBM+Osx06I0CDLv2jmsaPA/LU= -github.com/morph-l2/go-ethereum v1.10.14-0.20260824023452-5744b8f66ec4/go.mod h1:nkVzHjQWCOjvukQW8ittlwX+Xz9gmVHrP7mUi7zoHTs= +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/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= From f9e76ab7be84a10b7f3d40ce80afc4add559bce0 Mon Sep 17 00:00:00 2001 From: "allen.wu" Date: Thu, 10 Sep 2026 17:34:32 +0800 Subject: [PATCH 2/3] revert batch hash --- contracts/src/deploy-config/l1.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/deploy-config/l1.ts b/contracts/src/deploy-config/l1.ts index 39d66bc54..6f09ba7eb 100644 --- a/contracts/src/deploy-config/l1.ts +++ b/contracts/src/deploy-config/l1.ts @@ -29,7 +29,7 @@ const config = { batchSubmitterAddresses: ['0x70997970C51812dc3A010C7d01b50e0d17dc79C8'], rollupChallenger: '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65', // genesis config - batchHeader: '0x02000000000000000000000000000000000000000000000000033381279662858b9240915922a690bd410becba37d50220304302978c371d8f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000003be2f705e6212060d5aac5159a35014ea3ccc29ba2161c0fc658867061294d960000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + batchHeader: '0x00000000000000000000000000000000000000000000000000886e14341b355178d11a2c9f985f60a1a195973078b688a11aeaebb0c95db595010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c44401400000000000000000000000000000000000000000000000000000000000000002d20dde82426d971e398b3cba11ebb60d0d740b799f85e2f95fd12a1faad8e2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', // submitter initialize config submitterOwner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', From f05bed4e743c8fb715c8d82dcfbdc56018483d9b Mon Sep 17 00:00:00 2001 From: "allen.wu" Date: Fri, 11 Sep 2026 11:52:19 +0800 Subject: [PATCH 3/3] put the setFirstSequencer after ownerTransfer --- contracts/deploy/022-SequencerInit.ts | 21 ++++++++++++++++++++- contracts/deploy/index.ts | 5 +++-- contracts/tasks/deploy.ts | 10 +++++++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/contracts/deploy/022-SequencerInit.ts b/contracts/deploy/022-SequencerInit.ts index a5457fdb7..607e28e2d 100644 --- a/contracts/deploy/022-SequencerInit.ts +++ b/contracts/deploy/022-SequencerInit.ts @@ -67,13 +67,32 @@ export const SequencerInit = async ( console.log('L1SequencerProxy upgrade success') } + return '' +} + +// SetFirstSequencer must run *after* the proxy admin has been handed over to +// ProxyAdmin. While the deployer is still the proxy admin, any call that falls +// through to the implementation reverts with +// "TransparentUpgradeableProxy: admin cannot fallback to proxy target". +export const SetFirstSequencer = async ( + hre: HardhatRuntimeEnvironment, + path: string, + deployer: any, + configTmp: any +): Promise => { + const L1SequencerProxyAddress = getContractAddressByName(path, ProxyStorageName.L1SequencerProxyStorageName) + const L1SequencerFactory = await hre.ethers.getContractFactory(ContractFactoryName.L1Sequencer) + const L1Sequencer = new ethers.Contract( L1SequencerProxyAddress, L1SequencerFactory.interface, deployer, ) - const firstSequencer: string = process.env.firstSequencerAddress || configTmp.firstSequencerAddress + // deployConfig is a Proxy that throws on unknown keys, so probe with `in` + // before reading. + const firstSequencer: string = process.env.firstSequencerAddress || + ('firstSequencerAddress' in configTmp ? configTmp.firstSequencerAddress : '') if (!firstSequencer) { // Networks that register the first sequencer out-of-band (devnet does it // from ops/devnet-morph) leave this unset. diff --git a/contracts/deploy/index.ts b/contracts/deploy/index.ts index 18dde9082..b1921cb80 100644 --- a/contracts/deploy/index.ts +++ b/contracts/deploy/index.ts @@ -10,7 +10,7 @@ import GatewayInit from './017-GatewayInit' import {AdminTransfer,AdminTransferByProxyStorageName, AdminTransferConcurrently} from './019-AdminTransfer' import ContractInit from './020-ContractInit' import SubmitterRegister from './021-SubmitterRegister' -import SequencerInit from './022-SequencerInit' +import SequencerInit, { SetFirstSequencer } from './022-SequencerInit' export { @@ -30,5 +30,6 @@ export { AdminTransferConcurrently, ContractInit, SubmitterRegister, - SequencerInit + SequencerInit, + SetFirstSequencer } diff --git a/contracts/tasks/deploy.ts b/contracts/tasks/deploy.ts index 6b6d3ddaf..3d784ad7d 100644 --- a/contracts/tasks/deploy.ts +++ b/contracts/tasks/deploy.ts @@ -22,6 +22,7 @@ import { ContractInit, SubmitterRegister, SequencerInit, + SetFirstSequencer, } from '../deploy/index' import { ethers } from "ethers"; @@ -140,7 +141,14 @@ task("initialize") return } - + // Must come after AdminTransfer: while the deployer is still the proxy + // admin, calls that fall through to the implementation revert. + console.log('\n---------------------------------- Set first sequencer ----------------------------------') + err = await SetFirstSequencer(hre, storagePath, deployer, config) + if (err != '') { + console.log('SetFirstSequencer failed, err: ', err) + return + } console.log('\n---------------------------------- Contract Init ----------------------------------') err = await ContractInit(hre, storagePath, deployer, config)