The ledger
With our solid grasp of a multi-party transaction, we're ready to see how it is stored at the heart of a Hyperledger Fabric blockchain system—in a ledger. Figure 6.3 shows a sample Hyperledger Fabric ledger:
Figure 6.3: A Hyperledger Fabric ledger has two major components: a state database and a blockchain
We can see that there are two parts to a ledger—a state database and a blockchain. The state database holds the current value of all objects in the ledger, while the blockchain holds a history of all transactions affecting these objects. These are the two key data structures with which our smart contracts and application programs will interact.
Make no mistake though, the blockchain is the primary component of the ledger. That's because it generates the state database. If the state database was deleted or lost, we could regenerate it from the blockchain by replaying all the transactions contained within it. In contrast, if the...