Figure 2. Flowchart of Proof of Work algorithm
To generate a new block, data must first be placed within block, a process achieved by calculating Merkle root hash value. Block data is usually organized through a Merkle tree, the structural schematic is shown in Figure 3. In Merkle tree, the hash values of the block data are arranged in a binary tree structure, with the value of each parent node equal to the hash value of the sum of its two child nodes. Merkle tree root node is located at the top of entire binary tree, and its value is equivalent to the hash attestation of all data in current block. By storing Merkle root hash value in block header, a close association between block header information and block data is established, eliminating the possibility of an attacker tampering with the block data only.