Neglect concerning the Merkle tree. Assume that as an alternative, the block header would simply comprise a hash of the concatenation of all transactions.
A light-weight node might then obtain all headers, confirm their proof of labor, and make the belief it has seen the longest chain. It’s now satisfied it has seen the chain the community settle for. That is totally different from a full node, which doesn’t assume a series is accepted till it has seen all block knowledge and verified each single transaction.
Now the light-weight shopper decides to ask friends for the precise block knowledge. When it receives a blocks’ transactions, it is aware of they really match what the block header dedicated to, as it could actually recompute the hash, and evaluate it to the worth within the header.
However what if the light-weight node isn’t concerned with all transactions? BIP37 introduces the idea Bloom filtered blocks, the place a light-weight node can reveal what keys/transactions/addresses it’s concerned with, and the complete node it’s downloading from will solely give the transactions that match the filter.
Sadly, if the light-weight node doesn’t obtain all transactions, there isn’t a strategy to know whether or not they match the hash within the header, and as such, the complete node might lie, and embrace transactions that aren’t truly current within the chain.
Enter the Merkle tree.
As an alternative of simply storing a hash, we retailer the foundation of a Merkle tree. The complete node can now for every matched transaction embrace the hash values that transaction’s hash is mixed with, to show that the transaction is the truth is included within the tree, even though the light-weight node solely is aware of the foundation.