8 Distributed Ledger Technology
403
8.3.1 Transaction, Block, Ledger, and Blockchain
There has been some confusion about the concept of the blockchain and the ledger
that stores the data for a blockchain. To be precise, a blockchain refers to the system
of nodes that make a blockchain operational, whereas the term ledger is the database
stored in the nodes. However, the term ledger is used for accurate descriptions. A
ledger is a data structure that is replicated and shared among distributed nodes of the
blockchain network. A ledger can be considered as a chain of blocks. Each block in
the chain carries a list of transactions and other data. A transaction has a transaction
ID, an input which contains the type of the asset to be transferred and the amount
and signed with the sender’s public key, and an output which includes the type of
asset to be received and the amount and signed with the receiver’s public key. Figure
8.4 shows an example of a transaction which is simplified for the convenience of
description.
After being validated, transactions are assembled into blocks. A block consists
of three parts: the block header, the hash of the block header, and the transactions
inside the block. The block header is made in a special way. It contains the hash
of the header of the previous block, a timestamp when this block is created, and a
Merkle root hash which is derived from the hashes of the transactions of this block.
A Merkle root hash is the hash of all the hashes of all the transactions that are
part of a block. The block also contains two other important parameters, namely,
nonce (which stands for number used only once) and difficulty target. These two
parameters are what make mining (in a Power-of-Work blockchain) tick. The details
of the mining process will be discussed in the next section. Figure 8.5 shows the
details of a block (the shaded area is the block header).
Input
Output
Transaction ID
Type, Amount, Sender Key
Type, Amount, Receiver
Key
Fig. 8.4 A transaction
Fig. 8.5 A block
Version
Hash of Header of Previous Block
Timestamp
Difficulty Target
Nonce
Merkle Root Hash
Hash of Header of This Block
Transactions
Précédent

- 408/647

Suivant