mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-31 13:16:59 +00:00
e2e: syncing nodes start from height 6
The snapshot height can be 5 and syncing nodes should start after this height to avoid shutting down due to missing snapshots.
This commit is contained in:
@@ -61,7 +61,7 @@ const (
|
||||
|
||||
// lightBlockResponseTimeout is how long the dispatcher waits for a peer to
|
||||
// return a light block
|
||||
lightBlockResponseTimeout = 25 * time.Second
|
||||
lightBlockResponseTimeout = 20 * time.Second
|
||||
|
||||
// consensusParamsResponseTimeout is the time the p2p state provider waits
|
||||
// before performing a secondary call
|
||||
|
||||
@@ -173,14 +173,14 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
// Next, we generate validators. We make sure a BFT quorum of validators start
|
||||
// at the initial height, and that we have two archive nodes. We also set up
|
||||
// the initial validator set, and validator set updates for delayed nodes.
|
||||
nextStartAt := manifest.InitialHeight + 5
|
||||
nextStartAt := manifest.InitialHeight + 6
|
||||
quorum := numValidators*2/3 + 1
|
||||
for i := 1; i <= numValidators; i++ {
|
||||
startAt := int64(0)
|
||||
if i > quorum && numSyncingNodes < 2 && r.Float64() >= 0.25 {
|
||||
numSyncingNodes++
|
||||
startAt = nextStartAt
|
||||
nextStartAt += 5
|
||||
nextStartAt += 6
|
||||
}
|
||||
name := fmt.Sprintf("validator%02d", i)
|
||||
node := generateNode(r, manifest, e2e.ModeValidator, startAt, i <= 2)
|
||||
@@ -190,7 +190,7 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
if startAt == 0 {
|
||||
(*manifest.Validators)[name] = int64(30 + r.Intn(71))
|
||||
} else {
|
||||
manifest.ValidatorUpdates[fmt.Sprint(startAt+5)] = map[string]int64{
|
||||
manifest.ValidatorUpdates[fmt.Sprint(startAt+6)] = map[string]int64{
|
||||
name: int64(30 + r.Intn(71)),
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
if numSyncingNodes < 2 && r.Float64() >= 0.5 {
|
||||
numSyncingNodes++
|
||||
startAt = nextStartAt
|
||||
nextStartAt += 5
|
||||
nextStartAt += 6
|
||||
}
|
||||
node := generateNode(r, manifest, e2e.ModeFull, startAt, false)
|
||||
|
||||
@@ -276,7 +276,7 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
|
||||
|
||||
// lastly, set up the light clients
|
||||
for i := 1; i <= numLightClients; i++ {
|
||||
startAt := manifest.InitialHeight + 5
|
||||
startAt := manifest.InitialHeight + 6
|
||||
|
||||
node := generateLightNode(r, startAt+(5*int64(i)), lightProviders)
|
||||
|
||||
@@ -316,7 +316,7 @@ func generateNode(
|
||||
|
||||
if startAt > 0 {
|
||||
node.StateSync = nodeStateSyncs.Choose(r)
|
||||
if manifest.InitialHeight-startAt <= 5 && node.StateSync == e2e.StateSyncDisabled {
|
||||
if manifest.InitialHeight-startAt <= 6 && node.StateSync == e2e.StateSyncDisabled {
|
||||
// avoid needing to blocsync more than five total blocks.
|
||||
node.StateSync = uniformSetChoice([]string{
|
||||
e2e.StateSyncP2P,
|
||||
|
||||
Reference in New Issue
Block a user