The Third Way: Alternatives to PoW and PoS with Lane Rettig
Ethereum Denver·Mon, Oct 9, 2023, 12:00 AM
Speaker
The talk will be broken into three parts. Part I will present some helpful background information for context. It'll introduce the notion of a consensus mechanism with "real world" examples like the ones mentioned above (e.g., driving a car) and a little bit of history from distributed systems and from blockchain. Part II will present the tradeoffs between PoW and PoS: the history, the strengths and weaknesses of each system, with a bit of Ethereum history, Ethereum's motivation for switching, and a discussion of the Merge and how the Eth Beacon chain works. Part III will present some "outside the box" alternatives to PoW and PoS, such as Solana's "proof of history" and Spacemesh/Chia/Filecoin's approach using proofs of space-time. Again, the tradeoffs around these mechanisms will be discussed and they'll be presented in the context of running, production networks. The conclusion will talk about implications for the application layer and for dapp developers: ways in which the consensus mechanism "leaks" through the abstraction boundaries and impacts UX and DevEx, and ways in which applications themselves can make use of consensus. Lane Rettig
Transcript
doing well so far like many of you who have been at ethanbury before I'm feeling a little overwhelmed by the size and scale of the seat Denver but very excited to be here my name is Lane I am a former ethereum core developer and for the past few years I've been focused on building a new layer one protocol called space mesh with a novel consensus mechanism called proof of space time so yeah we're going to talk about consensus today in particular proof of work proof of stake and alternative options like proof of space time I want to apologize in advance I have a bad habit of speaking very fast I'm going to really try to slow it down but there's a lot of material to get through in 20 minutes so if I speed up again apologies in advance you can watch the recording on half speed or something cool so when I first got into the blockchain space a few years ago I was very quickly drawn to very low level layer one protocol mechanism design problems and in particular this question of consensus at the time I felt and I still feel today that it's a especially intellectually stimulating like satisfying place to work on consensus is just all around us actually not just in the blockchain world but also in society at large and we're going to talk about some of that and so yeah that's that's my motivation for working on consensus and talking to you guys today about consensus so as I said very ambitious agenda we have 18 minutes left so I'm just going to jump right in we'll talk a little bit about where we're coming from a brief history introduction to the notion of consensus we'll spend a few minutes talking about proof of work and proof of stake and then I'll share a bit about what we're working on in space mesh and some alternatives so uh what is consensus we throw this word around all the time we don't often pause to kind of Define it or talk about what it means so a definition that you often hear is this kind of recursive definition right it's this kind of consensus is like this state of shared knowledge about something where I know that you know right a fact about the world like the balance of his account or something but that's actually not enough it's also I know that you know that I know the same fact and I know that you know that I know that you know right so again there's kind of this recursive definition um personally I find it more helpful to think about consensus as just this shared kind of understanding or sense of kind of reality or the state of the world or um the truth or falseness about a fact like a mental map and again I want to hone in on this this truth notion right so the best way for me to think about consensus is that um it's really a shared understanding of the truth and we'll talk about why that matters in a moment so consensus you know before we jump into the technical side of things uh I think it's worth reflecting on the fact that it really is a very social concept and consensus has always been a thing that humans care about it's a building block or Like A Primitive in human society uh and so in this respect consensus is not like new or novel uh we just have a different take on it in the blockchain world but some fun examples are like traffic right when you're driving your car down the road we all kind of know the protocol right we can know the rules we know which is the correct side of the street to drive on we know how to navigate traffic lights and traffic circles and things like that another good example is language right we can communicate with each other share information maybe we are native speakers of the same language maybe we're using some third language or something we have these kind of like social cues and body language and things that we use to navigate and it's all kind of invisible and we just kind of move through the world swimming in this kind of ocean of consensus all the time without thinking about it and I think that that's good example is a very successful consensus mechanisms at work uh as a side note it's fun to think about whether or not social consensus mechanisms like traffic uh are Byzantine fault tolerant right what if someone drives the wrong way down the road uh topic for a separate talk but it's a fun thought experiment um and then just to re-emphasize a point I made a moment ago truth if we if we think of consensus as agreement on the truth truth is essential for the functioning of society I think we can all agree about that and we've seen a little bit of a breakdown in the social fabric of Truth over the past few years because of social media Echo Chambers things like this um and so at the micro level it matters a lot for uh understanding the balance of an account or like transaction ordering but at the macro level it also matters a great deal for things like the outcome of a election right do we agree on the results uh or like Geographic boundaries you know do two countries agree on where the border is things like this um and finally at the last Point here increasingly the problems that we face at the society level are these massive coordination challenges that affect hundreds of millions or billions of people sorry about that and uh I think consensus mechanisms robust consensus mechanisms like the ones we're working on are the best chance we have of solving these problems okay so moving into kind of blockchain consensus when we think about building a consensus mechanism what are our goals right what does a successful consensus mechanism look like actually it's trivially easy to propose a consensus mechanism that checks most of these boxes we can just say all the parties all the nodes output the value true right that's trivial but it's not useful another good example would be Follow the Leader right we elect this gentleman here to be the leader we do what he says uh you know it again checks many of these boxes but in particular it's not robust against um against a leader who goes malicious or disappears or something like that it's not Byzantine fault tolerant to use the terminology of blockchain so we have these goals like agreement liveness safety you'll hear these terms thrown around a lot in consensus research these are actually not enough right for our purposes we also need decentralization we need permissionlessness we need it to be possible for many parties to participate in consensus uh we need to minimize um the running time of our algorithms and our message complexity this is a lot of what I focus on as a protocol researcher I've used this term consensus mechanism a bunch of times already I haven't defined it yet um so many people naively say oh proof of work is a consensus mechanism proof of stake it's a consensus mechanism this is actually not true they are components of consensus mechanisms in particular what proof of work and proof of stake give us is civil resistance right so we make it very difficult or expensive for an adversary to create many identities and attack our consensus but in fact we need a bunch of other things right we need the ability to propose blocks elect leaders to propose blocks we need incentives to reward good behaviors punish bad behaviors we need this thing called a fork Choice rule which allows us to choose the the new head of the chain like in Bitcoin the longest uh chain rule when there's like a fork or reorganization things like that other properties which we'll touch upon as well but going forward if I say proof of work proof of stake we use it as shorthand for this whole bundle of related ideas all right so let's look a little bit at where we're coming from a little bit of History here so the concept of the problem we're trying to solve was first articulated in 1982 in um this Byzantine generals problem so very very briefly the idea here is you have a set of generals right who are trying to coordinate an attack on an enemy City uh they don't all trust each other and in particular one or more of the generals may actually be a Trader but nevertheless the honest generals need a way to observe the enemy exchange messages communicate with one another even though those Messengers that they send around may not arrive or the message make it corrupted just like happens on the internet and agree on a time to attack the city because if they can't agree then they're all going to fail right so this is the original formulation of what we're trying to solve with blockchain consensus there have been several generations of consensus mechanisms so the first is this notion of classical bft Byzantine fault tolerant mechanisms they all share a few properties like the fact that they elect a designated leader they have this quadratic communication complexity where all the participants need to communicate with all the other participants and as a result they're not very scalable they can't scale to hundreds or thousands or more of nodes the next generation pbfd is practical Byzantine fault tolerance which is a bit more efficient it reduces the number of messages to be sent it works in asynchronous environments like the internet and there are a number of pbft mechanisms that are in production in blockchain today things like tender mint and hot stuff on the cosmos ecosystem and the move ecosystem um but they're still not scalable Beyond hundreds uh dozens or maybe in the maximal case hundreds of validators and of course networks like ethereum and when I'm working on Space mesh we want to support many many more participants and consensus the last and of course most interesting family of consensus mechanisms is Nakamoto consensus so this of course was introduced in Bitcoin uh through proof of work by Satoshi and the key thing to understand is that it enables permissionless participation so you can have hundreds or thousands or even theoretically millions of nodes participating in consensus and the trade-off is that the finality is and the safety is actually probabilistic not deterministic okay so before we go any further I just want to take 30 seconds to highlight the fact that proof of work is pretty amazing right it's really battle tested it's secured hundreds of billions of dollars of value in the Bitcoin Network in ethereum up until the merge um it is it gets the incentives right uh it has some really nice properties like this healing right so it's very very resilient to things like partition partitions in the network there's always some node or some set of nodes somewhere that's able to make progress and produce blocks and it's very simple and very straightforward having said that of course you know we should all be celebrating ethereum's successful uh transition to proof of stake a few months ago through the merge so thank you to everyone who had a hand in that um proof of stake has some things that are very uh wonderful about it so the most obvious is that it's unlike proof of work very energy efficient right I think we're all aware of that fact by now it has some nice security properties as well so it's better able to respond to certain classes of attacks so if we're now in this glorious world where ethereum has transitioned to proof of stake and most of the other production blockchain systems that have launched in the past few years are also successfully running proof of stake why are we here right why are we having this conversation why are we even considering alternatives so proof of stake is not perfect um I've written and spoken a bunch about this I have some resources at the end I don't have time to kind of touch upon all these points here but very briefly I think there's two buckets of concerns that I and other folks have about proof of stake the first is kind of this um this technical bucket so some of the nicer simple properties of proof of work like the healing mechanism I mentioned before the fact that the network can automatically recover from attacks and partitions um as well as Randomness right so proof of work through the mining process we get this very nice output of these random kind of block headers and nonsense and things like this these things can be done in proof of stake and they are being done ethereum provides Randomness through the beacon chain we have a similar thing in space mesh but they're much more complicated and then there's kind of a social bucket which is a bit more nuanced but these are things like the fact that strictly speaking proof of stake is not permissionless because in order to be a validator I need to first purchase coins to validate to stake them I need to find someone to sell those coins to me um you know the the mechanism itself cannot be used to do the initial distribution of coins fairly because in all proof of stake networks you have a set of whitelisted folks or investors or something who receive the coins at the beginning um so yeah I'll share more resources but I think it's worth considering the downsides so to reiterate the blockchain world has kind of coalesced into these two camps the proof of Work Camp the proof of state camp and I think the point I'm trying to make here is that neither is perfect right both have ups and downs um but in particular proof of work has the downside of of course being very energy intensive proof of stake um has this lack of permissionlessness that I mentioned both of them because of the way they work actually lead to this concentration of wealth and influence and I think that the main thing for me is that it's very difficult for a home Miner think of a young person or someone in the developing world or both uh you know without access to to coins and exchanges and credit cards and specialized Hardware to actually participate at layer one in the actual formation of consensus so there have been of course a lot of new protocols that have launched in the past few years and each of them brings something new and exciting to the table I arbitrarily picked three of them here um you know Solana introduces this novel idea of proof of History Avalanche actually has a very interesting consensus mechanism an entirely new family of consensus mechanisms algorand has a really interesting take on proof of stake but the key takeaway here is that as interesting as these projects are under the hood they're all still proof of stake they're all still running a variant to proof of stake and so they all still have most of the downsides that I described a moment ago in addition they're complicated your Solana has obviously had some liveness issues um yeah yeah there's another kind of family or category of protocols which are doing proofs of space so this is now getting a bit closer to what we're doing in space mesh um so filecoin you guys might be familiar with really awesome project awesome you know new ideas um is like proof of stake but it replaces the stake the coins with uh proofs that each of the miners is storing valuable data for the network the issue here is that it's still very expensive and very difficult to run a Mining Node and it actually is also a required Financial stake in the case of filecoin uh Chia I think is a step in the right direction so she is also doing proof of space it is a version of Nakamoto consensus the downsides here are that it's difficult to write smart contracts for it because it actually uses something that's more like a utxo model than the account model we're familiar with on ethereum it requires some specialized Hardware you need gpus or ssds to do this initialization process called plotting and still has some of the same downsides of proof of work in particular a home Miner who has 10 tons of terabytes of storage space can actually only be expected to produce one block successfully every two years three years five years something like this and so home miners have no choice but to join a pool and I don't know if you guys have mined through pools they're okay but we can do better so if like me you share any of the values or the motivations uh that I have for getting into this space which is around accessibility ease of use and access for everyday people around the world uh democratization then you're probably feeling a little bit frustrated with the State of Affairs I genuinely believe that we can do better as a community I think we aren't moving in the right direction uh and so I want to now in conclusion just share a little bit about our approach to this kind of class of problems at space mesh so the way the place we start is recognizing that there are really awesome properties to proof of work and proof of stake and I mentioned a few of these a few minutes ago right so proof of work is permissionless has this nice kind of healing property built into it it's very scalable um and proof of stake is not energy intensive the way proof of work is and so what we're building you could kind of think of it as a hybrid of these two consensus mechanisms that has these nice properties of both we are extremely focused on decentralization so our goal is to get a million home miners on the network I know that's a very large ambitious number but like Chia has kind of shown what's what's possible with some of these ideas and I believe uh space mesh is much easier to use than Shia so I do think we will get there um the way we're able to accomplish this is with a consensus mechanism that is very very scalable right so we have this random sampling kind of cryptographic technology so that the messaging complexity is actually uh is actually constant it doesn't need to grow as the number of participants grows the software runs on every device we're actually targeting low end devices like Raspberry Pi's to make it as simple as possible for Home Folks around the world who don't have a powerful computer or a strong internet connection to participate um very very user friendly you just download an application it takes two three minutes to set up run it in the background you start earning coins you are acting as a true validator at layer one of the protocol home miners receive regular rewards without joining any pools from the protocol explain in a second how that's possible and it's economically sustainable so you uh you cannot be priced out of the network by whales or industrial scale miners which is of course what happened to home miners in the case of like Bitcoin and ethereum in the early days uh I I could spend three hours up here talking about space mesh I have to do it in 30 seconds so a very brief overview um we like to use space and these proofs of space to emulate proof of work uh mining that's how we keep civil resistance we have two consensus mechanisms so this is a bit of a unique approach we have this very fast uh pbft kind of category consensus mechanism called hair which allows a subset of the validators the miners to agree almost instantly on honest blocks and transactions and then a much slower vote counting mechanism that runs afterwards called tortoise that is much more robust against attacks that has this kind of nice self-healing property that I keep mention um we have these kind of dual proofs these poet and post poet stands for proof of elapsed time post is proof of space time and so miners chain these proofs together to prove that they not only have a certain amount of hard drive space committed to the protocol but that they maintain that commitment over a period of time and the way that we're able to achieve this kind of fairness to home miners is the fact that actually at each block height we call them layers we actually have many miners many of these home miners participating and uh and providing blocks and therefore we're able to get guarantee at least one slot and actually probably many dozens or hundreds of slots to even the smallest miners per Epoch so that's every week or every two weeks and you can think of a small Miner as being like 100 gigabytes so kind of like a standard laptop or desktop configuration um virtual machine will be fully ebm compatible we all love ethereum here so developing smart contracts should feel a lot like it does on ethereum very familiar and very comfortable and we've been working on this project for four plus years almost five years it's a labor of love we are officially launching our Genesis in a few weeks so stay tuned it's a very exciting time for the project you can join the space Sorry join the test net if if any of this is interesting and in conclusion just to share a little bit of the vision where hopefully we're going um I think my vision for what we can achieve in blockchain and cryptocurrency and web 3 and by extension the direction that kind of these consensus mechanisms need to go is a world where people everywhere like regardless of where you're from regardless of you know whether you you're from a wealthy country or a poor country your age your access to existing Financial networks or not you can not only transact in the network participate very cheaply but you can actually participate as a full node right you can participate in the consensus mechanism itself and therefore be fully permissionless fully trustless and not need to Outsource your trust to a third party like you have to do if you're in a pool or something like that or if you're running a light client and we have a lot of work cut out for us to get there but we are moving in the right direction and I hope that these ideas are exciting to you guys as well if you have one takeaway from this talk it's that there are pretty serious trade-offs between proof of work and proof of stake right each of these protocols mechanisms has some great things about it some downsides as well and there are alternatives there are folks including the space mesh team and a few other projects that are doing work on Alternatives so again if any of this is interesting or exciting I encourage you to check them out um very briefly some resources you can check out the space mesh website if the technical side is interesting you can look at our protocol documents um I want to just mention that like I've relied very heavily on the protocol documentation of a bunch of protocols when putting this together so I encourage you to check them out but uh it's really hard like the documentation on consensus mechanisms in particular is very incomplete and most of them only cover kind of a happy case they don't talk about what happens in in Failure scenarios and attacks and things so we have a lot of work to do improving this and if that's something you're interested in talk to me about that as well um and more on proof of stake specifically you can Google this there's a podcast interview I did where I was able to go much more in depth into my own reservations about proof of stake I think we're right on time uh sorry again for speaking so quickly I'm Lane my DMs are open on Twitter that's the best way to reach out to me thank you guys so much for for your attention enjoy youth Denver we don't have any time for questions right foreign
Automatic transcript — names and jargon may be misspelled.