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

[Merged by Bors] - Remove scan malfeasant flag #6229

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ See [RELEASE](./RELEASE.md) for workflow instructions.

### Upgrade information

The command line flag `--scan-malfeasant-atxs` has been removed. All malfeasant ATXs before 1.6.0 have been marked as
such and the node will continue to scan new ATXs for their validity.

### Highlights

### Features
Expand Down Expand Up @@ -699,6 +702,7 @@ and permanent ineligibility for rewards.

* [#5494](https://github.com/spacemeshos/go-spacemesh/pull/5494)
Make routing discovery more configurable and less spammy by default.

* [#5511](https://github.com/spacemeshos/go-spacemesh/pull/5511)
Fix dialing peers on their private IPs, which was causing "portscan" complaints.

Expand Down
90 changes: 0 additions & 90 deletions activation/verify_state.go

This file was deleted.

69 changes: 0 additions & 69 deletions activation/verify_state_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ func AddFlags(flagSet *pflag.FlagSet, cfg *config.Config) (configPath *string) {
flagSet.DurationVar(&cfg.DatabasePruneInterval, "db-prune-interval",
cfg.DatabasePruneInterval, "configure interval for database pruning")

flagSet.BoolVar(&cfg.ScanMalfeasantATXs, "scan-malfeasant-atxs", cfg.ScanMalfeasantATXs,
"scan for malfeasant ATXs")

flagSet.BoolVar(&cfg.NoMainOverride, "no-main-override",
cfg.NoMainOverride, "force 'nomain' builds to run on the mainnet")

Expand Down
3 changes: 0 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ type BaseConfig struct {

PruneActivesetsFrom types.EpochID `mapstructure:"prune-activesets-from"`

// ScanMalfeasantATXs is a flag to enable scanning for malfeasant ATXs.
ScanMalfeasantATXs bool `mapstructure:"scan-malfeasant-atxs"`

NetworkHRP string `mapstructure:"network-hrp"`

// MinerGoodAtxsPercent is a threshold to decide if tortoise activeset should be
Expand Down
3 changes: 1 addition & 2 deletions config/mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ func MainnetConfig() Config {
DatabaseConnections: 16,
DatabasePruneInterval: 30 * time.Minute,
DatabaseVacuumState: 15,
PruneActivesetsFrom: 12, // starting from epoch 13 activesets below 12 will be pruned
ScanMalfeasantATXs: false, // opt-in
PruneActivesetsFrom: 12, // starting from epoch 13 activesets below 12 will be pruned
NetworkHRP: "sm",

LayerDuration: 5 * time.Minute,
Expand Down
9 changes: 0 additions & 9 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -2005,15 +2005,6 @@ func (app *App) setupDBs(ctx context.Context, lg log.Log) error {
datastore.WithConsensusCache(data),
)

if app.Config.ScanMalfeasantATXs {
app.log.With().Info("checking DB for malicious ATXs")
start = time.Now()
if err := activation.CheckPrevATXs(ctx, app.log.Zap(), app.db); err != nil {
return fmt.Errorf("malicious ATX check: %w", err)
}
app.log.With().Info("malicious ATX check completed", log.Duration("duration", time.Since(start)))
}

migrations, err = sql.LocalMigrations()
if err != nil {
return fmt.Errorf("load local migrations: %w", err)
Expand Down
Loading