mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 06:31:57 +00:00
Merge branch 'main' into feature/abci++vef
This commit is contained in:
@@ -68,6 +68,10 @@ type Manifest struct {
|
||||
ProcessProposalDelay time.Duration `toml:"process_proposal_delay"`
|
||||
CheckTxDelay time.Duration `toml:"check_tx_delay"`
|
||||
// TODO: add vote extension and finalize block delay (@cmwaters)
|
||||
|
||||
LoadTxSizeBytes int `toml:"load_tx_size_bytes"`
|
||||
LoadTxBatchSize int `toml:"load_tx_batch_size"`
|
||||
LoadTxConnections int `toml:"load_tx_connections"`
|
||||
}
|
||||
|
||||
// ManifestNode represents a node in a testnet manifest.
|
||||
@@ -145,6 +149,11 @@ type ManifestNode struct {
|
||||
// pause: temporarily pauses (freezes) the node
|
||||
// restart: restarts the node, shutting it down with SIGTERM
|
||||
Perturb []string `toml:"perturb"`
|
||||
|
||||
// SendNoLoad determines if the e2e test should send load to this node.
|
||||
// It defaults to false so unless the configured, the node will
|
||||
// receive load.
|
||||
SendNoLoad bool `toml:"send_no_laod"`
|
||||
}
|
||||
|
||||
// Save saves the testnet manifest to a file.
|
||||
|
||||
@@ -21,6 +21,10 @@ import (
|
||||
const (
|
||||
randomSeed int64 = 2308084734268
|
||||
proxyPortFirst uint32 = 5701
|
||||
|
||||
defaultBatchSize = 2
|
||||
defaultConnections = 1
|
||||
defaultTxSizeBytes = 1024
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -63,6 +67,9 @@ type Testnet struct {
|
||||
Nodes []*Node
|
||||
KeyType string
|
||||
Evidence int
|
||||
LoadTxSizeBytes int
|
||||
LoadTxBatchSize int
|
||||
LoadTxConnections int
|
||||
ABCIProtocol string
|
||||
PrepareProposalDelay time.Duration
|
||||
ProcessProposalDelay time.Duration
|
||||
@@ -92,6 +99,9 @@ type Node struct {
|
||||
Seeds []*Node
|
||||
PersistentPeers []*Node
|
||||
Perturbations []Perturbation
|
||||
|
||||
// SendNoLoad determines if the e2e test should send load to this node.
|
||||
SendNoLoad bool
|
||||
}
|
||||
|
||||
// LoadTestnet loads a testnet from a manifest file, using the filename to
|
||||
@@ -129,6 +139,9 @@ func NewTestnetFromManifest(manifest Manifest, file string, ifd InfrastructureDa
|
||||
ValidatorUpdates: map[int64]map[*Node]int64{},
|
||||
Nodes: []*Node{},
|
||||
Evidence: manifest.Evidence,
|
||||
LoadTxSizeBytes: manifest.LoadTxSizeBytes,
|
||||
LoadTxBatchSize: manifest.LoadTxBatchSize,
|
||||
LoadTxConnections: manifest.LoadTxConnections,
|
||||
ABCIProtocol: manifest.ABCIProtocol,
|
||||
PrepareProposalDelay: manifest.PrepareProposalDelay,
|
||||
ProcessProposalDelay: manifest.ProcessProposalDelay,
|
||||
@@ -143,6 +156,15 @@ func NewTestnetFromManifest(manifest Manifest, file string, ifd InfrastructureDa
|
||||
if testnet.ABCIProtocol == "" {
|
||||
testnet.ABCIProtocol = string(ProtocolBuiltin)
|
||||
}
|
||||
if testnet.LoadTxConnections == 0 {
|
||||
testnet.LoadTxConnections = defaultConnections
|
||||
}
|
||||
if testnet.LoadTxBatchSize == 0 {
|
||||
testnet.LoadTxBatchSize = defaultBatchSize
|
||||
}
|
||||
if testnet.LoadTxSizeBytes == 0 {
|
||||
testnet.LoadTxSizeBytes = defaultTxSizeBytes
|
||||
}
|
||||
|
||||
// Set up nodes, in alphabetical order (IPs and ports get same order).
|
||||
nodeNames := []string{}
|
||||
@@ -177,6 +199,7 @@ func NewTestnetFromManifest(manifest Manifest, file string, ifd InfrastructureDa
|
||||
SnapshotInterval: nodeManifest.SnapshotInterval,
|
||||
RetainBlocks: nodeManifest.RetainBlocks,
|
||||
Perturbations: []Perturbation{},
|
||||
SendNoLoad: nodeManifest.SendNoLoad,
|
||||
}
|
||||
if node.StartAt == testnet.InitialHeight {
|
||||
node.StartAt = 0 // normalize to 0 for initial nodes, since code expects this
|
||||
|
||||
Reference in New Issue
Block a user