A collision of block hashes would doubtless break most Bitcoin implementations in horrible and sudden methods, nevertheless it’s merely not going to occur except you harness all of the vitality within the observable universe, after which some, for the only real purpuse of discovering the collision, or uncover a cryptographic weak point in SHA-256. Sure, rising issue theoretically makes block hash collisions extra doubtless, however to not a level that may ever matter.
I used to be questioning why block ids aren’t outlined because the hash of the entire block relatively than their headers
The header contains the transaction merkle tree root, so it not directly commits to the complete contents of the block anyway, and this manner is extra elegant and environment friendly:
- When a node hears a few new block, it first downloads and validates its header for proof of labor. This prevents different nodes from cheaply spamming it with whole pretend blocks that it might waste time validating, solely blocks with legitimate proof of labor are even downloaded.
- Equally, throughout preliminary block obtain, nodes use a “headers-first” synchronization technique, which permits them to know the block hash of each block in probably the most proof of labor chain simply by downloading and validating the headers. This prevents some sorts of DoS assaults, makes parallel block downloads simpler, and doubtless different advantages.
- SPV wallets and different gentle shoppers can use the headers to validate transaction inclusion within the chain. (Their limitation is that they’ll solely validate the proof of labor, not different consensus guidelines, the belief is that miners would not waste hashpower on mining invalid blocks.)