e2e adapted to mempool v1; prio pool is default now

This commit is contained in:
Jasmina Malicevic
2022-06-23 16:24:51 +02:00
parent f2ab32e055
commit fdb399f0ed
5 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -725,7 +725,7 @@ type MempoolConfig struct {
// DefaultMempoolConfig returns a default configuration for the Tendermint mempool
func DefaultMempoolConfig() *MempoolConfig {
return &MempoolConfig{
Version: MempoolV0,
Version: MempoolV1,
Recheck: true,
Broadcast: true,
WalPath: "",
+2
View File
@@ -32,6 +32,7 @@ var (
// FIXME: v2 disabled due to flake
nodeFastSyncs = uniformChoice{"v0"} // "v2"
nodeStateSyncs = uniformChoice{false, true}
nodeMempools = uniformChoice{"v0", "v1"}
nodePersistIntervals = uniformChoice{0, 1, 5}
nodeSnapshotIntervals = uniformChoice{0, 3}
nodeRetainBlocks = uniformChoice{0, 1, 5}
@@ -210,6 +211,7 @@ func generateNode(
Database: nodeDatabases.Choose(r).(string),
PrivvalProtocol: nodePrivvalProtocols.Choose(r).(string),
FastSync: nodeFastSyncs.Choose(r).(string),
Mempool: nodeMempools.Choose(r).(string),
StateSync: nodeStateSyncs.Choose(r).(bool) && startAt > 0,
PersistInterval: ptrUint64(uint64(nodePersistIntervals.Choose(r).(int))),
SnapshotInterval: uint64(nodeSnapshotIntervals.Choose(r).(int)),
+2 -1
View File
@@ -91,7 +91,8 @@ type ManifestNode struct {
// FastSync specifies the fast sync mode: "" (disable), "v0", "v1", or "v2".
// Defaults to disabled.
FastSync string `toml:"fast_sync"`
// Mempool specifies which version of mempool to use. Either "v0" or "v1"
Mempool string `toml:"mempool_version"`
// StateSync enables state sync. The runner automatically configures trusted
// block hashes and RPC servers. At least one node in the network must have
// SnapshotInterval set to non-zero, and the state syncing node must have
+7
View File
@@ -75,6 +75,7 @@ type Node struct {
StartAt int64
FastSync string
StateSync bool
Mempool string
Database string
ABCIProtocol Protocol
PrivvalProtocol Protocol
@@ -157,6 +158,7 @@ func LoadTestnet(file string) (*Testnet, error) {
PrivvalProtocol: ProtocolFile,
StartAt: nodeManifest.StartAt,
FastSync: nodeManifest.FastSync,
Mempool: nodeManifest.Mempool,
StateSync: nodeManifest.StateSync,
PersistInterval: 1,
SnapshotInterval: nodeManifest.SnapshotInterval,
@@ -309,6 +311,11 @@ func (n Node) Validate(testnet Testnet) error {
case "", "v0", "v1", "v2":
default:
return fmt.Errorf("invalid fast sync setting %q", n.FastSync)
switch n.Mempool {
case "", "v0", "v1":
default:
return fmt.Errorf("invalid mempool version %q", n.Mempool)
}
}
switch n.Database {
case "goleveldb", "cleveldb", "boltdb", "rocksdb", "badgerdb":
+3
View File
@@ -283,6 +283,9 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) {
default:
return nil, fmt.Errorf("unexpected mode %q", node.Mode)
}
if node.Mempool != "" {
cfg.Mempool.Version = node.Mempool
}
if node.FastSync == "" {
cfg.FastSyncMode = false