subsystem-summary-of-simulation
Installation
SKILL.md
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 —
Simulationclass; manages nodes, clocks, loopback/TCP connections, and event-loop cranking. - Topologies.h / Topologies.cpp — Static factory methods producing
Simulationinstances with specific network topologies. - LoadGenerator.h / LoadGenerator.cpp —
LoadGeneratorclass; timer-driven load submission loop, account management, metrics, completion tracking. - TxGenerator.h / TxGenerator.cpp —
TxGeneratorclass; creates all transaction types (payments, Soroban upload/invoke/upgrade, SAC, batch transfer). - ApplyLoad.h / ApplyLoad.cpp —
ApplyLoadclass; offline benchmarking: sets up contracts, populates bucket list, runs ledger-close iterations, binary-searches for maximum throughput.