关于Hyperledger Fabric区块链模型:区块属于账本还是账本属于区块?
Hey there! Let me break down this relationship clearly for you—in Hyperledger Fabric, the ledger contains blocks, not the reverse. This is a core concept, so let's unpack it step by step:
First, understand what a ledger is in Fabric: Every channel in Fabric has its own dedicated ledger. A ledger is made up of two key components:
- The blockchain: An immutable, ordered sequence of blocks that records the full history of all transactions executed on the channel.
- The world state: A mutable database that holds the latest values of all assets tracked by the channel (it's like a "current snapshot" to avoid replaying every block to get asset values).
Now, blocks are the building blocks of the blockchain part of the ledger. Each block contains:
- A batch of validated, ordered transactions
- A reference to the previous block's hash (which creates the chain structure)
- Metadata like the block number, timestamp, and consensus-related info
Think of it like a physical ledger book: The entire book is your Fabric ledger, and each page in the book is a block. Each page (block) records a set of transactions, and all pages together make up the complete transaction history (the blockchain) of the book (ledger).
To confirm this aligns with official definitions: Fabric's core docs state that the ledger encompasses both the blockchain (sequence of blocks) and the world state, meaning blocks are a subset of what makes up the ledger.
内容的提问来源于stack exchange,提问作者HK KWON

