Skip to content

Commit

Permalink
Monkey test flag (#12560)
Browse files Browse the repository at this point in the history
closes #12549

---------

Co-authored-by: JkLondon <[email protected]>
Co-authored-by: alex.sharov <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2024
1 parent 22cdeb1 commit 77a130d
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 14 deletions.
5 changes: 5 additions & 0 deletions cmd/integration/commands/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var (

workers, reconWorkers uint64
dbWriteMap bool
chaosMonkey bool
)

func must(err error) {
Expand Down Expand Up @@ -204,3 +205,7 @@ func withCommitment(cmd *cobra.Command) {
func withUnwindTypes(cmd *cobra.Command) {
cmd.Flags().StringSliceVar(&unwindTypes, "unwind.types", nil, "types to unwind for polygon sync")
}

func withChaosMonkey(cmd *cobra.Command) {
cmd.Flags().BoolVar(&chaosMonkey, utils.ChaosMonkeyFlag.Name, utils.ChaosMonkeyFlag.Value, utils.ChaosMonkeyFlag.Usage)
}
13 changes: 12 additions & 1 deletion cmd/integration/commands/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,14 @@ func init() {
withDataDir(cmdStageSenders)
withChain(cmdStageSenders)
withHeimdall(cmdStageSenders)
withChaosMonkey(cmdStageSenders)
rootCmd.AddCommand(cmdStageSenders)

withConfig(cmdStageSnapshots)
withDataDir(cmdStageSnapshots)
withChain(cmdStageSnapshots)
withReset(cmdStageSnapshots)
withChaosMonkey(cmdStageSnapshots)
rootCmd.AddCommand(cmdStageSnapshots)

withConfig(cmdStageHeaders)
Expand All @@ -516,6 +518,7 @@ func init() {
withReset(cmdStageHeaders)
withChain(cmdStageHeaders)
withHeimdall(cmdStageHeaders)
withChaosMonkey(cmdStageHeaders)
rootCmd.AddCommand(cmdStageHeaders)

withConfig(cmdStageBorHeimdall)
Expand All @@ -525,13 +528,15 @@ func init() {
withUnwindTypes(cmdStageBorHeimdall)
withChain(cmdStageBorHeimdall)
withHeimdall(cmdStageBorHeimdall)
withChaosMonkey(cmdStageBorHeimdall)
rootCmd.AddCommand(cmdStageBorHeimdall)

withConfig(cmdStageBodies)
withDataDir(cmdStageBodies)
withUnwind(cmdStageBodies)
withChain(cmdStageBodies)
withHeimdall(cmdStageBodies)
withChaosMonkey(cmdStageBodies)
rootCmd.AddCommand(cmdStageBodies)

withConfig(cmdStagePolygon)
Expand All @@ -541,6 +546,7 @@ func init() {
withUnwindTypes(cmdStagePolygon)
withChain(cmdStagePolygon)
withHeimdall(cmdStagePolygon)
withChaosMonkey(cmdStagePolygon)
rootCmd.AddCommand(cmdStagePolygon)

withConfig(cmdStageExec)
Expand All @@ -555,6 +561,7 @@ func init() {
withChain(cmdStageExec)
withHeimdall(cmdStageExec)
withWorkers(cmdStageExec)
withChaosMonkey(cmdStageExec)
rootCmd.AddCommand(cmdStageExec)

withConfig(cmdStageCustomTrace)
Expand All @@ -569,6 +576,7 @@ func init() {
withChain(cmdStageCustomTrace)
withHeimdall(cmdStageCustomTrace)
withWorkers(cmdStageCustomTrace)
withChaosMonkey(cmdStageCustomTrace)
rootCmd.AddCommand(cmdStageCustomTrace)

withConfig(cmdStagePatriciaTrie)
Expand All @@ -580,6 +588,7 @@ func init() {
withIntegrityChecks(cmdStagePatriciaTrie)
withChain(cmdStagePatriciaTrie)
withHeimdall(cmdStagePatriciaTrie)
withChaosMonkey(cmdStagePatriciaTrie)
rootCmd.AddCommand(cmdStagePatriciaTrie)

withConfig(cmdStageTxLookup)
Expand All @@ -590,6 +599,7 @@ func init() {
withPruneTo(cmdStageTxLookup)
withChain(cmdStageTxLookup)
withHeimdall(cmdStageTxLookup)
withChaosMonkey(cmdStageTxLookup)
rootCmd.AddCommand(cmdStageTxLookup)

withConfig(cmdPrintMigrations)
Expand Down Expand Up @@ -1063,7 +1073,7 @@ func stageExec(db kv.RwDB, ctx context.Context, logger log.Logger) error {
br, _ := blocksIO(db, logger)
cfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, chainConfig, engine, vmConfig, nil,
/*stateStream=*/ false,
/*badBlockHalt=*/ true /*alwaysGenerateChangesets=*/, false,
/*badBlockHalt=*/ true /*alwaysGenerateChangesets=*/, false, chaosMonkey,
dirs, br, nil, genesis, syncCfg, nil)

if unwind > 0 {
Expand Down Expand Up @@ -1481,6 +1491,7 @@ func newSync(ctx context.Context, db kv.RwDB, miningConfig *params.MiningConfig,
cfg.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ false,
chaosMonkey,
dirs,
blockReader,
sentryControlServer.Hd,
Expand Down
6 changes: 4 additions & 2 deletions cmd/integration/commands/state_stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func init() {
withChain(stateStages)
withHeimdall(stateStages)
withWorkers(stateStages)
withChaosMonkey(stateStages)
rootCmd.AddCommand(stateStages)

withConfig(loopExecCmd)
Expand All @@ -145,6 +146,7 @@ func init() {
withChain(loopExecCmd)
withHeimdall(loopExecCmd)
withWorkers(loopExecCmd)
withChaosMonkey(loopExecCmd)
rootCmd.AddCommand(loopExecCmd)
}

Expand Down Expand Up @@ -187,7 +189,7 @@ func syncBySmallSteps(db kv.RwDB, miningConfig params.MiningConfig, ctx context.
syncCfg.ReconWorkerCount = int(reconWorkers)

br, _ := blocksIO(db, logger1)
execCfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, chainConfig, engine, vmConfig, notifications, false, true, false, dirs, br, nil, genesis, syncCfg, nil)
execCfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, chainConfig, engine, vmConfig, notifications, false, true, false, chaosMonkey, dirs, br, nil, genesis, syncCfg, nil)

execUntilFunc := func(execToBlock uint64) stagedsync.ExecFunc {
return func(badBlockUnwind bool, s *stagedsync.StageState, unwinder stagedsync.Unwinder, txc wrap.TxContainer, logger log.Logger) error {
Expand Down Expand Up @@ -418,7 +420,7 @@ func loopExec(db kv.RwDB, ctx context.Context, unwind uint64, logger log.Logger)

initialCycle := false
br, _ := blocksIO(db, logger)
cfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, chainConfig, engine, vmConfig, nil, false, true, false, dirs, br, nil, genesis, syncCfg, nil)
cfg := stagedsync.StageExecuteBlocksCfg(db, pm, batchSize, chainConfig, engine, vmConfig, nil, false, true, false, chaosMonkey, dirs, br, nil, genesis, syncCfg, nil)

// set block limit of execute stage
sync.MockExecFunc(stages.Execution, func(badBlockUnwind bool, stageState *stagedsync.StageState, unwinder stagedsync.Unwinder, txc wrap.TxContainer, logger log.Logger) error {
Expand Down
6 changes: 6 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,12 @@ var (
Usage: "Enable speed test",
Value: false,
}

ChaosMonkeyFlag = cli.BoolFlag{
Name: "chaos.monkey",
Usage: "Enable 'chaos monkey' to generate spontaneous network/consensus/etc failures. Use ONLY for testing",
Value: false,
}
)

var MetricFlags = []cli.Flag{&MetricsEnabledFlag, &MetricsHTTPFlag, &MetricsPortFlag, &DiagDisabledFlag, &DiagEndpointAddrFlag, &DiagEndpointPortFlag, &DiagSpeedTestFlag}
Expand Down
2 changes: 2 additions & 0 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
config.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ false,
config.ChaosMonkey,
dirs,
blockReader,
backend.sentriesClient.Hd,
Expand Down Expand Up @@ -769,6 +770,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
config.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ false,
config.ChaosMonkey,
dirs,
blockReader,
backend.sentriesClient.Hd,
Expand Down
4 changes: 4 additions & 0 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ var Defaults = Config{
ProduceE2: true,
ProduceE3: true,
},

ChaosMonkey: false,
}

func init() {
Expand Down Expand Up @@ -258,6 +260,8 @@ type Config struct {
SilkwormRpcJsonCompatibility bool

DisableTxPoolGossip bool

ChaosMonkey bool
}

type Sync struct {
Expand Down
11 changes: 8 additions & 3 deletions eth/stagedsync/exec3_parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
chaos_monkey "github.com/erigontech/erigon/tests/chaos-monkey"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -376,9 +377,13 @@ func (pe *parallelExecutor) processResultQueue(ctx context.Context, inputTxNum u
if txTask.Error != nil {
return outputTxNum, conflicts, triggers, processedBlockNum, false, fmt.Errorf("%w: %v", consensus.ErrInvalidBlock, txTask.Error)
}
//if !pe.execStage.CurrentSyncCycle.IsInitialCycle && rand2.Int()%1500 == 0 && txTask.TxIndex == 0 && !pe.cfg.badBlockHalt {
// return outputTxNum, conflicts, triggers, processedBlockNum, false, fmt.Errorf("monkey in the datacenter: %w", consensus.ErrInvalidBlock)
//}
if pe.cfg.chaosMonkey {
chaosErr := chaos_monkey.ThrowRandomConsensusError(pe.execStage.CurrentSyncCycle.IsInitialCycle, txTask.TxIndex, pe.cfg.badBlockHalt, txTask.Error)
if chaosErr != nil {
log.Warn("Monkey in a consensus")
return outputTxNum, conflicts, triggers, processedBlockNum, false, chaosErr
}
}
// TODO: post-validation of gasUsed and blobGasUsed
i++
}
Expand Down
11 changes: 8 additions & 3 deletions eth/stagedsync/exec3_serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
chaos_monkey "github.com/erigontech/erigon/tests/chaos-monkey"
"sync/atomic"
"time"

Expand Down Expand Up @@ -90,9 +91,13 @@ func (se *serialExecutor) execute(ctx context.Context, tasks []*state.TxTask) (c
}
}
}
//if !se.execStage.CurrentSyncCycle.IsInitialCycle && rand2.Int()%1500 == 0 && txTask.TxIndex == 0 && !se.cfg.badBlockHalt {
// return fmt.Errorf("monkey in the datacenter: %w", consensus.ErrInvalidBlock)
//}
if se.cfg.chaosMonkey {
chaosErr := chaos_monkey.ThrowRandomConsensusError(se.execStage.CurrentSyncCycle.IsInitialCycle, txTask.TxIndex, se.cfg.badBlockHalt, txTask.Error)
if chaosErr != nil {
log.Warn("Monkey in a consensus")
return chaosErr
}
}
return nil
}(); err != nil {
if errors.Is(err, context.Canceled) {
Expand Down
4 changes: 4 additions & 0 deletions eth/stagedsync/stage_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ type ExecuteBlockCfg struct {
blockProduction bool
keepAllChangesets bool

chaosMonkey bool

applyWorker, applyWorkerMining *exec3.Worker
}

Expand All @@ -105,6 +107,7 @@ func StageExecuteBlocksCfg(
stateStream bool,
badBlockHalt bool,
keepAllChangesets bool,
chaosMonkey bool,

dirs datadir.Dirs,
blockReader services.FullBlockReader,
Expand Down Expand Up @@ -137,6 +140,7 @@ func StageExecuteBlocksCfg(
applyWorker: exec3.NewWorker(nil, log.Root(), context.Background(), false, db, nil, blockReader, chainConfig, genesis, nil, engine, dirs, false),
applyWorkerMining: exec3.NewWorker(nil, log.Root(), context.Background(), false, db, nil, blockReader, chainConfig, genesis, nil, engine, dirs, true),
keepAllChangesets: keepAllChangesets,
chaosMonkey: chaosMonkey,
}
}

Expand Down
18 changes: 18 additions & 0 deletions tests/chaos-monkey/chaos-monkey.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package chaos_monkey

import (
"fmt"
"github.com/erigontech/erigon/consensus"
rand2 "golang.org/x/exp/rand"
)

const (
consensusFailureRate = 300
)

func ThrowRandomConsensusError(IsInitialCycle bool, txIndex int, badBlockHalt bool, txTaskErr error) error {
if !IsInitialCycle && rand2.Int()%consensusFailureRate == 0 && txIndex == 0 && !badBlockHalt {
return fmt.Errorf("monkey in the datacenter: %w: %v", consensus.ErrInvalidBlock, txTaskErr)
}
return nil
}
2 changes: 2 additions & 0 deletions turbo/cli/default_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,6 @@ var DefaultFlags = []cli.Flag{
&SyncLoopBlockLimitFlag,
&SyncLoopBreakAfterFlag,
&SyncParallelStateFlushing,

&utils.ChaosMonkeyFlag,
}
8 changes: 8 additions & 0 deletions turbo/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ func ApplyFlagsForEthConfig(ctx *cli.Context, cfg *ethconfig.Config, logger log.
if ctx.Bool(utils.DisableIPV4.Name) {
cfg.Downloader.ClientConfig.DisableIPv4 = true
}

if ctx.Bool(utils.ChaosMonkeyFlag.Name) {
cfg.ChaosMonkey = true
}
}

func ApplyFlagsForEthConfigCobra(f *pflag.FlagSet, cfg *ethconfig.Config) {
Expand Down Expand Up @@ -454,6 +458,10 @@ func ApplyFlagsForEthConfigCobra(f *pflag.FlagSet, cfg *ethconfig.Config) {
if v := f.Bool(StateStreamDisableFlag.Name, false, StateStreamDisableFlag.Usage); v != nil {
cfg.StateStream = false
}

if v := f.Bool(utils.ChaosMonkeyFlag.Name, true, utils.ChaosMonkeyFlag.Usage); v != nil {
cfg.ChaosMonkey = true
}
}

func ApplyFlagsForNodeConfig(ctx *cli.Context, cfg *nodecfg.Config, logger log.Logger) {
Expand Down
3 changes: 3 additions & 0 deletions turbo/stages/mock/mock_sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ func MockWithEverything(tb testing.TB, gspec *types.Genesis, key *ecdsa.PrivateK
cfg.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ true,
cfg.ChaosMonkey, //Set to true to enable in tests
dirs,
mock.BlockReader,
mock.sentriesClient.Hd,
Expand Down Expand Up @@ -535,6 +536,7 @@ func MockWithEverything(tb testing.TB, gspec *types.Genesis, key *ecdsa.PrivateK
cfg.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ true,
cfg.ChaosMonkey, //Set to true to enable in tests
dirs,
mock.BlockReader,
mock.sentriesClient.Hd,
Expand Down Expand Up @@ -572,6 +574,7 @@ func MockWithEverything(tb testing.TB, gspec *types.Genesis, key *ecdsa.PrivateK
cfg.StateStream,
/*stateStream=*/ false,
/*alwaysGenerateChangesets=*/ true,
cfg.ChaosMonkey, //Set to true to enable in tests
dirs,
mock.BlockReader,
mock.sentriesClient.Hd,
Expand Down
10 changes: 5 additions & 5 deletions turbo/stages/stageloop.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func NewDefaultStages(ctx context.Context,
stagedsync.StageBlockHashesCfg(db, dirs.Tmp, controlServer.ChainConfig, blockWriter),
stagedsync.StageBodiesCfg(db, controlServer.Bd, controlServer.SendBodyRequest, controlServer.Penalize, controlServer.BroadcastNewBlock, cfg.Sync.BodyDownloadTimeoutSeconds, *controlServer.ChainConfig, blockReader, blockWriter),
stagedsync.StageSendersCfg(db, controlServer.ChainConfig, cfg.Sync, false, dirs.Tmp, cfg.Prune, blockReader, controlServer.Hd),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, cfg.ChaosMonkey, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)),
stagedsync.StageTxLookupCfg(db, cfg.Prune, dirs.Tmp, controlServer.ChainConfig.Bor, blockReader),
stagedsync.StageFinishCfg(db, dirs.Tmp, forkValidator), runInTestMode)
}
Expand Down Expand Up @@ -725,7 +725,7 @@ func NewPipelineStages(ctx context.Context,
stagedsync.StageSnapshotsCfg(db, *controlServer.ChainConfig, cfg.Sync, dirs, blockRetire, snapDownloader, blockReader, notifications, agg, cfg.InternalCL && cfg.CaplinConfig.Backfilling, cfg.CaplinConfig.BlobBackfilling, silkworm, cfg.Prune),
stagedsync.StageBlockHashesCfg(db, dirs.Tmp, controlServer.ChainConfig, blockWriter),
stagedsync.StageSendersCfg(db, controlServer.ChainConfig, cfg.Sync, false, dirs.Tmp, cfg.Prune, blockReader, controlServer.Hd),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, cfg.ChaosMonkey, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)),
stagedsync.StageTxLookupCfg(db, cfg.Prune, dirs.Tmp, controlServer.ChainConfig.Bor, blockReader),
stagedsync.StageFinishCfg(db, dirs.Tmp, forkValidator), runInTestMode)
}
Expand All @@ -736,7 +736,7 @@ func NewPipelineStages(ctx context.Context,
stagedsync.StageBlockHashesCfg(db, dirs.Tmp, controlServer.ChainConfig, blockWriter),
stagedsync.StageSendersCfg(db, controlServer.ChainConfig, cfg.Sync, false, dirs.Tmp, cfg.Prune, blockReader, controlServer.Hd),
stagedsync.StageBodiesCfg(db, controlServer.Bd, controlServer.SendBodyRequest, controlServer.Penalize, controlServer.BroadcastNewBlock, cfg.Sync.BodyDownloadTimeoutSeconds, *controlServer.ChainConfig, blockReader, blockWriter),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)), stagedsync.StageTxLookupCfg(db, cfg.Prune, dirs.Tmp, controlServer.ChainConfig.Bor, blockReader), stagedsync.StageFinishCfg(db, dirs.Tmp, forkValidator), runInTestMode)
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, false, false, cfg.ChaosMonkey, dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg)), stagedsync.StageTxLookupCfg(db, cfg.Prune, dirs.Tmp, controlServer.ChainConfig.Bor, blockReader), stagedsync.StageFinishCfg(db, dirs.Tmp, forkValidator), runInTestMode)

}

Expand All @@ -747,7 +747,7 @@ func NewInMemoryExecution(ctx context.Context, db kv.RwDB, cfg *ethconfig.Config
cfg.Sync,
stagedsync.StateStages(ctx, stagedsync.StageHeadersCfg(db, controlServer.Hd, controlServer.Bd, *controlServer.ChainConfig, cfg.Sync, controlServer.SendHeaderRequest, controlServer.PropagateNewBlockHashes, controlServer.Penalize, cfg.BatchSize, false, blockReader, blockWriter, dirs.Tmp, nil),
stagedsync.StageBodiesCfg(db, controlServer.Bd, controlServer.SendBodyRequest, controlServer.Penalize, controlServer.BroadcastNewBlock, cfg.Sync.BodyDownloadTimeoutSeconds, *controlServer.ChainConfig, blockReader, blockWriter), stagedsync.StageBlockHashesCfg(db, dirs.Tmp, controlServer.ChainConfig, blockWriter), stagedsync.StageSendersCfg(db, controlServer.ChainConfig, cfg.Sync, true, dirs.Tmp, cfg.Prune, blockReader, controlServer.Hd),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, true, false, cfg.Dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg))),
stagedsync.StageExecuteBlocksCfg(db, cfg.Prune, cfg.BatchSize, controlServer.ChainConfig, controlServer.Engine, &vm.Config{}, notifications, cfg.StateStream, true, false, cfg.ChaosMonkey, cfg.Dirs, blockReader, controlServer.Hd, cfg.Genesis, cfg.Sync, SilkwormForExecutionStage(silkworm, cfg))),
stagedsync.StateUnwindOrder,
nil, /* pruneOrder */
logger,
Expand Down Expand Up @@ -809,7 +809,7 @@ func NewPolygonSyncStages(
nil, /* userUnwindTypeOverrides */
),
stagedsync.StageSendersCfg(db, chainConfig, config.Sync, false, config.Dirs.Tmp, config.Prune, blockReader, nil),
stagedsync.StageExecuteBlocksCfg(db, config.Prune, config.BatchSize, chainConfig, consensusEngine, &vm.Config{}, notifications, config.StateStream, false, false, config.Dirs, blockReader, nil, config.Genesis, config.Sync, SilkwormForExecutionStage(silkworm, config)),
stagedsync.StageExecuteBlocksCfg(db, config.Prune, config.BatchSize, chainConfig, consensusEngine, &vm.Config{}, notifications, config.StateStream, false, false, config.ChaosMonkey, config.Dirs, blockReader, nil, config.Genesis, config.Sync, SilkwormForExecutionStage(silkworm, config)),
stagedsync.StageTxLookupCfg(
db,
config.Prune,
Expand Down

0 comments on commit 77a130d

Please sign in to comment.