Whats in a Block/Ledger
The XRP Ledger processes transactions in blocks called “ledger versions”, or “ledgers” for short. Each ledger version contains three pieces:
- The current state of all balances and objects stored in the ledger.
- The set of transactions that have been applied to the previous ledger to result in this one.
- Metadata about the current ledger version, such as its ledger index, a cryptographic hash that uniquely identifies its contents, and information about the parent ledger that was used as a basis for building this one.
Each ledger version is numbered with a ledger index and builds on a previous ledger version whose index is one less, going all the way back to a starting point called the genesis ledger with ledger index 1.¹ Like Bitcoin and other blockchain technologies, this forms a public history of all transactions and their results. Unlike many blockchain technologies, each new “block” in the XRP Ledger contains the entirety of the current state, so you don’t need to collect the entire history to know what’s happening now.²
The main job of the XRP Ledger Consensus Protocol is to agree on a set of transactions to apply to the previous ledger, apply them in a well-defined order, then confirm that everyone got the same results. When this happens successfully, a ledger version is considered validated, and final. From there, the process continues by building the next ledger version.