I have only a very general understanding of blockchain. But I know sufficiently on XOR and cryptographic hashes to spot at least some flaws in your XOR approach:
- XOR is nice for checksum. Checksums are good at spotting random changes such bitflips in network communication. But it’s insufficient for spotting intentional forgery.
- So your algorithm would require to calculate the xor each time.
- You’d then need to to it on every block of the chain, because xor has very predictable collisions. It would be easy to forge a change of in 2 blocks of the chain, so that the xoring combined for all the blocks remains unchanged.
- your approach would then be suitable only for verifying integrity of past transactions, only if you already have a copy and if you trust the copy.
- Your algorithm would also be proportional to the length of the blockchain. Slower and slower over time.
- Only nodes that already have a copy of the chain could trust the integrity: the integrity is not verifiable for new nodes.
- And your approach doesn’t address the integrity of new transactions.
Blockchains aim at decentralising trust and guaranteeing verifiable integrity decentrally. That’s why blockchains work with cryptographic hashes. The chained cryptographic hash allows you to limit the verification to a portion of the chain that you do not yet trust, without reverifying each time what was already verified.
Warning: To me, this explanation seems to make sense, at least when I wrote it. But both, cryptography and distributed computing make this a complex matter. I hope I expressed it sufficiently clearly; don’t hesitate the comments if you (or I) missed something ;-)