Skip to main content

Module dev_tool

Module dev_tool 

Source
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§

AuthToken
ChurnConfig
Configuration for deterministic node churn (crash/restart) during simulation.
ClientId
ContractDistribution
Information about how a contract is distributed across the network.
ContractStore
Handle contract blob storage on the file system.
ContractSubscription
A snapshot of a peer’s subscription topology for a contract.
ControlledEventChain
A controlled event chain that triggers events in a specific sequence.
ControlledSimulationResult
Result of a controlled simulation, including topology snapshots.
ConvergedContract
A contract that has converged (all replicas have the same state).
ConvergenceResult
Result of a convergence check.
DelegateStore
DivergedContract
A contract that has diverged (replicas have different states).
EventChain
A stream of events for simulation testing.
EventSummary
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.
FaultInjectorState
State for deterministic fault injection.
InitPeerNode
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]
MemoryEventsGen
MockStateStorage
Mock implementation of StateStorage for testing.
NetworkEventGenerator
NetworkPeer
NetworkStats
Statistics for fault injection effects.
NodeConfig
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.
NodeLabel
OpenRequest
OperationStats
Statistics for a basic operation type (Get, Subscribe).
OperationSummary
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.
ProximityViolation
A proximity violation in upstream selection.
PutOperationStats
Statistics for Put operations (includes broadcast tracking).
RequestId
Request correlation ID for end-to-end tracing
RunningNode
Information about a running node, used for crash/restart operations.
Runtime
ScheduledOperation
A scheduled operation for controlled event simulation.
SecretsStore
SimNetwork
A simulated in-memory network topology.
StateStore
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).
TopologySnapshot
A snapshot of a peer’s complete subscription topology.
TopologyValidationResult
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.
TurmoilConfig
Configuration for a Turmoil-based deterministic simulation.
UpdateOperationStats
Statistics for Update operations (includes broadcast tracking).

Enums§

OperationMode
PeerMessage
PeerStatus
SimOperation
A controlled operation to execute on a specific node during simulation.

Traits§

ClientEventsProxy

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
TurmoilResult
Result type for Turmoil simulations