@ -44,9 +44,10 @@ var (
"tcp" : 20 ,
"tcp" : 20 ,
"unix" : 10 ,
"unix" : 10 ,
}
}
// FIXME: v2 disabled due to flake
nodeBlockSyncs = uniformChoice { "v0" } // "v2"
nodeMempools = uniformChoice { "v0" , "v1" }
nodeMempools = weightedChoice {
"v0" : 20 ,
"v1" : 80 ,
}
nodeStateSyncs = weightedChoice {
nodeStateSyncs = weightedChoice {
e2e . StateSyncDisabled : 10 ,
e2e . StateSyncDisabled : 10 ,
e2e . StateSyncP2P : 45 ,
e2e . StateSyncP2P : 45 ,
@ -54,8 +55,12 @@ var (
}
}
nodePersistIntervals = uniformChoice { 0 , 1 , 5 }
nodePersistIntervals = uniformChoice { 0 , 1 , 5 }
nodeSnapshotIntervals = uniformChoice { 0 , 5 }
nodeSnapshotIntervals = uniformChoice { 0 , 5 }
nodeRetainBlocks = uniformChoice { 0 , 2 * int ( e2e . EvidenceAgeHeight ) , 4 * int ( e2e . EvidenceAgeHeight ) }
nodePerturbations = probSetChoice {
nodeRetainBlocks = uniformChoice {
0 ,
2 * int ( e2e . EvidenceAgeHeight ) ,
4 * int ( e2e . EvidenceAgeHeight ) ,
}
nodePerturbations = probSetChoice {
"disconnect" : 0.1 ,
"disconnect" : 0.1 ,
"pause" : 0.1 ,
"pause" : 0.1 ,
"kill" : 0.1 ,
"kill" : 0.1 ,
@ -236,13 +241,9 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
// choose one of the seeds
// choose one of the seeds
manifest . Nodes [ name ] . Seeds = uniformSetChoice ( seedNames ) . Choose ( r )
manifest . Nodes [ name ] . Seeds = uniformSetChoice ( seedNames ) . Choose ( r )
} else if i > 0 {
} else if i > 1 && r . Float64 ( ) >= 0.5 {
peers := uniformSetChoice ( peerNames [ : i ] )
peers := uniformSetChoice ( peerNames [ : i ] )
if manifest . Nodes [ name ] . StateSync == e2e . StateSyncP2P {
manifest . Nodes [ name ] . PersistentPeers = peers . ChooseAtLeast ( r , 2 )
} else {
manifest . Nodes [ name ] . PersistentPeers = peers . Choose ( r )
}
manifest . Nodes [ name ] . PersistentPeers = peers . ChooseAtLeast ( r , 2 )
}
}
}
}
@ -250,9 +251,7 @@ func generateTestnet(r *rand.Rand, opt map[string]interface{}) (e2e.Manifest, er
for i := 1 ; i <= numLightClients ; i ++ {
for i := 1 ; i <= numLightClients ; i ++ {
startAt := manifest . InitialHeight + 5
startAt := manifest . InitialHeight + 5
node := generateLightNode (
r , startAt + ( 5 * int64 ( i ) ) , lightProviders ,
)
node := generateLightNode ( r , startAt + ( 5 * int64 ( i ) ) , lightProviders )
manifest . Nodes [ fmt . Sprintf ( "light%02d" , i ) ] = node
manifest . Nodes [ fmt . Sprintf ( "light%02d" , i ) ] = node
@ -278,8 +277,7 @@ func generateNode(
Database : nodeDatabases . Choose ( r ) ,
Database : nodeDatabases . Choose ( r ) ,
ABCIProtocol : nodeABCIProtocols . Choose ( r ) ,
ABCIProtocol : nodeABCIProtocols . Choose ( r ) ,
PrivvalProtocol : nodePrivvalProtocols . Choose ( r ) ,
PrivvalProtocol : nodePrivvalProtocols . Choose ( r ) ,
BlockSync : nodeBlockSyncs . Choose ( r ) . ( string ) ,
Mempool : nodeMempools . Choose ( r ) . ( string ) ,
Mempool : nodeMempools . Choose ( r ) ,
StateSync : e2e . StateSyncDisabled ,
StateSync : e2e . StateSyncDisabled ,
PersistInterval : ptrUint64 ( uint64 ( nodePersistIntervals . Choose ( r ) . ( int ) ) ) ,
PersistInterval : ptrUint64 ( uint64 ( nodePersistIntervals . Choose ( r ) . ( int ) ) ) ,
SnapshotInterval : uint64 ( nodeSnapshotIntervals . Choose ( r ) . ( int ) ) ,
SnapshotInterval : uint64 ( nodeSnapshotIntervals . Choose ( r ) . ( int ) ) ,
@ -326,10 +324,6 @@ func generateNode(
}
}
}
}
if node . StateSync != e2e . StateSyncDisabled {
node . BlockSync = "v0"
}
return & node
return & node
}
}