5 ms·
Code your own Proof of Stake blockchain in Go
- everdev 9y agoIsn't the P2P feature what makes blockchain useful? I've seen many tutorials to code a blockchain in 10min, but they leave out this seemingly vital piece. It's like how to a SaaS tutorial without user authentication or payment processing.
- zaarn 9y agoBlockchains can be useful without P2P, notably when all actors in the chain know eachother but don't trust eachother. In this case everyone can just forward ports and hardcode nodes into a config.
- gtrubetskoy 9y agoThe only problem here is that Proof-of-Work is the evolution of Proof-of-Stake, not the other way around. PoS is how Paxos and RAFT work, and it was described in Wei Dai's b-money in 1989 [1]. But it didn't work for an adversarial byzantine network, and so it wasn't until Satoshi invented a Proof-of-Work based solution in 2008 that we had a crypto-currency. 1. http://www.weidai.com/bmoney.txt http://www.weidai.com/bmoney.txt "Each server is required to deposit a certain amount of money in a special account to be used as potential fines or rewards for proof of misconduct."
- zeroxfe 9y agoI don't see how Paxos or RAFT could be considered proof-of-stake? Nothing is staked in Paxos or RAFT, and there is no disincentive for bad actors.
- gtrubetskoy 9y agoI was referring to the concept of delegating decisions to a (somehow selected) single node, though in those particular cases there is no "stake".
- zeroxfe 9y agoOkay, got it. I wouldn't call that PoS, but I see what you mean. I think of the crux of PoS as the incentive system that keeps bad actors out -- if you act maliciously, you lose your stake.
- TTPrograms 9y agoIt seems disingenuous to refer to that as proof-of-stake.
- rubentlz 9y agoErrr, no. That's leader election, and is not a consensus algorithm by itself. It's part of the algorithm, which is nothing like PoS at all. That's like saying UDP and TCP are the same because they send packets.
- api 9y agoPoS is also plutocratic isn't it? Money would always flow to those that already have the largest stake. Economies already naturally do that, so also coding it into the monetary system would double the exponent on the effect. Winners take all, and are then the arbiters of all transactions.
- ttt111222333 9y agoMoney flows to everyone, just more goes to those with more money. However that isn't as bad as it sounds. If you own 10% and someone owns 1%, after the money has been given out you will still have 10% and they 1%. From a relative wealth perspective it actually just maintains everyone's position in society, neither benefiting nor disadvantaging anyone... That's the spiel at least...
- deleted 9y ago[deleted]
- pdpi 9y agoIf I have 10% and you have 1%, I might be able to keep 5% locked as my stake and 5% liquid, where you need 0.9% liquid and can only lock 0.1%. What was a 10:1 ratio in capital becomes a 50:1 ratio after we each chunk some out for liquidity.
- zaarn 9y agoDepends on how it is set up. If you require stake to be locked up for a long time then the plutocracy doesn't mean much since the stake is inaccessible (having 10 million $ doesn't matter if the box it's in is indestructible and locked)
- api 9y agoI don't think that works. Only the very rich can take large sums of money and lock it up like that.
- zik 9y agoPaxos and RAFT aren't generally considered to be PoS systems. I can see that there are some similarities but saying "PoS is how Paxos and RAFT work" isn't correct by the usual meaning of PoS.
- cocktailpeanuts 9y agoI think it's a great thing that people are trying different approaches. One factor is that a technology on its own doesn't create its success, but it's also dependent on the sociological environment the technology is born into. This is why we see many technologies get hyped up and die off, just to come back decades later to succeed. The success depends heavily on the context. That said, just like gtrubetskoy said below, proof of work was the solution that came after and solved all the seemingly impossible problems in an elegant manner. The reason I'm skeptical about most "proof of stake" fanboys is that they are not even aware of all this history, and they also fail to realize the elegance of proof of work. If you think about it, "proof of stake" is a very natural and even an obvious idea. I'm not saying the researchers who came up with proof of stake concept didn't achieve much, I'm saying the "proof of work" is almost like an alchemy compared to "proof of stake" because proof of stake is purely a system based on social factors ("let's vote to make decisions!") whereas proof of work is something not one person can easily wrap their head around. And the craziest part is that this system has worked for a decade now. The only reason we know this works is because it's worked for a decade. I'm pretty sure Satoshi Nakamoto himself had no idea if it would work when he invented the scheme. Overall I do think that proof of work is beautiful piece of technology that most people don't appreciate enough. I run into many people just getting into "crypto" outright criticizing proof of work and not even understanding how it actually works, which is a pity because in their mind, proof of work is some stupid scheme that's like a crappy MVP with all the shitty problems like global warming, etc., while "proof of stake" is the clear future, and with a closed mindset like that you can't create a true solution IMO.
- gtrubetskoy 9y agoI definitely agree that PoW is very hard to understand because it is not a computer thing, it's about the relationship between large number theory, thermodynamics and statistics/probabilities. I describe it to myself as a clock, I've written my thoughts down here, you might find it interesting: https://grisha.org/blog/2018/01/23/explaining-proof-of-work/ https://grisha.org/blog/2018/01/23/explaining-proof-of-work/
- Husafan 9y ago
- knowThySelfx 9y agoIs Hashgraph good? http://www.thehindu.com/sci-tech/technology/can-hashgraph-succeed-blockchain-as-the-technology-of-choice-for-cryptocurrencies/article23348176.ece http://www.thehindu.com/sci-tech/technology/can-hashgraph-su...
- jtsiskin 9y agoHow is this a valid PoS blockchain at all? Its just one centralized node choosing the winner? What stops anyone from proposing a fake winner? How is consensus reached if there were multiple nodes choosing winners?