Hacker News new | ask | show | jobs
by ayanray 3513 days ago
The way I understood the proof of work system is that it's there to determine which block is accepted as truth. So during a conflict, the first to solve the proof of work puzzle has their block accepted.

For distributed databases, when there are multiple conflicting transactions that touch the same data, I could see the proof of work as a method to determine which transactions win, especially in a global, multi-master model. When the proof of work puzzle is solved during conflicts, the transaction is accepted as truth and moves to a COMMITTED state. It seems kind of wasteful if you are paying for resources to solve challenges, but maybe there's a better way to decide who wins for trusted vs untrusted environments.

As an aside, Spanner I think acquires locks globally before writing. Maybe there's an interesting global-lock free model that just works using block chain, even if it's just for trusted parties (I.e. Google-internal).

1 comments

You can have multiple winners at the same time. Proof of work doesn't solve the problem of conflicts. Everyone still has to pick which fork to follow, and you can't really consider something committed until it's buried under multiple blocks that you're confident the majority agree on.