As we have seen in Chapter 1, Introducing Blockchain Security and Attack Vectors, the blockchain is nothing more than a list of blocks in which each block maintains a reference to the previous block. Within each block, in fact, the hash of the previous block is kept inside the Prev_Hash variable of the block header.
The hash stored within the Prev_Hash variable is obtained by calculating the SHA256 algorithm on the block header of the previous block. In this way, an indissoluble chain of mutual references is formed, which guarantees that the data contained therein is immodifiable (in fact, it is sufficient to modify even one of the blocks to obtain totally different hashes).
It is therefore important that each node in the network is able to keep the local copy of the blockchain up to date by synchronizing the current status with the global status shared and...