diff --git a/.github/workflows/systest.yml b/.github/workflows/systest.yml index dfd15b59e5a..86d38aeacca 100644 --- a/.github/workflows/systest.yml +++ b/.github/workflows/systest.yml @@ -5,7 +5,7 @@ on: inputs: test_name: description: "Test to run" - default: "." + default: "TestCheckpoint" log_level: description: "Log level" default: "debug" diff --git a/cmd/bootstrapper/server.go b/cmd/bootstrapper/server.go index 5f9986ffb23..af4159b69c5 100644 --- a/cmd/bootstrapper/server.go +++ b/cmd/bootstrapper/server.go @@ -134,8 +134,40 @@ func (s *Server) Start(ctx context.Context, errCh chan error, params *NetworkPar // start generating fallback data s.eg.Go( func() error { - s.genDataLoop(ctx, errCh, last, params.updateActiveSetTime, s.GenFallbackActiveSet) - return nil + var ( + errs = 0 + maxErrs = 10 + timer *time.Timer + timeC <-chan time.Time + backoff = 10 * time.Second + ) + for epoch := last; ; epoch++ { + wait := time.Until(params.updateActiveSetTime(epoch)) + select { + case <-timeC: + if err := s.GenFallbackActiveSet(ctx, epoch); err != nil { + errs++ + timer.Reset(backoff) + continue + } + errs = 0 + if !timer.Stop() { + <-timer.C + } + timeC = nil + case <-time.After(wait): + if err := s.GenFallbackActiveSet(ctx, epoch); err != nil { + timer = time.NewTimer(backoff) + timeC = timer.C + if errs >= maxErrs { + errCh <- err + return err + } + } + case <-ctx.Done(): + return ctx.Err() + } + } }) s.eg.Go( func() error { diff --git a/config/presets/fastnet.go b/config/presets/fastnet.go index e616057ac07..9d7604eba4b 100644 --- a/config/presets/fastnet.go +++ b/config/presets/fastnet.go @@ -51,7 +51,8 @@ func fastnet() config.Config { conf.LayerDuration = 15 * time.Second conf.Sync.Interval = 5 * time.Second conf.Sync.GossipDuration = 10 * time.Second - conf.Sync.AtxSync.EpochInfoInterval = 20 * time.Second + conf.Sync.AtxSync.EpochInfoInterval = 1 * time.Second + conf.Sync.AtxSync.EpochInfoPeers = 10 conf.Sync.MalSync.IDRequestInterval = 20 * time.Second conf.LayersPerEpoch = 4 conf.RegossipAtxInterval = 30 * time.Second diff --git a/syncer/atxsync/syncer.go b/syncer/atxsync/syncer.go index 3fc77c805e0..9373bc56877 100644 --- a/syncer/atxsync/syncer.go +++ b/syncer/atxsync/syncer.go @@ -41,8 +41,8 @@ func DefaultConfig() Config { return Config{ EpochInfoInterval: 4 * time.Hour, AtxsBatch: 1000, - RequestsLimit: 10, - EpochInfoPeers: 2, + RequestsLimit: 100, + EpochInfoPeers: 20, ProgressFraction: 0.1, ProgressInterval: 20 * time.Minute, } diff --git a/systest/cluster/nodes.go b/systest/cluster/nodes.go index aca5764a1ef..7da11789b4e 100644 --- a/systest/cluster/nodes.go +++ b/systest/cluster/nodes.go @@ -62,11 +62,11 @@ var ( "requests and limits for smesher container", &apiv1.ResourceRequirements{ Requests: apiv1.ResourceList{ - apiv1.ResourceCPU: resource.MustParse("1.3"), + apiv1.ResourceCPU: resource.MustParse("0.8"), apiv1.ResourceMemory: resource.MustParse("800Mi"), }, Limits: apiv1.ResourceList{ - apiv1.ResourceCPU: resource.MustParse("1.3"), + apiv1.ResourceCPU: resource.MustParse("0.8"), apiv1.ResourceMemory: resource.MustParse("800Mi"), }, }, diff --git a/systest/tests/checkpoint_test.go b/systest/tests/checkpoint_test.go index bd74e489c59..b6f030a472a 100644 --- a/systest/tests/checkpoint_test.go +++ b/systest/tests/checkpoint_test.go @@ -32,6 +32,21 @@ func reuseCluster(tctx *testcontext.Context, restoreLayer uint32) (*cluster.Clus ) } +func TestCheckpoint1(t *testing.T) { + t.Parallel() + TestCheckpoint(t) +} + +func TestCheckpoint2(t *testing.T) { + t.Parallel() + TestCheckpoint(t) +} + +func TestCheckpoint3(t *testing.T) { + t.Parallel() + TestCheckpoint(t) +} + func TestCheckpoint(t *testing.T) { // TODO(mafa): add new test with multi-smeshing nodes t.Parallel() @@ -169,7 +184,7 @@ func TestCheckpoint(t *testing.T) { } tctx.Log.Infow("waiting for all miners to be smeshing", "last epoch", checkpointEpoch+2) - ensureSmeshing(t, tctx, cl, checkpointEpoch+2) + ensureSmeshing(t, tctx, cl, checkpointEpoch+4) // increase the cluster size to the original test size tctx.Log.Info("cluster size changed to ", size) @@ -177,7 +192,7 @@ func TestCheckpoint(t *testing.T) { require.NoError(t, cl.AddSmeshers(tctx, addedLater)) tctx.Log.Infow("waiting for all miners to be smeshing", "last epoch", lastEpoch) - ensureSmeshing(t, tctx, cl, lastEpoch) + ensureSmeshing(t, tctx, cl, lastEpoch+4) } func ensureSmeshing(t *testing.T, tctx *testcontext.Context, cl *cluster.Cluster, stop uint32) { diff --git a/systest/tests/distributed_post_verification_test.go b/systest/tests/distributed_post_verification_test.go index 7b78ce6d5c5..c33552afc24 100644 --- a/systest/tests/distributed_post_verification_test.go +++ b/systest/tests/distributed_post_verification_test.go @@ -39,6 +39,7 @@ import ( ) func TestPostMalfeasanceProof(t *testing.T) { + t.Skip() t.Parallel() testDir := t.TempDir() diff --git a/systest/tests/equivocation_test.go b/systest/tests/equivocation_test.go index 262f1ffe0a8..c85471b9a54 100644 --- a/systest/tests/equivocation_test.go +++ b/systest/tests/equivocation_test.go @@ -17,6 +17,7 @@ import ( ) func TestEquivocation(t *testing.T) { + t.Skip() t.Parallel() const bootnodes = 2 cctx := testcontext.New(t) diff --git a/systest/tests/fallback_test.go b/systest/tests/fallback_test.go index d1c265665c5..a923c2568df 100644 --- a/systest/tests/fallback_test.go +++ b/systest/tests/fallback_test.go @@ -19,6 +19,7 @@ import ( ) func TestFallback(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) diff --git a/systest/tests/nodes_test.go b/systest/tests/nodes_test.go index b68667dd4ce..ab8e2c2ab20 100644 --- a/systest/tests/nodes_test.go +++ b/systest/tests/nodes_test.go @@ -22,6 +22,7 @@ func init() { } func TestAddNodes(t *testing.T) { + t.Skip() t.Parallel() const ( @@ -125,6 +126,7 @@ func TestAddNodes(t *testing.T) { } func TestFailedNodes(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) diff --git a/systest/tests/partition_test.go b/systest/tests/partition_test.go index 89431bfdfe0..628c644218f 100644 --- a/systest/tests/partition_test.go +++ b/systest/tests/partition_test.go @@ -176,6 +176,7 @@ func testPartition(t *testing.T, tctx *testcontext.Context, cl *cluster.Cluster, } func TestPartition_30_70(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) @@ -190,6 +191,7 @@ func TestPartition_30_70(t *testing.T) { } func TestPartition_50_50(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) diff --git a/systest/tests/poets_test.go b/systest/tests/poets_test.go index 92d10d42c4c..a17266176a0 100644 --- a/systest/tests/poets_test.go +++ b/systest/tests/poets_test.go @@ -26,6 +26,7 @@ var layersToCheck = parameters.Int( ) func TestPoetsFailures(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) tctx.Log.Debug("TestPoetsFailures start") @@ -123,6 +124,7 @@ func testPoetDies(t *testing.T, tctx *testcontext.Context, cl *cluster.Cluster) } func TestNodesUsingDifferentPoets(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) if tctx.PoetSize < 2 { @@ -213,6 +215,7 @@ func TestNodesUsingDifferentPoets(t *testing.T) { // TODO: When PoW support is removed, convert this test to verify only the cert path. // https://github.com/spacemeshos/go-spacemesh/issues/5212 func TestRegisteringInPoetWithPowAndCert(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t) tctx.PoetSize = 2 diff --git a/systest/tests/smeshing_test.go b/systest/tests/smeshing_test.go index 3bc8ad8ede1..7de82671b29 100644 --- a/systest/tests/smeshing_test.go +++ b/systest/tests/smeshing_test.go @@ -29,6 +29,7 @@ import ( ) func TestSmeshing(t *testing.T) { + t.Skip() // TODO(mafa): add new test with multi-smeshing nodes t.Parallel() diff --git a/systest/tests/timeskew_test.go b/systest/tests/timeskew_test.go index 5c5c0069f0c..fc1172dd838 100644 --- a/systest/tests/timeskew_test.go +++ b/systest/tests/timeskew_test.go @@ -14,6 +14,7 @@ import ( ) func TestShortTimeskew(t *testing.T) { + t.Skip() t.Parallel() tctx := testcontext.New(t)