4 ms·
In proof of work the leader election (the thing that decides who gets to write the next page/block of the ledger) is based on how much money you can put in comp
by baby 4y ago
In proof of work the leader election (the thing that decides who gets to write the next page/block of the ledger) is based on how much money you can put in computing power or how big your mining pool is. The more computing power, the more lottery tickets you get to write the next block.
In proof of stake, the more crypto tokens you have, the more lottery tickets you get to win the right to write the next block.
In PoW the lottery is solving puzzles, that’s the energy inefficiency, in PoS the lottery is decided like a real lottery: with a random number generator (a distributed one at that, so that people agree that it was generated honestly)
- dcow 4y agoHow do you make an honest distributed random number generator, then?
- yiannisbot 4y agoYou should check out drand (https://drand.love https://drand.love), which is based on threshold cryptography and the group running the network is composed of 16 independent organisations, none of which can manipulate or predict the next beacon. Beacons can be consumed from the public HTTP APIs (https://drand.love/developer/http-api/ https://drand.love/developer/http-api/). Lots of exciting features to land very soon that include Timelock Encryption, among several others. Technical explainer can be found here: https://research.protocol.ai/tutorials/resnetlab-on-tour/drand/ https://research.protocol.ai/tutorials/resnetlab-on-tour/dra... and documentation here: https://drand.love/docs/ https://drand.love/docs/
- rufusroflpunch 4y agoWondering the same thing myself. The entire problem with proof of stake is that the only thing in the digital realm that can be relied on as a source of objective truth is computation, hence proof of work. How do you get verified (true) randomness without an oracle and without a connection to the analog world (proof of work)? It would be amusing if the answer was randomness that came from a proof of work algorithm.
- SEJeff 4y agoAn oracle is a totally sensible approach for certain use cases, see the VRF support in chain link as an example: https://blog.chain.link/verifiable-random-function-vrf/ https://blog.chain.link/verifiable-random-function-vrf/
- jgeralnik 4y agoA bunch of nodes generate random numbers and publish their hashes. After all hashes have been published all nodes reveal their random number, verify that their number actually corresponds to their hash. Xor all the numbers together and as long as at least one node was honest and generated a random number the result will be a random number. I don't recall if this is exactly what proof of work does but I think it's pretty solid.
- zik 4y agoPoW as used in bitcoin and ethereum is a bit different. It's designed to reduce the communication needed between nodes. Each block is published with a hash which is based on all the previous blocks plus its own data. All participants are racing to solve a puzzle: basically a big guessing game where the first to guess the winning number gets to make the next block. The game is to find a number which when combined with the previous hash and put through an expensive hash function comes up with a result which has a specific number of binary zeros at the end. Since hashes are one way functions the only way to solve the problem is for everyone to guess until the solution is found. The first participant to find the solution gets to create the new block. They also check the last few blocks to see if anyone's been cheating by adding fraudulent transactions. If fraud is detected they just ignore those nefarious blocks like they never happened. The algorithm scales with the number of participants by automatically making the "difficulty" higher by changing the size of the pattern that needs to be matched.
- jgeralnik 4y agoYeah I meant proof of stake, not proof of work
- cstejerean 4y agoSure but I think the question is about the random number generation used to decide in PoS who gets to do the next block.
- doubleunplussed 4y agoI don't know how they do it but it seems easy in practice. You hash the concatenation of chunks of data submitted by participants. Adding more data to the hash can only make it more random, not less. As long as at least one participant wants the outcome to be random and therefore they submitted actual random bits, the result will be random no matter how unrandom all the other participants' data chunks were.
- SEJeff 4y agodef totally_random(): return 42 In seriousness, solana’s proof of history is a super novel take ontop of proof of stake to solve this problem. https://solana.com/news/proof-of-history https://solana.com/news/proof-of-history
- baby 4y agoYou use a vrf (verifiable random function) check what mina, dfinity, celo, and pretty much all the PoS coins dk