Skip to content

Commit

Permalink
prevent to do parallel exec on gnosis (#13153)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Dec 18, 2024
1 parent 81d6b29 commit 971ef13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/state/exec3/historical_trace_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))

Expand Down
4 changes: 4 additions & 0 deletions eth/stagedsync/exec3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 971ef13

Please sign in to comment.