forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Consensus] introduce consensus only simtests (MystenLabs#20683)
## Description PR is introducing the framework to enable us run Consensus-only simtests. Looking on the existing sui-swarm it would be a bit challenging to reuse as APIs are different and especially when we need to access consensus specific components. The PR is using similar patterns that have been used in sui-swarm but I am expecting to refine this as we go. This might be a good start for now. A simple simtest method has been added for the time being `test_committee_start_simple` . Eventually we want to replace the tests on `authority_node` and add a few more cases. Motivation to do this has been the Garbage Collection work when investigating some edge cases where reproducibility was important to confirm the issues. Example to run this simtest with additional logging, a high regional variance in latency, and outputting the result in `output.txt` ``` SUI_SIM_CONFIG=regional_high_variance RUST_LOG=info,consensus_core=debug cargo simtest test_committee_start --nocapture > output.txt 2>&1 ``` ## Test plan CI --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK:
- Loading branch information
Showing
10 changed files
with
522 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "consensus-simtests" | ||
version = "0.1.0" | ||
license = "Apache-2.0" | ||
authors = ["Mysten Labs <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[target.'cfg(msim)'.dependencies] | ||
sui-simulator.workspace = true | ||
anyhow.workspace = true | ||
arc-swap.workspace = true | ||
consensus-config.workspace = true | ||
consensus-core.workspace = true | ||
mysten-metrics.workspace = true | ||
mysten-network.workspace = true | ||
parking_lot.workspace = true | ||
prometheus.workspace = true | ||
rand.workspace = true | ||
sui-config.workspace = true | ||
sui-macros.workspace = true | ||
sui-protocol-config.workspace = true | ||
tokio.workspace = true | ||
tokio-stream.workspace = true | ||
tokio-util.workspace = true | ||
tracing.workspace = true | ||
typed-store.workspace = true | ||
tempfile.workspace = true | ||
telemetry-subscribers.workspace = true |
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,9 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#[cfg(msim)] | ||
mod node; | ||
|
||
#[cfg(msim)] | ||
#[path = "tests/simtests.rs"] | ||
mod simtests; |
Oops, something went wrong.