Expand description
Exports for the dev tool.
Re-exports§
pub use crate::config::Config;pub use crate::config::GlobalTestMetrics;pub use transport::TransportKeypair;pub use transport::TransportPublicKey;pub use crate::tracing::state_verifier::StateAnomaly;pub use crate::tracing::state_verifier::StateVerifier;pub use crate::tracing::state_verifier::VerificationReport;pub use crate::simulation::FaultConfig;pub use crate::simulation::FaultConfigBuilder;pub use crate::simulation::Partition;pub use crate::simulation::SimulationRng;pub use crate::simulation::TimeSource;pub use crate::simulation::VirtualTime;pub use crate::simulation::WakeupId;pub use crate::test_utils::reset_global_node_index;pub use crate::transport::reset_nonce_counter;pub use crate::transport::StreamId;pub use flatbuffers;
Structs§
- Auth
Token - Churn
Config - Configuration for deterministic node churn (crash/restart) during simulation.
- Client
Id - Contract
Distribution - Information about how a contract is distributed across the network.
- Contract
Store - Handle contract blob storage on the file system.
- Contract
Subscription - A snapshot of a peer’s subscription topology for a contract.
- Controlled
Event Chain - A controlled event chain that triggers events in a specific sequence.
- Controlled
Simulation Result - Result of a controlled simulation, including topology snapshots.
- Converged
Contract - A contract that has converged (all replicas have the same state).
- Convergence
Result - Result of a convergence check.
- Delegate
Store - Diverged
Contract - A contract that has diverged (replicas have different states).
- Event
Chain - A stream of events for simulation testing.
- Event
Summary - Summary of a network event for deterministic comparison.
- Executor
- Consumers of the executor are required to poll for new changes in order to be notified of changes or can alternatively use the notification channel.
- Fault
Injector State - State for deterministic fault injection.
- Init
Peer Node - Gateway node to use for joining the network.
- Location
- An abstract location on the 1D ring, represented by a real number on the interal [0, 1]
- Memory
Events Gen - Mock
State Storage - Mock implementation of StateStorage for testing.
- Network
Event Generator - Network
Peer - Network
Stats - Statistics for fault injection effects.
- Node
Config - When instancing a node you can either join an existing network or bootstrap a new network with a listener which will act as the initial provider. This initial peer will be listening at the provided port and assigned IP. If those are not free the instancing process will return an error.
- Node
Label - Open
Request - Operation
Stats - Statistics for a basic operation type (Get, Subscribe).
- Operation
Summary - Summary of operation completion status across the network.
- PeerId
- The identifier of a peer in the network is composed of its address and public key.
- Proximity
Violation - A proximity violation in upstream selection.
- PutOperation
Stats - Statistics for Put operations (includes broadcast tracking).
- Request
Id - Request correlation ID for end-to-end tracing
- Running
Node - Information about a running node, used for crash/restart operations.
- Runtime
- Scheduled
Operation - A scheduled operation for controlled event simulation.
- Secrets
Store - SimNetwork
- A simulated in-memory network topology.
- State
Store - StateStore wraps a persistent storage backend with an optional in-memory cache.
It is Clone when the underlying storage S is Clone (e.g., ReDb with Arc
). - Topology
Snapshot - A snapshot of a peer’s complete subscription topology.
- Topology
Validation Result - Result of topology validation.
- Transaction
- An transaction is a unique, universal and efficient identifier for any roundtrip transaction as it is broadcasted around the Freenet network.
- Turmoil
Config - Configuration for a Turmoil-based deterministic simulation.
- Update
Operation Stats - Statistics for Update operations (includes broadcast tracking).
Enums§
- Operation
Mode - Peer
Message - Peer
Status - SimOperation
- A controlled operation to execute on a specific node during simulation.
Traits§
Functions§
- check_
convergence_ from_ logs - Check convergence from event logs.
- clear_
all_ topology_ snapshots - Clear all topology snapshots (for test cleanup).
- clear_
crdt_ contracts - Clear all CRDT contract registrations (for test cleanup).
- clear_
current_ network_ name - Clear the current simulation network name (thread-local). Called when SimNetwork is dropped or test ends.
- clear_
topology_ snapshots - Clear all topology snapshots for a network.
- get_
all_ topology_ snapshots - Get all topology snapshots for a network.
- get_
current_ network_ name - Get the current simulation network name (thread-local). Returns None if not in a simulation context.
- get_
fault_ injector - Returns the fault injector for a specific network, if set.
- get_
topology_ snapshot - Get the topology snapshot for a specific peer in a network.
- is_
crdt_ contract - Check if a contract uses CRDT emulation mode.
- register_
crdt_ contract - Register a contract to use CRDT emulation mode.
- register_
topology_ snapshot - Register a topology snapshot for a peer in a network.
- reset_
channel_ id_ counter - Reset the channel ID counter to initial state for this thread. Thread-local, so safe for parallel test execution.
- reset_
event_ id_ counter - Reset the event ID counter to initial state for this thread. Thread-local, so safe for parallel test execution.
- run_
turmoil_ simulation - Run a deterministic simulation using Turmoil’s scheduler.
- set_
current_ network_ name - Set the current simulation network name (thread-local). Called by SimNetwork before starting nodes.
- set_
fault_ injector - Sets the fault injector for a specific network.
- validate_
topology - Validate the subscription topology for a contract across all peers in a network.
- validate_
topology_ from_ snapshots - Validates the subscription topology for a contract from provided snapshots.
Type Aliases§
- Storage
- Turmoil
Result - Result type for Turmoil simulations