In Section 4.1.1, we described the transaction verification process in Bitcoin. Note that this process cannot guarantee by itself the security of transactions since a powerful adversary may try to modify the history of transactions that occurred in the system (e.g., in order to double-spend or to increase its advantage in the system).
To this end, Bitcoin relies on the hash-based PoW mechanism in order to (computationally) prevent any entity from modifying the history (and order) of the transactions executed within the system. As mentioned in Chapter 3, to generate a block, miners must find a nonce value that, when hashed with the Merkle hash of all valid and received transactions included in their memory pool, the hash of the previous block, and a time stamp, the result is below a given target difficulty.
Since each block links to the previously generated block, the Bitcoin block- chain grows upon the generation of a new block in the network. In this way, blocks confirm Bitcoin transactions and commit them in the system. Namely, if any entity wants to modify the transactions executed in the system, then it does not only have to redo all the work required to compute the block where that transaction was included, but it has to also recompute all the subsequent blocks in the chain. That is, the older a Bitcoin transaction is, and thus the deeper it is included in the blockchain, the harder it becomes to modify the transaction.