Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protection from starting e2 git branch on e3 db #10150

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion turbo/cli/default_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ var DefaultFlags = []cli.Flag{
&utils.GpoBlocksFlag,
&utils.GpoPercentileFlag,
&utils.InsecureUnlockAllowedFlag,
&utils.HistoryV3Flag,
&utils.IdentityFlag,
&utils.CliqueSnapshotCheckpointIntervalFlag,
&utils.CliqueSnapshotInmemorySnapshotsFlag,
Expand Down
4 changes: 4 additions & 0 deletions turbo/snapshotsync/snapshotsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package snapshotsync
import (
"context"
"encoding/binary"
"errors"
"fmt"
"runtime"
"strings"
Expand Down Expand Up @@ -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) {
AskAlexSharov marked this conversation as resolved.
Show resolved Hide resolved
return err
}
log.Error(fmt.Sprintf("[%s] call downloader", logPrefix), "err", err)
time.Sleep(10 * time.Second)
continue
Expand Down
Loading