1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! # spacedb-sim — a deterministic digital twin of the database
//!
//! A discrete-event simulator that runs a population of **real** [`CrdtDoc`] replicas
//! gossiping the **real** anti-entropy protocol over a modeled network — latency,
//! jitter, packet loss, partitions, and churn — all driven by a single seeded
//! [`Rng`]. The same [`Scenario`] and seed produce a byte-identical [`SimReport`], so
//! the simulator is a reproducible instrument: you can ask "do 500 replicas still
//! converge under 20% loss and a mid-run partition?" and get the same answer every
//! time, then bisect a regression against it.
//!
//! It is a twin of the **database** only — open-core, no maestro/Iron-Bank (the full
//! economic twin is a separate, proprietary system). Live state can be
//! rendered through [`observations`] into the `spacedb-console` dashboard.
//!
//! ```
//! use spacedb_sim::{Scenario, Simulation, NetworkModel};
//! let mut sc = Scenario::new(7, 50);
//! sc.network = NetworkModel::new(20, 10, 0.1); // 20±10 tick latency, 10% loss
//! let report = Simulation::new(sc).run();
//! assert!(report.converged);
//! ```
//!
//! [`CrdtDoc`]: spacedb_crdt::CrdtDoc
pub use Rng;
pub use Scheduler;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// Compiles the README's examples as doctests, so the documented API can never
/// drift from the real one. Not part of the public API, and not rendered into
/// the crate docs — it exists only under `cargo test --doc`.
;