News for hackers. Stuff that matters.
Re:FTX to file for U.S. bankruptcy, CEO resigns by hinkley on Friday November 11, 2022 @01:45PM (#33564916)
I worked on code that used a Merkle Tree before any of us had heard of a Merkle tree or this blockchain bullshit came around, so I never got starry eyed about any of this stuff.

That project was in an environment where chain of custody is an established mechanism for ensuring public safety. Layering a web of trust over the top of that was something the users could mostly digest. Consumers can only use software signed by a particular department or person, only approved software is signed, and approval requires a chain of approvals before it going back to an original signature that says "these are the bits we gave you".

That's a useful application of the Merkle Trees. But you'll note there's no distributed consensus, and there's no Proof of Work. Or rather, the proof inferred, backed by process and in this case legistlation.

Blockchain admits it's only barely a Merkle Tree right in the name. Our graph looked a lot more like trunk in a git repo. Slightly more tree-like but people only care about the last node.

Re:FTX to file for U.S. bankruptcy, CEO resigns by killerstorm on Friday November 11, 2022 @02:43PM (#33565740)
A Block header includes a root hash of a Merkle tree of transactions. So yes, it is a tree, if you also consider the useful payload, not just block headers.

Then e.g. in Ethereum there's also a Merkle tree of the entire state as well.

> there's no distributed consensus

Distributed consensus is necessary if you want high availability and replication for your Merkle tree.

If data in your tree is important, you want to replicate it, right? You want to be sure it's stored on multiple nodes.

So this distributed consensus thing, Byzantine Fault Tolerance, it basically gives you a receipt that at least N nodes have this data stored.

You didn't implement it because it takes considerable effort. But if you implemented Merkle tree with high availability, you'd get something very similar to blockchain.

Re:FTX to file for U.S. bankruptcy, CEO resigns by thwayunion on Friday November 11, 2022 @03:18PM (#33566246)
> If data in your tree is important, you want to replicate it, right?

Yes!

> You didn't implement it because it takes considerable effort.

I'd wager it's because he was smart enough to read the man page for rsync and didn't over-engineer a non-solution to a non-problem in his particular use-case.

Re:FTX to file for U.S. bankruptcy, CEO resigns by killerstorm on Friday November 11, 2022 @06:52PM (#33568387)
Data integrity & availability generally considered to be important. So e.g. many databases implement synchronous replications, and Turing Award winning scientists Liskov and Lamport developed Byzantine Fault Tolerance solutions. I guess they were just too lazy to read the man page for rsync...
Re:FTX to file for U.S. bankruptcy, CEO resigns by hinkley on Friday November 11, 2022 @10:55PM (#33569802)
Something like that. The point was accuracy, not throughput.
Re:FTX to file for U.S. bankruptcy, CEO resigns by hinkley on Friday November 11, 2022 @10:54PM (#33569793)
> Distributed consensus is necessary if you want high availability and replication for your Merkle tree.

No, distributed consensus is necessary if you're willing to sacrifice correctness for availability.

>> public safety

> So this distributed consensus thing, Byzantine Fault Tolerance,

Show me a blockchain that actually implements BFT. Longest chain wins is not Byzantine Fault Tolerance.

Re:FTX to file for U.S. bankruptcy, CEO resigns by killerstorm on Saturday November 12, 2022 @06:10AM (#33572028)
> No, distributed consensus is necessary if you're willing to sacrifice correctness for availability.

?!?!

Do you think it's most correct to have only one replica?

> Show me a blockchain that actually implements BFT.

A lot of blockchains implement some variant of PBFT. Including the one I made: https://gitlab.com/chromaway/postchain/

Re:FTX to file for U.S. bankruptcy, CEO resigns by hinkley on Saturday November 12, 2022 @01:02PM (#33575405)
Specifically, longest chain is Might Makes Right, which is not consensus, it’s leader following.

If I makes you feel any better, I see Raft as only BFT during leader election, the rest of the time if the leader is a bad actor then everything is fucked. It’s a game of Secret Hitler.

Remember, the Byzantine Generals problem is what the BFT term is acknowledging, and the problem with the generals was one of sabotage, not just missing messages. It’s only statistically unlikely that longest chain is created in earnest and not via malfeasance. But the bigger a system scales the more frequent counterexamples occur. That’s the lesson of every scalable system. Bad days that used to happen once a quarter now happen a couple times a week.

Edit:

> In a consortium blockchain, typically blocks must be approved (signed) by a majority of consortium members.

Well, well. Adults have finally joined the blockchain community. Maybe there’s hope yet.