406
X. Liu et al.
Y
Y
Invalid
Invalid
Y
Sender
signature
valid?
Receiver
signature
valid?
Amount not less
than
allowed min?
Sender has sufficient unspent
funds?
Transaction
Valid transaction
Invalid
Invalid
Fig. 8.8 Validate a transaction
In a Power-of-Work blockchain, any node can make efforts by conducting mining
to find and recommend a new block as the next valid block for the blockchain.
During mining, a node strives to find a suitable random number called nonce
(“number only used once”) which is embedded in the block’s header (see Fig. 8.9).
A valid nonce is a value that makes the hash (e.g., SHA-256 for Bitcoin mining) of
a block header have the required number of leading zeros, as set by the difficulty
parameter of the blockchain. The number of leading zeroes is called the difficulty
which is set by the blockchain and can be adjusted over time. In other words,
difficulty is a measure of how difficult it is to find a suitable hash based on the
given difficulty target. Note that in blockchain, usually the network automatically
adjusts the difficulty level for mining over time. The validity of a new block can be
easily verified by other nodes because they only need to validate the hash using the
nonce value already found by the node that is recommending the new block. This
takes only a very short amount of time because it involves only the calculation of
one hashing algorithm. Other nodes will adapt and add the validated recommended
block to its own copy of the ledger. In general, nodes will validate and adopt
broadcasted recommended blocks rather than trying to mine its own. It is better
to validate and adopt an existing recommended block and start mining the next
recommended block because this at least gives the node the chance of winning a
reward for successfully mining the next valid block. The rationale of this strategy is
because of the way a blockchain resolves conflicts: only the block which gives the
longest chain will be adopted.
X. Liu et al.
Y
Y
Invalid
Invalid
Y
Sender
signature
valid?
Receiver
signature
valid?
Amount not less
than
allowed min?
Sender has sufficient unspent
funds?
Transaction
Valid transaction
Invalid
Invalid
Fig. 8.8 Validate a transaction
In a Power-of-Work blockchain, any node can make efforts by conducting mining
to find and recommend a new block as the next valid block for the blockchain.
During mining, a node strives to find a suitable random number called nonce
(“number only used once”) which is embedded in the block’s header (see Fig. 8.9).
A valid nonce is a value that makes the hash (e.g., SHA-256 for Bitcoin mining) of
a block header have the required number of leading zeros, as set by the difficulty
parameter of the blockchain. The number of leading zeroes is called the difficulty
which is set by the blockchain and can be adjusted over time. In other words,
difficulty is a measure of how difficult it is to find a suitable hash based on the
given difficulty target. Note that in blockchain, usually the network automatically
adjusts the difficulty level for mining over time. The validity of a new block can be
easily verified by other nodes because they only need to validate the hash using the
nonce value already found by the node that is recommending the new block. This
takes only a very short amount of time because it involves only the calculation of
one hashing algorithm. Other nodes will adapt and add the validated recommended
block to its own copy of the ledger. In general, nodes will validate and adopt
broadcasted recommended blocks rather than trying to mine its own. It is better
to validate and adopt an existing recommended block and start mining the next
recommended block because this at least gives the node the chance of winning a
reward for successfully mining the next valid block. The rationale of this strategy is
because of the way a blockchain resolves conflicts: only the block which gives the
longest chain will be adopted.
