statesync: improve e2e test outcomes (#6378)

I believe that this, in my testing seems to help the e2e state-sync
tests complete more reliably, by fixing some potential, range-related
slice building, as well as the way the test app hashes snapshots.

Additionally, and I'm not sure if we want to do this, but I added this
hook to the reactor that re-sends the request for snapshots during the
retry. This helps in tests prevent systems from getting stuck, but I
think in reality, it might create more traffic, and operators would
just restart a state-syncing node to get a similar effect.
This commit is contained in:
Sam Kleinman
2021-04-21 16:00:15 +00:00
committed by GitHub
parent fea04c8e67
commit d36a5905a6
7 changed files with 44 additions and 30 deletions
+4
View File
@@ -834,6 +834,10 @@ func (cfg *StateSyncConfig) ValidateBasic() error {
return errors.New("found empty rpc-servers entry")
}
}
if cfg.DiscoveryTime != 0 && cfg.DiscoveryTime < 5*time.Second {
return errors.New("discovery time must be 0s or greater than five seconds")
}
if cfg.TrustPeriod <= 0 {
return errors.New("trusted-period is required")
}