Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Local mode vs Testnet mode

The simulator explicitly supports two modes (spec section 31). They serve different jobs and must never be confused:

Local simulation                     Testnet integration
--------------------------           --------------------------
Crucible Simulator                   Crucible Simulator
      |                                    |
      v                                    v
Local deterministic environment      Soroban adapter
      |                                    |
      v                                    v
Fast, reproducible, offline          Stellar Testnet (optional)

Local mode (default)

The whole repository — every crate, every test suite, the CLI, the examples, the benchmarks — runs against the local deterministic environment. It requires no network, no accounts, no SDK.

  • Deterministic: same configuration + state + operations + seed ⇒ the same result, bit for bit, on any machine.
  • Fast: confidential transfers run in tens of microseconds.
  • Inspectable: private simulation state is visible to the harness through the labeled inspect_private_* APIs.

This is where scenarios are designed, fixtures are built, and bugs are reproduced.

Testnet mode (optional, on the roadmap)

Testnet execution routes normalized operations through the Soroban adapter (crates/adapters/soroban) toward actual Stellar infrastructure. Today the TestnetAdapter is an explicit unimplemented boundary: it exists so callers and scenario code can target the interface, and it fails with a structured unimplemented error rather than pretending to work.

When the SDK wiring lands, testnet execution will be:

  • Slower and optional — never part of the deterministic suites.
  • Separately gated — run explicitly, outside cargo test, against a live network.
  • Cross-checked — the same AdapterRequest shapes drive both modes, so a scenario passing locally and failing on testnet pinpoints a real semantic divergence rather than an interface mismatch.

Guarantee

Local simulation never depends on Testnet access: the deterministic test suite, CLI, examples, and benchmarks run offline, in CI, on every push.