-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e benchmark): introduces test manifest and its related utiliti…
…es (#3391) The first PR towards #3363 Closes #3457 There will be an additional follow-up PR to further refactor the `E2EThroughput`. The `E2EThroughput` has been successfully tested (with the changes in this PR) and is functioning properly. You may run: ``` go run ./test/e2e/benchmark -v ```
- Loading branch information
Showing
9 changed files
with
193 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ var DefaultResources = Resources{ | |
CPU: "300m", | ||
Volume: "1Gi", | ||
} | ||
|
||
const TxsimVersion = "a92de72" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package testnet | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/celestiaorg/celestia-app/v2/app" | ||
"github.com/celestiaorg/celestia-app/v2/app/encoding" | ||
"github.com/celestiaorg/celestia-app/v2/test/util/genesis" | ||
blobtypes "github.com/celestiaorg/celestia-app/v2/x/blob/types" | ||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types" | ||
) | ||
|
||
// Manifest defines the parameters for a testnet. | ||
type Manifest struct { | ||
ChainID string | ||
TestDuration time.Duration | ||
// Number of validators in the testnet | ||
Validators int | ||
// Number of tx clients (txsim for now) in the testnet; there will be 1 txclient per validator | ||
// if TXClients is less than Validators, the remaining validators will not have any txclients | ||
TxClients int | ||
// Self-delegation amount for validators | ||
SelfDelegation int64 | ||
// CelestiaAppVersion a specific version of the celestia-app container image within celestiaorg repository on GitHub's Container Registry i.e., https://github.com/celestiaorg/celestia-app/pkgs/container/celestia-app | ||
CelestiaAppVersion string | ||
// TxClientVersion a specific version of the txsim container image within celestiaorg repository on GitHub's Container Registry, i.e., https://github.com/celestiaorg/celestia-app/pkgs/container/txsim | ||
TxClientVersion string | ||
// Resource requirements for a validator node | ||
ValidatorResource Resources | ||
// Resource requirements for a tx client | ||
TxClientsResource Resources | ||
|
||
// tx client settings | ||
// Number of blobs per sequence | ||
BlobsPerSeq int | ||
// Number of blob sequences | ||
BlobSequences int | ||
// Size of blobs in bytes, e.g., "10000" (exact size) or "10000-20000" (min-max format) | ||
BlobSizes string | ||
|
||
// p2p configs | ||
// Bandwidth per peer in bytes per second | ||
PerPeerBandwidth int64 | ||
// consensus configs | ||
TimeoutCommit time.Duration | ||
TimeoutPropose time.Duration | ||
|
||
// Mempool configs | ||
// Mempool version | ||
Mempool string | ||
BroadcastTxs bool | ||
|
||
// prometheus configs | ||
Prometheus bool | ||
|
||
// consensus parameters | ||
MaxBlockBytes int64 | ||
|
||
// other configs | ||
UpgradeHeight int64 | ||
GovMaxSquareSize int64 | ||
} | ||
|
||
func (m *Manifest) GetGenesisModifiers() []genesis.Modifier { | ||
ecfg := encoding.MakeConfig(app.ModuleBasics) | ||
var modifiers []genesis.Modifier | ||
|
||
blobParams := blobtypes.DefaultParams() | ||
blobParams.GovMaxSquareSize = uint64(m.GovMaxSquareSize) | ||
modifiers = append(modifiers, genesis.SetBlobParams(ecfg.Codec, blobParams)) | ||
|
||
return modifiers | ||
} | ||
|
||
func (m *Manifest) GetConsensusParams() *tmproto.ConsensusParams { | ||
cparams := app.DefaultConsensusParams() | ||
cparams.Block.MaxBytes = m.MaxBlockBytes | ||
return cparams | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters