4 ms·
The hash of each block is actually the hash of the header. That means you only need to store the headers to validate their hashes (not the transactions, that's
by DiThi 10y ago
The hash of each block is actually the hash of the header. That means you only need to store the headers to validate their hashes (not the transactions, that's a different matter). The header includes the root hash of all the transactions. Specifically, a Merkle tree, a hash three where you only need a few extra hashes to confirm a specific transaction was part of a block.
- Taek 10y agoWhile true, this only works if you are assuming that the block is valid. To verify that the block is valid, you actually need the entire history of the blockchain, including processing yourself every single transaction that has ever been made over the blockchain. What you describe is SPV verification, which basically says "if a miner decided to spend $10,000 in electricity mining this block, they probably verified the transactions first, so I probably don't need to verify it myself". Of course, if everyone makes this assumption, it's very easy for the miners to start slipping in illegal transactions without anyone noticing. So, some of the network running SPV is okay, but too much is a great systemic risk.
- DiThi 10y agoYep, that's why I say "(not the transactions, that's a different matter)". A block is only truly valid when its transactions are. But if there are months of blocks after it and enough percentage of nodes are full nodes, you can safely assume it was indeed verified.