From bbfb19a7301a04d85930a78630d9b20ed342eaef Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 1 May 2024 08:34:09 +0700 Subject: [PATCH 1/3] save --- cmd/utils/flags.go | 5 ----- eth/backend.go | 3 +++ turbo/cli/default_flags.go | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index a175bc24685..9472ea08d9f 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -661,10 +661,6 @@ var ( Usage: "Metrics HTTP server listening port", Value: metrics.DefaultConfig.Port, } - HistoryV3Flag = cli.BoolFlag{ - Name: "experimental.history.v3", - Usage: "(Also known as Erigon3) Not recommended yet: Can't change this flag after node creation. New DB and Snapshots format of history allows: parallel blocks execution, get state as of given transaction without executing whole block.", - } CliqueSnapshotCheckpointIntervalFlag = cli.UintFlag{ Name: "clique.checkpoint", @@ -1804,7 +1800,6 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *nodecfg.Config, cfg *ethconfig.C setCaplin(ctx, cfg) cfg.Ethstats = ctx.String(EthStatsURLFlag.Name) - cfg.HistoryV3 = ctx.Bool(HistoryV3Flag.Name) if ctx.IsSet(RPCGlobalGasCapFlag.Name) { cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name) diff --git a/eth/backend.go b/eth/backend.go index 94c77703f22..5da94c18d7f 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -263,6 +263,9 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger return nil, err } + if config.HistoryV3 { + return nil, errors.New("seems you using erigon2 git branch on erigon3 DB") + } ctx, ctxCancel := context.WithCancel(context.Background()) // kv_remote architecture does blocks on stream.Send - means current architecture require unlimited amount of txs to provide good throughput diff --git a/turbo/cli/default_flags.go b/turbo/cli/default_flags.go index ecc99c3a513..251094811bf 100644 --- a/turbo/cli/default_flags.go +++ b/turbo/cli/default_flags.go @@ -128,7 +128,6 @@ var DefaultFlags = []cli.Flag{ &utils.GpoBlocksFlag, &utils.GpoPercentileFlag, &utils.InsecureUnlockAllowedFlag, - &utils.HistoryV3Flag, &utils.IdentityFlag, &utils.CliqueSnapshotCheckpointIntervalFlag, &utils.CliqueSnapshotInmemorySnapshotsFlag, From a98e9ea98c2c5b7751463cb617627eaf63eb0e9a Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 1 May 2024 08:45:09 +0700 Subject: [PATCH 2/3] save --- turbo/snapshotsync/snapshotsync.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/turbo/snapshotsync/snapshotsync.go b/turbo/snapshotsync/snapshotsync.go index efbcefc74d9..c4c7ee99f54 100644 --- a/turbo/snapshotsync/snapshotsync.go +++ b/turbo/snapshotsync/snapshotsync.go @@ -3,6 +3,7 @@ package snapshotsync import ( "context" "encoding/binary" + "errors" "fmt" "runtime" "strings" @@ -125,6 +126,9 @@ func WaitForDownloader(ctx context.Context, logPrefix string, histV3, blobs bool default: } if err := RequestSnapshotsDownload(ctx, downloadRequest, snapshotDownloader); err != nil { + if errors.Is(err, context.Canceled) { + return err + } log.Error(fmt.Sprintf("[%s] call downloader", logPrefix), "err", err) time.Sleep(10 * time.Second) continue From 59d5187a0ede14d2581584247beee4f79c570136 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 1 May 2024 16:08:28 +0700 Subject: [PATCH 3/3] save --- turbo/snapshotsync/snapshotsync.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/turbo/snapshotsync/snapshotsync.go b/turbo/snapshotsync/snapshotsync.go index c4c7ee99f54..efbcefc74d9 100644 --- a/turbo/snapshotsync/snapshotsync.go +++ b/turbo/snapshotsync/snapshotsync.go @@ -3,7 +3,6 @@ package snapshotsync import ( "context" "encoding/binary" - "errors" "fmt" "runtime" "strings" @@ -126,9 +125,6 @@ func WaitForDownloader(ctx context.Context, logPrefix string, histV3, blobs bool default: } if err := RequestSnapshotsDownload(ctx, downloadRequest, snapshotDownloader); err != nil { - if errors.Is(err, context.Canceled) { - return err - } log.Error(fmt.Sprintf("[%s] call downloader", logPrefix), "err", err) time.Sleep(10 * time.Second) continue