New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

PSK (the Pool for Proof of Stake coin): Proof of Stake and Casper's FFG - Delia Hallberg

DevconTue, Oct 9, 2018, 12:00 AM

Recording by Livepeer.tv

Transcript

so now it's with great pleasure that I pass you over to Dalian hard-worker [Music] hello hi so today we're gonna do a small are actually a big journey through the world of consensus algorithms with all three topics so it's sort of an incidence that today we're covering all of us actually consensus but it actually it's not a coincidence because there is a lot happening out there in the ecosystem today so basically I'm gonna talk about POS about PSK the proof of stake and the theorem 2.0 Kasparov I don't know whether you have read about it but a cerium is gonna switch from pow2 POS which is a massive you know project so I think it's good for all of us so I'm on oh yeah I am really how dark and I'm a governance researcher so disclaimer I'm not a techie i do sociology i do social sciences and i'm trying to make sense out of everything to discover the meaning right so for me it's always super frustrating to be sitting somewhere and it's like a highly technical talk and you know you just drift away so i don't want that to happen to you my mission is that at the end of this talk you understand casper with me so first question who is relatively new to the space like to decrypt a space or it's just starting to get an overview please raise your hand cool welcome that's nice so who has a clear understanding of what let's ask a consensus algorithm is okay so a conscious algorithm is just basically a way to agree like old notes like hey which change shall we follow which blocks shall we mine and then all the network comes to an agreement so this is more or less an overview so who has a clear understanding of how we're not the other way around who does not have a clear understanding of how POS work okay I'm gonna so I'm gonna go further into detail into that Thanks and who has a clear understanding of how Casper works you know okay so you're gonna help me out in case like okay so thanks for the overview so I can adapt a little bit my talk to that so POS POS proof of stake what is that should we even care that's a screenshot from coin market cap it's from last Monday not from last week so that this part here looks a little bit less depressing and if we look at the top ten coins we see that already four of them in the top ten our POS based coins Cardinal neon stellar and AOS our POS are using a POS algorithm so apparently POS is catching up is there room in switching and I'm asking right so before we start I'm gonna explain you my structure first I'm going to give an overview about POS and PSK the company I am working for the major problems that powa pauses the solutions that proof of stake gives pool of sake and then we're gonna dive a little bit further into a serum Casper and I'm gonna explain FFG and you're gonna understand it so as I already mentioned any POWs facing fundamental problems the first one being the issue of centralization here we see a pie chart of the mining pools in Bitcoin and this was taken last Monday right so we see that there is actually quite a lot of centralization going on if we count the top three pools together there already are more than 51% which is a threat to the network and you're thinking maybe yeah that's Bitcoin but here we are at the Syria Meetup cerium is doing better No so here we see that if theorem is even currently slightly more centralized in terms of mining pool size hash rate highest rate power per remaining pool we see ether remind and f2 pool to already nearly have more than 51 percent so this is the first problem the second problem is the energy consumption PLW is extremely energy intense and we see here from march 2007 to March 2018 the energy consumption development of Bitcoin and it's at 56,000 terawatt per hour right now and this is something like the energy consumption of New Zealand and then you're thinking oh but that's Bitcoin and we're it's Syria my serums much better in this case you're right so it's only only 16,000 terawatt per hour and for the people Chris for you who said that yeah but Bitcoin and compared to the financial system in general I took a look so here you have one the energy consumption of one Bitcoin transaction compared to ten no 100,000 visa transactions so I mean it's like comparing apples to bananas or something I know that there has been a lot of critique of this comparison but I'm making a point and there is like a point right and then there is a third great massive problem with P o w consensus algorithms which is you know what I'm aiming at yeah yeah exactly scalability so here we see the etherium transaction chart transaction chart and the read this here is where crypto kitties and already so cryptic kiddies is a Dieppe the first Dieppe that was running on the Syria Network and basically when this started it reached up to 1 million transactions in 24 hours and this nearly smashed a network sector in sections were not working an IC o---- had to be postponed and the breathing cycle cryptic eighties was threatened you know so this is just just just examples of what major problems actually coins cryptocurrencies are facing and there is this new thing called proof of stake we're just solving a lot of these problems not all but a lot so what is actually proof of stake and proof of work you need mining you need miners to perform work mathematical algorithms to create new coins mpos that's not the coin because usually coins are already pre minted pre-existing and you don't have miners doing work to validate your transactions hello welcome but you have nodes like validators that are chosen sometimes randomly sometimes similar randomly and these nodes validate transactions so you no longer have miners doing computational work you have validators and there is no mining reward but instead you have transaction fees so if I want to send a transaction on the POV base cryptocurrency I pay a fee for the validator and not for the miner doing work right so there is a variations of P POS in the first one being like classical Unchained proof of steak which is peercoin black coin these were like the first adapters of POS and then a sub variation is delegated proof of stake which is similar adaptations not important right now and as a second branch as a stream of thought you have the Byzantine fault-tolerant agreements which is Timmerman stellar and there you also have variations of it so Kasper is going to be sort of a variation of the Byzantine fault-tolerant agreements good so far there are like other challenges so miners have their challenges right they need to pursue like super expensive basics and they have to catch a transaction so now there are like new challenges for forgers validators or we can call it like mining 2.0 because it's like an upgrade so basically the purp ability so if you if you are not-- a computer and you download the client and you want to start being a validator and proof of stake the probability on which you are going to get a transaction to validate depends on how much stake coins you have right so your staking your coins and depending on how much wealth you have in that way you are going to either validate or not validate a transaction so basically the more coins you have the higher the probability that you're gonna validate and also your node has to be online 24/7 and some coins POS coins coinage is important so even if you go online for one second you're blocked for 30 days for example only afterwards you participate in this lottery of getting to validate a transaction so this is where pool of stake basically a new kind of pool was created it's actually super exciting because today we launched our website this was a lot of work but we managed to launch the website and this was founded by three italian guys that are very active in the italian crypto community and yeah basically they saw where the general trend of the market is going and tried to already catch that trend so I'm just gonna dive shortly into the technical aspect or like how how a pool of stake could actually work and then we're gonna continue with Casper so basically this is Bob most of you know Bob he's our user and he has a wallet right so he owns POS coin let's say hitam he owns the kitchen so he transacts his kitchen on the PSK smart contract which is on the kitchen blockchain he makes a transaction and this smart contract immediately initiates a transaction back of an IOU token which means that basically you are always in control of your coins of your POS coins and you don't need to trust the pool you don't have to rely on somebody else making a transaction because a smart contract is doing that for you and this is also like a new thing that the pool it's not a centralization it's not a centralized node but it's running fully on smart contracts on the native POS joint chain so step number two is that so now the POS coin has been referred transferred into the PSK smart contract and then what happens is that the pool starts forging right the pool has a bigger network weight start forging and it starts creating tiny little rewards and for these tiny delivery words Bob gets daily and I owe you back so basically he gets a credit and exactly he can withdraw it let's give it because it's so the basic mechanism is you exchange your POS coins for IOU tokens so due to the use of smart contracts it's fully trust less and fully decentralized and also solves the problem for most forgers that they have to be on line 21 seven because obviously we're going to make sure that our servers and everything is online 24/7 so the bigger the pool the bigger than that work weight the higher the rewards because you know the higher probability to validate the transaction and this is for POS coin holders great opportunity to not just let your wall like coins rotten in your wallet but to stake them and to generate passive income so this is basically what we're currently working on from today our website is online so have a look if you're interested and now we're gonna continue with Assyrian Casper so if you're in Casper has been circulating this ghost has been circulating since 2014 already in 2014 vitalik and the others started working on it and it's been really confusing I don't know if any one of you try to catch up on it but there was a lot of like conflicting also information coming up so now after DEFCON 3 there is some clarity finally and that's what we're gonna talk about so in the first implementation so Casper you always hear about F F G C BC what is that so it's important to understand there is a two-step it's a two-step singing the first step is the Friendly finality gadget which is a hybrid POV POS system because obviously a theorem is a massive eco system and you don't want to make like this huge step at once you want to slowly transition so that's basically what the Frenchie finality gadget is for and we're gonna dive into that one because it's already enough you know it's good to understand first this one and then the second implementation with which is going to take place later at the later stage it's going to be the pure POS consensus algorithm which is correct by construction and maybe if it helps you a little bit to remember it talak was mainly working on the FFT the Ferengi finality gadget and that was the main like designing the CBC correct by construction so we're gonna focus now on the friendly finality gadget it's important to understand it's a smart contract it's just a smart contract which is a POS layer on top of the regular P owt so the PLW team continues as regularly as always so miners doing work and they mine and new blocks are being created and on top of that you have Casper the F of T which is a smart contract if some of you we all are probably most of us on earth right if we want to become a validator for the F of G we just have to we just have to deposit a certain amount of eve on a certain wallet in order to become a validator the I have written on purpose here X because the amount has been changing in the first version of the test that so FFT is awesome to test net I think you had to state like thousand five hundred es which not all of us can afford but yeah I think they have lowered the bar and also really important to mention here is previously and older versions of F of G and was communicated that there is going to be like two type of messages that validators can send prepare and commit that's no longer the case so now you have as a validator so your computer or your a note and you want to validate the transaction the only message type of message that you consent is a boat and a vote has to reach two-thirds majority validators by weight means that this 2/3 majority is not on how many people are actually voting on it but on the weight so it means on the total amount of state coins that they have right so you want to achieve a 2/3 majority of staked coins and what is also quite new about FF Jean Casper what you don't have in other BFT algorithms is that validators are fully accountable so that means that at every time everyone knows what the others are doing and if somebody does something wrong then the others will know and will report it so that's an extra layer of security and we have finality every 50 blocks but I'll explain in a second what finality means okay now don't worry I have prepared it also visually so that you can see and actually imagine that it will make things easier but I'll first explain that so you have epochs that's you so a miner the miners are mining their blocks and every 50s block is a checkpoint and every 50 blocks are a park and basically the POWs miners just do their regular work to deter they mind and every 50s block the validators are basically being cold and they're in there said like hey let's vote on the checkpoint right on a POS layer and they're doing that and finality is achieved when two consecutive checkpoints receive a two-thirds majority what means finality finality means that it's final you can never revert to history you can never go back into that chain it's done like right this is a very important mechanism against long-range attacks basically a long-range attack is when you prepare things in a way that are profitable for you you make a scheme and then you go back in history and for example you go back to a point where we have like a lot of money and all the others are you know screwed so fine so this is a long-range attack and finality is a step against long-range attacks and FFG offers accountable safety where it means that the two conflicting checkpoints that there are not going to be two conflicting checkpoints mostly implausible liveliness is that you want your network to keep going like right you want to continue making next blocks and you don't want to get stuck somewhere and be like oh wait it's like Oh what do you think I know what do you think I don't know and suddenly it's not continuing so life enos means lightness means things go on the next block is being mined and next the next checkpoint is being created so things go on so this may be sounded a lot very like theoretic so this is a something that is supposed to be a checkpoint these are our validators and these are our miners so now there is a checkpoint and right the validators have to vote so the validators submit their boats data the miners received the value-added votes and the miner start doing their work they're working and that uh justified checkpoint it got like a two-thirds majority or in that case it's a 3/4 because it's extra validators and one right so so the point got a majority and it got justified yay miners can continue working in between here you you should imagine there is like 50 blocks of pure mining going on I have left it out for sake of simplicity so now miners mine right and there is a next checkpoint oh yeah this is an epoch the 50 blocks that I was talking about so there are 50 blocks in between and every 50s block is gonna be like verified so now again we have the next checkpoint and the validators submit their votes when they're submitting their votes it's always important that they refer to the correct source and to the correct target which if you later read further into Casper it's gonna make it's gonna be important so yeah so the miners continue mining and tada we have a justified checkpoint the second justified checkpoint and we have here a finalized checkpoint so as we see we had two consecutive checkpoints in a row received 2/3 majority so this one got finalized so after this one we can never go back again in history oh we can but it's extremely expensive so it's not lucrative to go back in history and yeah things continue exactly so this is basically FFT more or less it's really just a smart contract POS smart contract on top of the regular PLW work okay so what is really important about FFG except for the voting is the slashing conditions I don't know if you're right into the slashing conditions but there has been a lot of rumors like who like super strict slashing conditions like loaders validators can lose their steak the steak get burns oh it's so strict you know you make a mistake and everything is lost so yeah that's pretty much it misconduct is being penalized and this is a security measure because in other POS coins until now you only rewarded good behavior right and black coin everyone behaved well and they got their rewards and everyone was happy and then it was this one evil person like and he didn't get penalized for the evil behavior right so this poses a threat to the computer network and that's why we have to slashing conditions in FFG the first one being no double vote so basically if I'm a validator and we're having our justified check like hey for which checkpoint shall we go and I secretly vote on both that's not possible like I'm getting slashed and the second one is no surround bot which is I'm gonna explain it with the visuals because then it's easier to understand but basically if somebody misbehaves if you're a validator and you sneakily try to cheat then your deposit gets burned right which is super expensive it's lost it's gone like why it's not being redistributed so basically why it gets burned is that it makes the cost of an attack even higher so a lot of economic incentives to behave in a good way to the network and the second one is as I mentioned already earlier right we have to like control everyone knows what the others are doing accountability so somebody's acting evil and the idea is ones like oh I know he cheated like he's a guy and then the one who reports gets a reward and this reward comes from the burnt deposit of the evil person evil validator so let's have a look at how this actually works okay so we have our in regular situation right we have your justified checkpoint and we have our elevators and our miners everything's nice and then suddenly boom we have evil validators that double vote they double vote it so what's happening we have to justify checkpoints on the same height here which is complicated right so we don't want to have that situation so what happens is we have here one honest validator and he's like oh wait I saw that and he is basically gonna provide evidence to the miner the miner is gonna construct my in the next block and honest validator is happy because he gets a rapport a reward but what happens next is that boom the evil people get slashed and they lose their deposit and it's burned and they're out of the game so super expensive this is the no double vote which is already quiet sufficient to keep the network going and to incentivize validators to be honest and there is a second slashing condition which is sort of yeah so it's a second slashing condition is no surround vote so basically let's assume that here we're I'm evil validator I want to like create chaos and network so what I can do and I don't want to lose my funds right I don't want to lose all my staked coins so basically here is a justified checkpoint and there is vote I vote here and then I go offline you know so I didn't double vote here on the same height I have included two formula maybe some of you are super like quick on formula that's a from the Casper paper so basically what it's actually saying is that and then the validator cannot vote on two distinct votes and that they always have to be within the span of the other boats so basically I cannot vote here and go offline here then vote here and then later wrote here because like that I would actually double vote right so we see like two chains and I participated in both votes that's not how it's working so if you do a surround world like going offline in between and like playing around with your votes boom slash deposit per whant so this was actually the second flashing condition this was F of T it was yeah that's actually it and the good news for you is yeah so I really hope that you understood it because it looks really complicated at the beginning but when you look into it it's not and it's super important that we understand what's happening in the ecosystem because it's gonna change everything about cryptocurrencies so please any questions yes yes the guy in the gray yeah yeah basically yeah I don't know how exactly the Mack I would say that mechanism works as a regular PLW so basically you have that request into the network and miner with the strongest hash power is taking care of it yes please yeah I think that buggy notes I mean if you have the the client running on your note and you've you don't interfere with a coat nothing's gonna happen like I mean there is like full accountability and if for example there was a buck in the Syrian coat then obviously you're not gonna get slashed but for your code to be buggy you have to take care that it's buggy because otherwise it's not gonna happen so then you basically yeah interfered with your note oh yeah okay thanks there's please so that introduces a mistake into an operation for work system but it doesn't actually takes down any proof of work off the system yet right so we still mine and we still use the same amount of energy we just put the second layer of POS on top right hmm yeah basically we basically F so you were asking whether we continue to have the same situation with P o W and we're just putting a layer on top of POS but we're not solving the real quiet-like the real problems that POWs posing okay so yes but we also have to be aware that this is a very risky transitioning and that you as a ecosystem have to take care of everything that you're changing and the fundament of your architecture is going to go right so FFG is just really the first step also as a proof of evidence and eventually they will transition to C BC which is then the pure POS algorithm and which will or even get rid of PLW yes please [Music] so the first question you were asking was the issue of scalability and whether POS is actually solving the question of scalability and it is to a large extent so for example a cerium is going to introduce the sharding as a scalability issue but charting is directly connected to POS you cannot have a shorting mechanism with PLW you can only have it with POS so basically with sharding they want to increase it look to like I don't know how many thousand transactions per second and in POS / is a bi have introducing an easier possibility to become a note you can have much more notes and so the transaction is not that heavy working and by getting away of this basically work being done you can ensure much much higher transaction rate per second so the code or like the algorithm is giving that possibility but how like the different chains implemented and what actually then gonna happen it depends also on every chain so it's not easy to speak of POS as such because as I already showed earlier there are a lot of sub variations and it's PFT delegate proof of stake whatever and then the first question that you had is whether it's solving this issue of centralization to a large extent so it's obviously gonna pose like different questions so I said like peeled POS is solving most of the question of the problems of POV not all I said that and basically yes so basically now I think 75% of the entire Bitcoin network resides and data centers and China and Iceland and wherever so 75% and data centers that's not very decentralized right so with POS you can have like all of us we can become notes and POS right we just have to have a computer which has enough RAM space we have to have stable internet connection more or less if you have a little snake still in the probability and in whoever has a bigger snake or whoever has like a bigger power people do this yeah so you just said that basically and QV somebody can mine and in POS somebody can become a validator did you check recently the prices for an ASIC so does somebody know how much an ASIC is costing right now yeah yeah so you have CPU and GPU I'm just right now just generalizing so yeah so the price there has been a huge market shortage of a6 or CPU GPU and the cost right now is like a 10,000 so if you want mine you first have to invest that certain amount and then hopefully you get to actually mine a transaction so there is like real life problems to that okay just as a short mentioning it's also in the interest of all of us we have like two more talks and they're also gonna be intense interesting and long so maybe let's keep the two more questions exactly you decide oh thanks for all I have a question regarding availability why why Doris why serve like the general requirement or being available all 24/7 I mean like what are the possible like attacks that you could perform like going offline so as a speaker that's a very good question I'm gonna repeat it for the life Broadcasting so basically you said why is availability so important right we can just sum it up like that so why is availability so important the answer to that could take very long but I'm gonna try to keep it short so basically imagine that you are in the checkpoint situation you're like okay so who is going to mine who is going to validate the next block and then you say okay you go and then sunny you go offline and like oh no who is gone who's gonna do the next valid validation right so that's why you basically the coin age issue is sort of an incentive to take care that you're always available and that when you get to validate a transaction you are actually there like you have taken care of your connection basically and having a availability of it's again an issue of network security and Santa's ation stuff like that [Music] when you milady or any there's like slashing motion that way I'm not gonna repeat that for the live streaming yeah you're totally right and it's always a matter of design choices so a certain set of design choices has been taken and what you were just suggesting is also possible but then this is a different set of design choices maybe we can just talk about it afterwards yeah okay so when one more Maurice you're peeking one of the economic incentives that prevent minors from becoming pollinators they're super welcome to become validators things like like I mean for example imagine that situation you are a regular guy more or less and you want to start mining and you have to invest like ten thousand dollars you have to set up so it's a lot of like costs and then you have invested all that money and suddenly it's taking ages until you can get to miner transaction and it's not very profitable so maybe currently in the test net it's still expensive but let's say you at some point you decide okay I'm gonna stake a certain amount of eath and I'm becoming a validator and by that you get the possibility to Forge and by forging you get daily or not daily rewards that's PSK so with forging you get every time you basically validate a transaction you get the fee of the transaction so that's another way to generate to make money basically and it's a in the long run it's gonna be more lucrative or more easy for regular people that don't own the farm a data form yeah okay so I think the two questions are now over please yeah okay so a lot of things we didn't I'm just gonna wrap up so that you we all remember together what we were talking about so we talked my POV is not sustainable we talked buy a POS what POS actually is proof of stake how mining 2.0 works like with the 14 also thanks for these questions we discussed the two components of Casper me being FF G and C BC we dived a little bit deeper into F F G voting and final and we discussed to slashing conditions I borrowed the slides from Carl I asked her from a theorem whether I can use the slides he didn't respond so I just used him I really asked and I said yeah I asked on Wednesday and he didn't reply so I hope it's fine for you and what we did not cover is the POV PLW attack resistance of POS so you can always have that condition where miners and foragers like validators collide and then that's another messy situation we did not cover that then you have to correct the construction which is the second step of kaspar we did not talk about that one charlie we mentioned it shortly sharding is part of CBC and most importantly we didn't talk about the etherium governance issues which obviously I'm mostly interested in but that would be another separate talk so here you can also have the presentation afterwards a few like really interesting sources where you can get all the information and because our three founders are Italian grazie Mille if thanks a lot pull off steak that IO is our website and you can find me on LinkedIn or just drop me an email or ask me after the presentation if you have some questions and really thanks a lot for your attention [Applause]

Automatic transcript — names and jargon may be misspelled.