by p4bl0 · 4y ago · 0 comments
Proof of work is only a way to randomly and incontestably select a participant when participation is open and no one is trustable, i.e., a consensus mechanism (which, once augmented with other conventions (I'm thinking of choosing the longest chain), will also prevent double spending).
But what makes the blockchain immutable is the Merkle tree structure (each block containing the hash of its parent) and the distribution of the data (which is what guarantees that participants have a comparison point to detect modification). It would work the same without proof of work. A Git repository has the same exact property.
If anything, proof of work makes mutability easier since it is only required to compute partial collisions to have blocks considered valid.
For example, if we used a public-writable git repo to track our cryptocurrency transactions, it would have the Merkle structure required for append-only/immutable-history. However, we could get lots of diverging branches; e.g.
+--- Commit sending all my money to Alice
|
Parent commit --+
|
+--- Commit sending all my money to Bob
Who gets my money? The consensus mechanism used by Bitcoin will choose the branch with the longest history. In the above case they're equal, so we wait until some more commits appear. If more commits appear on the Alice branch, then that's chosen as the "correct" one. However, Bob can later spam a bunch of commits on top of the other branch (e.g. just sending one coin back-and-forth), until that branch becomes the longest. The consensus will then change, to consider that branch as the "correct" one, and Alice loses all the money (as does anyone she previously sent it to!).Proof-of-work makes this spamming much harder. All miners will be trying to add blocks to the longest branch they're aware of (picking arbitrarily, in case there are multiple), since it's unlikely any shorter chain will be able to overtake it (this is a largely self-fulfilling prediction!).
Preventing double spending is a feature of the consensus mechanism indeed, if it is augmented with other rules (longest chain wins), but immutability does not rely on it, as I said in the comment you are replying to.
EDIT: I've updated my previous comment to make it clearer that what I'm saying is "PoW is not an immutability mechanism" (to which answering "you are wrong, PoW prevents double spending" makes little sense).
Merkle tree makes verifying the blockchain datastructure easier, and enables older blocks to be further secured by newer blocks.
Proof for work however makes producing an entirely alternive blockchain expensive. When looking at the bitcoin blockchain, you can prove exactly how much energy was used to make it, and know that energy was not used for making any other variant. This means you can be confident the blockchain is not a altered forgery meant to defraud you, as this attack would require spending all of that energy again.