From 8d8ac13ae90476a3f8e434c0029ad64e13da03c2 Mon Sep 17 00:00:00 2001 From: Morty Date: Tue, 27 Jan 2026 16:50:34 +0800 Subject: [PATCH 1/4] feat: add param to skip system config signer check --- cmd/geth/main.go | 1 + cmd/geth/usage.go | 1 + cmd/utils/flags.go | 9 +++++++++ consensus/system_contract/consensus.go | 6 +++++- consensus/system_contract/system_contract.go | 4 +++- consensus/system_contract/system_contract_test.go | 6 +++--- eth/backend.go | 4 ++-- eth/ethconfig/config.go | 9 ++++++--- les/client.go | 2 +- miner/scroll_worker_test.go | 2 +- 10 files changed, 32 insertions(+), 12 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 9f1b3a33de55..a06274289ab0 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -182,6 +182,7 @@ var ( utils.GossipSequencerHTTPFlag, utils.GossipBroadcastToAllEnabledFlag, utils.GossipBroadcastToAllCapFlag, + utils.SkipSignerCheckFlag, utils.DASyncEnabledFlag, utils.DAMissingHeaderFieldsBaseURLFlag, utils.DABlockNativeAPIEndpointFlag, diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 5d622ca3c379..6c15fc641fad 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -255,6 +255,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{ utils.GossipSequencerHTTPFlag, utils.GossipBroadcastToAllEnabledFlag, utils.GossipBroadcastToAllCapFlag, + utils.SkipSignerCheckFlag, }, }, { diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index dae48f8c9c8c..2e5a10057720 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -919,6 +919,11 @@ var ( Value: 30, } + SkipSignerCheckFlag = cli.BoolFlag{ + Name: "skipsignercheck", + Usage: "Skip signer check for the SystemContract engine", + } + // DA syncing settings DASyncEnabledFlag = cli.BoolFlag{ Name: "da.sync", @@ -1847,6 +1852,10 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { cfg.GossipBroadcastToAllCap = ctx.GlobalInt(GossipBroadcastToAllCapFlag.Name) log.Info("Gossip broadcast to all enabled", "enabled", cfg.GossipBroadcastToAllEnabled, "cap", cfg.GossipBroadcastToAllCap) } + if ctx.GlobalIsSet(SkipSignerCheckFlag.Name) { + cfg.SkipSignerCheck = ctx.GlobalBool(SkipSignerCheckFlag.Name) + log.Info("Skip signer check for the SystemContract engine", "skipped", cfg.SkipSignerCheck) + } // Only configure sequencer http flag if we're running in verifier mode i.e. --mine is disabled. if ctx.IsSet(GossipSequencerHTTPFlag.Name) && !ctx.IsSet(MiningEnabledFlag.Name) { cfg.GossipSequencerHTTP = ctx.String(GossipSequencerHTTPFlag.Name) diff --git a/consensus/system_contract/consensus.go b/consensus/system_contract/consensus.go index 6d061207489c..2516d6bc0a06 100644 --- a/consensus/system_contract/consensus.go +++ b/consensus/system_contract/consensus.go @@ -135,7 +135,7 @@ func (s *SystemContract) verifyHeader(chain consensus.ChainHeaderReader, header return errInvalidNonce } // Check that the BlockSignature contains signature if block is not requested - if header.Number.Cmp(big.NewInt(0)) != 0 && len(header.BlockSignature) != extraSeal { + if !s.skipSignerCheck && header.Number.Cmp(big.NewInt(0)) != 0 && len(header.BlockSignature) != extraSeal { return errMissingSignature } // Ensure that the mix digest is zero @@ -202,6 +202,10 @@ func (s *SystemContract) verifyCascadingFields(chain consensus.ChainHeaderReader return err } + if s.skipSignerCheck { + return nil + } + signer, err := ecrecover(header) if err != nil { return err diff --git a/consensus/system_contract/system_contract.go b/consensus/system_contract/system_contract.go index aef24a00ba4d..59db3b50d16d 100644 --- a/consensus/system_contract/system_contract.go +++ b/consensus/system_contract/system_contract.go @@ -33,11 +33,13 @@ type SystemContract struct { ctx context.Context cancel context.CancelFunc + + skipSignerCheck bool } // New creates a SystemContract consensus engine with the initial // authorized signer fetched from L1 (if available). -func New(ctx context.Context, config *params.SystemContractConfig, client sync_service.EthClient) *SystemContract { +func New(ctx context.Context, config *params.SystemContractConfig, client sync_service.EthClient, skipSignerCheck bool) *SystemContract { log.Info("Initializing system_contract consensus engine", "config", config) ctx, cancel := context.WithCancel(ctx) diff --git a/consensus/system_contract/system_contract_test.go b/consensus/system_contract/system_contract_test.go index fa344f5c9efa..6b6ca06c3a3a 100644 --- a/consensus/system_contract/system_contract_test.go +++ b/consensus/system_contract/system_contract_test.go @@ -36,7 +36,7 @@ func TestSystemContract_FetchSigner(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - sys := New(ctx, config, fakeClient) + sys := New(ctx, config, fakeClient, false) defer sys.Close() require.NoError(t, sys.fetchAddressFromL1()) @@ -62,7 +62,7 @@ func TestSystemContract_AuthorizeCheck(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - sys := New(ctx, config, fakeClient) + sys := New(ctx, config, fakeClient, false) defer sys.Close() require.NoError(t, sys.fetchAddressFromL1()) @@ -117,7 +117,7 @@ func TestSystemContract_SignsAfterUpdate(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() - sys := New(ctx, config, fakeClient) + sys := New(ctx, config, fakeClient, false) defer sys.Close() require.NoError(t, sys.fetchAddressFromL1()) diff --git a/eth/backend.go b/eth/backend.go index 39212350125e..66833b347fa9 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -120,7 +120,7 @@ type Ethereum struct { // New creates a new Ethereum object (including the // initialisation of the common Ethereum object) -func New(stack *node.Node, config *ethconfig.Config, l1Client l1.Client) (*Ethereum, error) { +func New(stack *node.Node, config *ethconfig.Config, l1Client l1.Client, ) (*Ethereum, error) { // Ensure configuration values are compatible and sane if config.SyncMode == downloader.LightSync { return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum") @@ -166,7 +166,7 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client l1.Client) (*Ether chainDb: chainDb, eventMux: stack.EventMux(), accountManager: stack.AccountManager(), - engine: ethconfig.CreateConsensusEngine(stack, chainConfig, ðashConfig, config.Miner.Notify, config.Miner.Noverify, chainDb, l1Client), + engine: ethconfig.CreateConsensusEngine(stack, chainConfig, ðashConfig, config.Miner.Notify, config.Miner.Noverify, chainDb, l1Client, config.SkipSignerCheck), closeBloomHandler: make(chan struct{}), networkID: config.NetworkId, gasPrice: config.Miner.GasPrice, diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index 104ac6b41ea0..33d34e67666e 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -236,14 +236,17 @@ type Config struct { GossipSequencerHTTP string GossipBroadcastToAllEnabled bool GossipBroadcastToAllCap int + + // Skip signer check for the SystemContract engine + SkipSignerCheck bool } // CreateConsensusEngine creates a consensus engine for the given chain configuration. -func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, config *ethash.Config, notify []string, noverify bool, db ethdb.Database, l1Client sync_service.EthClient) consensus.Engine { +func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, config *ethash.Config, notify []string, noverify bool, db ethdb.Database, l1Client sync_service.EthClient, skipSignerCheck bool) consensus.Engine { // Case 1: Both SystemContract and Clique are defined: create an upgradable engine. if chainConfig.SystemContract != nil && chainConfig.Clique != nil { cliqueEngine := clique.New(chainConfig.Clique, db) - sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, l1Client) + sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, l1Client, skipSignerCheck) sysEngine.Start() return wrapper.NewUpgradableEngine(chainConfig.IsEuclidV2, cliqueEngine, sysEngine) } @@ -255,7 +258,7 @@ func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, co // Case 3: Only the SystemContract engine is defined. if chainConfig.SystemContract != nil { - sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, l1Client) + sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, l1Client, skipSignerCheck) sysEngine.Start() return sysEngine } diff --git a/les/client.go b/les/client.go index 2918d4d68f9d..d41d8de01b65 100644 --- a/les/client.go +++ b/les/client.go @@ -110,7 +110,7 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client sync_service.EthCl eventMux: stack.EventMux(), reqDist: newRequestDistributor(peers, &mclock.System{}), accountManager: stack.AccountManager(), - engine: ethconfig.CreateConsensusEngine(stack, chainConfig, &config.Ethash, nil, false, chainDb, l1Client), + engine: ethconfig.CreateConsensusEngine(stack, chainConfig, &config.Ethash, nil, false, chainDb, l1Client, config.SkipSignerCheck), bloomRequests: make(chan chan *bloombits.Retrieval), bloomIndexer: core.NewBloomIndexer(chainDb, params.BloomBitsBlocksClient, params.HelperTrieConfirmations), p2pServer: stack.Server(), diff --git a/miner/scroll_worker_test.go b/miner/scroll_worker_test.go index b72d3ad66d36..c0a8c69a9ff2 100644 --- a/miner/scroll_worker_test.go +++ b/miner/scroll_worker_test.go @@ -1411,7 +1411,7 @@ func TestEuclidV2TransitionVerification(t *testing.T) { // init worker db := rawdb.NewMemoryDatabase() cliqueEngine := clique.New(chainConfig.Clique, db) - sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, &system_contract.FakeEthClient{Value: testBankAddress}) + sysEngine := system_contract.New(context.Background(), chainConfig.SystemContract, &system_contract.FakeEthClient{Value: testBankAddress}, false) engine := wrapper.NewUpgradableEngine(chainConfig.IsEuclidV2, cliqueEngine, sysEngine) w, b := newTestWorkerWithEmptyBlock(t, chainConfig, engine, db, 0) defer w.close() From 67e1218d8b91b22f38964b62df67bef5edd2d6e9 Mon Sep 17 00:00:00 2001 From: Morty Date: Tue, 27 Jan 2026 18:31:04 +0800 Subject: [PATCH 2/4] fix --- consensus/system_contract/system_contract.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consensus/system_contract/system_contract.go b/consensus/system_contract/system_contract.go index 59db3b50d16d..2bf363f8dfe2 100644 --- a/consensus/system_contract/system_contract.go +++ b/consensus/system_contract/system_contract.go @@ -50,6 +50,8 @@ func New(ctx context.Context, config *params.SystemContractConfig, client sync_s ctx: ctx, cancel: cancel, + + skipSignerCheck: skipSignerCheck, } if err := s.fetchAddressFromL1(); err != nil { From bed43f7c09809fb4a7dba8e505144e904c35623e Mon Sep 17 00:00:00 2001 From: yiweichi <70688412+yiweichi@users.noreply.github.com> Date: Wed, 28 Jan 2026 00:06:52 +0000 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20auto=20version=20bump=E2=80=89[bot?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index 5a8ed4956b78..ca702e11bf47 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 10 // Minor version component of the current release - VersionPatch = 3 // Patch version component of the current release + VersionPatch = 4 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) From b17d2e3d7ea487c5d4853f73c9cc3fa831e10606 Mon Sep 17 00:00:00 2001 From: Morty Date: Wed, 28 Jan 2026 09:40:34 +0800 Subject: [PATCH 4/4] change log level --- cmd/utils/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2e5a10057720..9bd552df1590 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1854,7 +1854,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } if ctx.GlobalIsSet(SkipSignerCheckFlag.Name) { cfg.SkipSignerCheck = ctx.GlobalBool(SkipSignerCheckFlag.Name) - log.Info("Skip signer check for the SystemContract engine", "skipped", cfg.SkipSignerCheck) + log.Warn("Skip signer check for the SystemContract engine", "skipped", cfg.SkipSignerCheck) } // Only configure sequencer http flag if we're running in verifier mode i.e. --mine is disabled. if ctx.IsSet(GossipSequencerHTTPFlag.Name) && !ctx.IsSet(MiningEnabledFlag.Name) {