4 ms·
Question: the video explains that you can't just change a bit in the middle of the blockchain without having to fix all the subsequent blocks, making tampering
by Isamu 8y ago
Question: the video explains that you can't just change a bit in the middle of the blockchain without having to fix all the subsequent blocks, making tampering labor intensive, but not impossible. Is it supposed to be VERY labor intensive, depending on the length of the chain?
Then ultimately a chain that is consistent might have been manipulated, but you can check it against other copies. At this point you could be just comparing plain text ledgers (but blockchain comparison could be easier by just comparing hashes.)
- kybernetikos 8y agoThe reason it's VERY labor intensive is because in a PoW blockchain, each block also includes a value that combined with the previous blocks hash hashes to a number less than the difficulty (the value labelled nonce in this demo). The difficulty can be adjusted to ensure that finding such a number is very hard. Obviously in the demo, it was not so very difficult - your machine was able to work out a value for the nonce very quickly by itself, but in the real network, the difficult is set so that this is hard. So hard that the whole network of miners working together will only find one, on average every x minutes (configurable depending on how you update the difficulty). This means that creating another block is difficult. The whole network has the rule that longer chains of blocks are preferred over shorter ones, so as more blocks are added to a chain, the amount of computation required to overtake the main chain and have your modified chain accepted as the truth becomes very large. To rewrite history, you don't just need to modify the data and recalculate the hash for each subsequent block, you need to find a nonce that works for each of the subsequent blocks, and you need to be doing this faster than the main chain is adding new blocks, or your chain will never be as long as the main chain, and it will never be considered the 'truth'. That's why people talk about 51% attacks - the idea is that you need to have a majority of the hash power of the network working on your dodgy chain if you want it to overtake the main chain. Now there are things you can do with less than 51% of the network hash power, but for the naive approach, you're going to need a phenomenal amount of computing power to stand a chance of having people accept your version of history. For alt-coin chains with very few participants, there have been real attacks along these lines. It's hard to imagine attacks like this succeeding against any of the main blockchains though. And yes, comparing two blockchains for equality is very easy - the hash of a block includes the hash of the previous block, as you can see in the demo, so the hash represents the entire history. If two blockchains have a different hash for the top block, they have different histories.