Skip to content

Commit

Permalink
Revert "updateForkChoice: support --sync.loop.block.limit (#9315)" (#…
Browse files Browse the repository at this point in the history
…9833)

Revert PR #9315 since it apparently causes MDBX bloat and performance
regression. The regression was introduced in
[v2.58.0](https://github.com/ledgerwatch/erigon/releases/tag/v2.58.0).
  • Loading branch information
yperbasis authored Mar 28, 2024
1 parent 02c9d4b commit a013ec2
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 198 deletions.
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
checkStateRoot := true
pipelineStages := stages2.NewPipelineStages(ctx, chainKv, config, stack.Config().P2P, backend.sentriesClient, backend.notifications, backend.downloaderClient, blockReader, blockRetire, backend.agg, backend.silkworm, backend.forkValidator, logger, checkStateRoot)
backend.pipelineStagedSync = stagedsync.New(config.Sync, pipelineStages, stagedsync.PipelineUnwindOrder, stagedsync.PipelinePruneOrder, logger)
backend.eth1ExecutionServer = eth1.NewEthereumExecutionModule(blockReader, chainKv, backend.pipelineStagedSync, backend.forkValidator, chainConfig, assembleBlockPOS, hook, backend.notifications.Accumulator, backend.notifications.StateChangesConsumer, logger, backend.engine, config.HistoryV3, config.Sync, ctx)
backend.eth1ExecutionServer = eth1.NewEthereumExecutionModule(blockReader, chainKv, backend.pipelineStagedSync, backend.forkValidator, chainConfig, assembleBlockPOS, hook, backend.notifications.Accumulator, backend.notifications.StateChangesConsumer, logger, backend.engine, config.HistoryV3, ctx)
executionRpc := direct.NewExecutionClientDirect(backend.eth1ExecutionServer)
engineBackendRPC := engineapi.NewEngineServer(
logger,
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (
const (
VersionMajor = 2 // Major version component of the current release
VersionMinor = 59 // Minor version component of the current release
VersionMicro = 1 // Patch version component of the current release
VersionMicro = 2 // Patch version component of the current release
VersionModifier = "" // Modifier component of the current release
VersionKeyCreated = "ErigonVersionCreated"
VersionKeyFinished = "ErigonVersionFinished"
Expand Down
10 changes: 2 additions & 8 deletions turbo/execution/eth1/ethereum_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ledgerwatch/erigon-lib/gointerfaces/execution"
"github.com/ledgerwatch/erigon-lib/kv/dbutils"
"github.com/ledgerwatch/erigon-lib/wrap"
"github.com/ledgerwatch/erigon/eth/ethconfig"
"github.com/ledgerwatch/log/v3"
"golang.org/x/sync/semaphore"
"google.golang.org/protobuf/types/known/emptypb"
Expand Down Expand Up @@ -59,7 +58,6 @@ type EthereumExecutionModule struct {

// configuration
config *chain.Config
syncCfg ethconfig.Sync
historyV3 bool
// consensus
engine consensus.Engine
Expand All @@ -73,8 +71,7 @@ func NewEthereumExecutionModule(blockReader services.FullBlockReader, db kv.RwDB
hook *stages.Hook, accumulator *shards.Accumulator,
stateChangeConsumer shards.StateChangeConsumer,
logger log.Logger, engine consensus.Engine,
historyV3 bool, syncCfg ethconfig.Sync,
ctx context.Context,
historyV3 bool, ctx context.Context,
) *EthereumExecutionModule {
return &EthereumExecutionModule{
blockReader: blockReader,
Expand All @@ -90,10 +87,7 @@ func NewEthereumExecutionModule(blockReader services.FullBlockReader, db kv.RwDB
accumulator: accumulator,
stateChangeConsumer: stateChangeConsumer,
engine: engine,

historyV3: historyV3,
syncCfg: syncCfg,
bacgroundCtx: ctx,
bacgroundCtx: ctx,
}
}

Expand Down
Loading

0 comments on commit a013ec2

Please sign in to comment.