The Principle of the Merkle Tree
A Merkle Tree is mainly used to efficiently verify data integrity. At the bottom level, each Acct node represents an account. The balance and account name of each account are hashed once with SHA-256. The resulting hash value is then combined with the hash of an adjacent node to generate a new hash. This process is repeated layer by layer, moving upward, until the final Merkle Root is obtained.
If a user wants to verify whether the reserves have changed, they only need to follow these steps: first, perform the hash calculation for their own account, then locate their position in the tree and collect the adjacent nodes’ hashes. By computing hashes layer by layer upward, the user ultimately derives a Merkle Root. If the Merkle Root they calculate matches the one officially published, this proves that the reserves are complete and correct.