Expand description
§Mina Testing Scenarios
This module contains scenario-based tests for the Mina Rust node implementation. Scenarios are deterministic, ordered sequences of steps that test complex multi-node blockchain interactions.
§Documentation
For comprehensive documentation on the testing framework and available scenarios, see:
- Scenario Tests - Main scenario testing documentation
- Testing Framework - Overall testing architecture
- Network Connectivity - Network connectivity testing details
§Usage
List available scenarios:
cargo run --release --bin mina-node-testing -- scenarios-listRun a specific scenario:
cargo run --release --bin mina-node-testing -- scenarios-run --name scenario-name§Test Categories
§Directory Structure and CI Integration
The directory structure in this module maps to specific test execution contexts:
solo_node/- Single node scenarios, often testing OCaml interoperabilitymulti_node/- Multi-node Rust network scenariosp2p/- Low-level P2P networking and protocol testsrecord_replay/- Scenario recording and replay functionalitysimulation/- Large-scale network simulations
In CI environments, these directories determine which specialized test binaries
are used for execution, while locally all scenarios are accessible through the
unified mina-node-testing CLI using scenario names.
§Basic Connectivity Tests
- Ensure new nodes can discover peers and establish initial connections.
- Test how nodes handle scenarios when they are overwhelmed with too many connections or data requests.
TODO(vlad9486):
- Reconnection: Validate that nodes can reconnect after both intentional and unintentional disconnections.
- Handling Latency: Nodes should remain connected and synchronize even under high latency conditions.
- Intermittent Connections: Nodes should be resilient to sporadic network dropouts and still maintain synchronization.
- Dynamic IP Handling: Nodes with frequently changing IP addresses should maintain stable connections.
Re-exports§
pub use crate::cluster::runner::*;
Modules§
Structs§
- Driver
- Scenarios
Iter - An iterator over the variants of Scenarios
Enums§
Constants§
Traits§
Functions§
- add_
rust_ nodes - add_
rust_ nodes1 - Creates
numRust nodes in the cluster - add_
rust_ nodes_ with - Creates
numRust nodes in the cluster - as_
event_ mio_ connection_ event - as_
event_ mio_ data_ send_ receive - as_
event_ mio_ error - as_
event_ mio_ interface_ detected - as_
event_ mio_ listener_ ready - as_
event_ mio_ outgoing_ connection - connect_
rust_ nodes - connection_
finalized_ event - get_
p2p_ state - get_
peer_ state - get_
peers_ iter - idle
- match_
addr_ with_ port_ and_ peer_ id - next_
event - peer_
exists - peer_
is_ ready - run_
until_ no_ events - Runs cluster until there is a
quiet_durperiod of no events, returningOk(true)in this case. If there is no such period fortimeoutperiod of time, then returnsOk(false) - trace_
steps - trace_
steps_ state - wait_
for_ connection_ error - wait_
for_ connection_ established - Runst the cluster until the node is connected to the node that satisfies the predicate.
- wait_
for_ connection_ event - wait_
for_ nodes_ listening_ on_ localhost - Runs the cluster until each of the
nodesis listening on the localhost interface.