How stellar/stellar-core works
Stellar Core is a peer-coordinated replicated state machine that processes transactions and maintains a cryptographic ledger. The principal workflow is peer communication and consensus, transaction-set formation, ledger application, and durable ledger-state maintenance; catchup and history archives restore or publish checkpointed state. The graph reflects README statements and source-index references plus the supplied excerpts; unsampled subsystem wiring is omitted where its caller is not evidenced.
Main entry points: LedgerManagerImpl.cpp Ledger manager · Application.h Application runtime · Herder.h Herder coordination · HistoryManagerImpl.cpp History manager
Components 18
Node runtime
- Application runtime
src/main/Application.h - Node configuration
src/main/Config.h
Peer consensus
- Peer network
src/overlay/OverlayManagerImpl.cpp - Herder coordination
src/herder/Herder.h - SCP consensus
src/scp/SCP.cpp - Transaction sets
src/herder/TxSetFrame.h
Ledger processing
- Ledger manager
src/ledger/LedgerManagerImpl.cpp - Transaction processing
src/transactions/TransactionFrame.cpp - Ledger transactions
src/ledger/LedgerTxn.h - Immutable ledger view
src/ledger/ImmutableLedgerView.h
State persistence
- Ledger database
src/database/Database.cpp - Bucket state
src/bucket/BucketManager.cpp - History manager
src/history/HistoryManagerImpl.cpp - History archives
src/history/HistoryArchive.h - Ledger catchup
src/catchup/LedgerApplyManagerImpl.cpp
Runtime support
- Runtime utilities
src/util - Invariant checks
src/invariant/InvariantManagerImpl.cpp
Other components
- Node operator
Connections 24
- Node operator → Application runtime: configures
src/main/Application.h - Application runtime → Node configuration: uses
src/main/Application.h - Application runtime → Peer network: creates subsystem
src/main/Application.h - Application runtime → Herder coordination: creates subsystem
src/main/Application.h - Application runtime → History manager: creates subsystem
src/main/Application.h - Application runtime → Ledger manager: creates subsystem
src/main/Application.h - Peer network → Herder coordination: delivers peer messages
src/overlay/OverlayManagerImpl.cpp - Herder coordination → SCP consensus: coordinates consensus
src/herder/Herder.h - Herder coordination → Transaction sets: receives sets
src/herder/Herder.h - Ledger manager → Transaction sets: applies agreed set
src/ledger/LedgerManagerImpl.cpp - Ledger manager → Transaction processing: applies transactions
src/ledger/LedgerManagerImpl.cpp - Transaction processing → Ledger transactions: updates ledger state
- Ledger manager → Ledger transactions: uses transactions
src/ledger/LedgerManagerImpl.cpp - Ledger manager → Ledger database: uses storage
src/ledger/LedgerManagerImpl.cpp - Ledger manager → Bucket state: manages bucket state
src/ledger/LedgerManagerImpl.cpp - Ledger manager → History manager: coordinates history
src/ledger/LedgerManagerImpl.cpp - Ledger manager → Ledger catchup: delegates catchup
- Ledger catchup → Ledger manager: applies recovered state
src/catchup/LedgerApplyManagerImpl.cpp - History manager → History archives: uses archive format
src/history/HistoryManagerImpl.cpp - History manager → Bucket state: uses bucket state
src/history/HistoryManagerImpl.cpp - Ledger manager → Immutable ledger view: creates state snapshots
src/ledger/LedgerManagerImpl.cpp - Ledger database → Runtime utilities: uses utilities
src/database/Database.cpp - Ledger manager → Invariant checks: checks invariants
src/invariant/InvariantManagerImpl.cpp - Application runtime → Runtime utilities: uses runtime services