From 971ef138c6d7df8bd31e4f85133d374503fbc347 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 18 Dec 2024 22:15:44 +0700 Subject: [PATCH] prevent to do parallel exec on gnosis (#13153) --- cmd/state/exec3/historical_trace_worker.go | 4 ++++ eth/stagedsync/exec3.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cmd/state/exec3/historical_trace_worker.go b/cmd/state/exec3/historical_trace_worker.go index 315c2c10f74..8d784be41ea 100644 --- a/cmd/state/exec3/historical_trace_worker.go +++ b/cmd/state/exec3/historical_trace_worker.go @@ -23,6 +23,7 @@ import ( "sync/atomic" "time" + "github.com/erigontech/erigon-lib/chain/networkname" "golang.org/x/sync/errgroup" "github.com/erigontech/erigon-lib/chain" @@ -350,6 +351,9 @@ func CustomTraceMapReduce(fromBlock, toBlock uint64, consumer TraceConsumer, ctx log.Info("[Receipt] batch start", "fromBlock", fromBlock, "toBlock", toBlock, "workers", cfg.Workers) br := cfg.BlockReader chainConfig := cfg.ChainConfig + if chainConfig.ChainName == networkname.Gnosis { + panic("gnosis consensus doesn't support parallel exec yet: https://github.com/erigontech/erigon/issues/12054") + } txNumsReader := rawdbv3.TxNums.WithCustomReadTxNumFunc(freezeblocks.ReadTxNumFuncFromBlockReader(ctx, cfg.BlockReader)) diff --git a/eth/stagedsync/exec3.go b/eth/stagedsync/exec3.go index d1e1efb49b3..89710facaae 100644 --- a/eth/stagedsync/exec3.go +++ b/eth/stagedsync/exec3.go @@ -27,6 +27,7 @@ import ( "sync/atomic" "time" + "github.com/erigontech/erigon-lib/chain/networkname" "github.com/erigontech/erigon-lib/common" "github.com/erigontech/erigon-lib/common/cmp" "github.com/erigontech/erigon-lib/common/dbg" @@ -207,6 +208,9 @@ func ExecV3(ctx context.Context, ) error { // TODO: e35 doesn't support parallel-exec yet parallel = false //nolint + if parallel && cfg.chainConfig.ChainName == networkname.Gnosis { + panic("gnosis consensus doesn't support parallel exec yet: https://github.com/erigontech/erigon/issues/12054") + } blockReader := cfg.blockReader chainConfig := cfg.chainConfig