| name | subsystem-summary-of-simulation |
| description | read this skill for a token-efficient summary of the simulation subsystem |
Simulation Subsystem — Technical Summary
Overview
The simulation subsystem provides infrastructure for creating multi-node network simulations and generating synthetic transaction load for testing and benchmarking stellar-core. It has four major components: (1) Simulation — orchestrates multiple Application instances as virtual or TCP-connected nodes, (2) Topologies — factory functions producing pre-configured network shapes, (3) LoadGenerator — drives sustained transaction submission at configurable rates, and (4) ApplyLoad — a closed-loop benchmarking harness that bypasses the overlay to measure raw ledger-close performance. A shared TxGenerator class constructs all transaction types (classic payments, Soroban uploads, invocations, SAC transfers, upgrades).
Key Files
- Simulation.h / Simulation.cpp —
Simulation class; manages nodes, clocks, loopback/TCP connections, and event-loop cranking.
- Topologies.h / Topologies.cpp — Static factory methods producing
Simulation instances with specific network topologies.
- LoadGenerator.h / LoadGenerator.cpp —
LoadGenerator class; timer-driven load submission loop, account management, metrics, completion tracking.
- TxGenerator.h / TxGenerator.cpp —
TxGenerator class; creates all transaction types (payments, Soroban upload/invoke/upgrade, SAC, batch transfer).
- ApplyLoad.h / ApplyLoad.cpp —
ApplyLoad class; offline benchmarking: sets up contracts, populates bucket list, runs ledger-close iterations, binary-searches for maximum throughput.