Skip to content

Commit

Permalink
protection from starting e2 git branch on e3 db (#10150)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored May 1, 2024
1 parent 1558fc7 commit 24a789b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
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

0 comments on commit 24a789b

Please sign in to comment.