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

[backport] disable mesh agreement #5548

Merged
merged 2 commits into from
Feb 13, 2024
Merged
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

See [RELEASE](./RELEASE.md) for workflow instructions.

## UNRELEASED

### Improvements

* [#5548](https://github.com/spacemeshos/go-spacemesh/pull/5548) Disable mesh aggremenet sync protocol.

It reduces number of requests for historical activation ids.

## Release v1.3.9

### Improvements
Expand Down
1 change: 1 addition & 0 deletions config/mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func MainnetConfig() Config {
Standalone: false,
GossipDuration: 50 * time.Second,
OutOfSyncThresholdLayers: 36, // 3h
DisableMeshAgreement: true,
DisableAtxReconciliation: true,
},
Recovery: checkpoint.DefaultConfig(),
Expand Down
2 changes: 1 addition & 1 deletion syncer/state_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *Syncer) processLayers(ctx context.Context) error {
Warning("failed to adopt peer opinions", lid, log.Err(err))
}
}
if s.IsSynced(ctx) {
if s.IsSynced(ctx) && !s.cfg.DisableMeshAgreement {
if err = s.checkMeshAgreement(ctx, lid, opinions); err != nil &&
errors.Is(err, errMeshHashDiverged) {
s.logger.WithContext(ctx).
Expand Down
1 change: 1 addition & 0 deletions syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Config struct {
MaxStaleDuration time.Duration
Standalone bool
GossipDuration time.Duration
DisableMeshAgreement bool `mapstructure:"disable-mesh-agreement"`
DisableAtxReconciliation bool `mapstructure:"disable-atx-reconciliation"`
OutOfSyncThresholdLayers uint32 `mapstructure:"out-of-sync-threshold"`
}
Expand Down
Loading