News for hackers. Stuff that matters.
Re:A generalised solution to distributed consensus by killjoywashere on Friday March 08, 2019 @08:32PM (#19343907)
Isn't raft the default for Bitcoin?
Re:A generalised solution to distributed consensus by deathanatos on Friday March 08, 2019 @08:44PM (#19343946)
No. Raft and Bitcoin's algorithms for agreeing on what the blockchain is are completely different.

AIUI, Bitcoin's "consensus" is just whoever has the longest valid blockchain is the winner. The algorithm tunes the difficulty s.t. it takes ~10 minutes to find a block, so the chance of two blockchains continuing to have the same length for any long amount of time is unlikely. That is, one chain will find the next block before the other, and in the meantime, be able to distribute that fact to the other nodes and thus "win".

From https://en.bitcoin.it/wiki/Block_chain:

> Honest generators only build onto a block (by referencing it in blocks they create) if it is the latest block in the longest valid chain. "Length" is calculated as total combined difficulty of that chain, not number of blocks, though this distinction is only important in the context of a few potential attacks.

Re:A generalised solution to distributed consensus by narrator on Friday March 08, 2019 @10:12PM (#19344210)
No. Bitcoin uses its own protocol. Raft could not be used for a secure cryptocurrency bevause Raft does not handle byzantine faults[1]. It assumes nodes are not run by malicious actors and messages sent are unaltered in transit.

[1] https://en.m.wikipedia.org/wiki/Byzantine_fault

Re:A generalised solution to distributed consensus by hugofirth on Saturday March 09, 2019 @05:13AM (#19345454)
True. Though in tradeoff it has massively increased throughput. I'm always frustrated when I see blockchains recommended as a solution for a consensus problem in anything but a zero-trust scenario
Re:A generalised solution to distributed consensus by parasubvert on Saturday March 09, 2019 @11:26AM (#19346841)
Even in a zero trust scenario, you need a majority of nodes to be good faith, non-colluding actors. Even anarchy breaks down in the face of unequal power.
Re:A generalised solution to distributed consensus by RcouF1uZ4gsC on Friday March 08, 2019 @11:00PM (#19344361)
Bitcoin consensus is what is called Byzantine consensus - that is your consensus still has to work with some nodes actively trying to send bad information to mess up the protocol.

Raft and Paxos are non-Byzantine. They assume that the nodes are actively trying to follow the protocol though there me be such things as network partitions and crashes.

Re:A generalised solution to distributed consensus by kccqzy on Friday March 08, 2019 @10:20PM (#19344232)
Bitcoin consensus is extremely simple: the chain with the most accumulated difficulty. Furthermore blocks aren't removed or changed, so consensus is in fact a monotonic process. You don't need either Paxos or Raft or any other sophisticated algorithm; just broadcast every block you believe to be part of the most difficult chain and consensus will be achieved.