Ledger Backends
A ledger backend is a source of Stellar network ledger data. The ingest SDK supports two primary ledger backends, both implementing the ledgerbackend interface. This interface always returns ledger data as LedgerCloseMeta, which is XDR-encoded ledger metadata object.
- Captive Core – Invokes the
stellar-corebinary as a subprocess which connects to the live Stellar network and fetches network data (i.e., ledgers). - BufferedStorageBackend – Retrieves ledger metadata from cloud storage.
- RPCLedgerBackend – Retrieves ledger metadata from an RPC server.
Each backend has its own setup and configuration requirements, which are covered in the following sections.
LedgerCloseMeta Structure
xdr.LedgerCloseMeta captures a detailed record of all state changes during the closing of a Stellar ledger. It includes:
-
LedgerHeader– Metadata about the ledger, including:- Ledger sequence number
- Previous ledger hash
- Close time
- Bucketlist hash
-
TxSet– The set of transactions included in the ledger. -
TxProcessing– Execution results of each transaction, including:- Success or failure of operations within transactions
OperationMeta, which tracksLedgerEntryChangescaused by transactions
-
UpgradesProcessing– Any protocol upgrades applied in this ledger. -
ScpInfo– Details of the consensus process that finalized this ledger. -
EvictedLedgerKeys– Keys of ledger entries removed due to expiration.