ZKPodcast: Math competitions, crypto as alchemy & Gasper with Yan Zhang

10 Jul 2020 · 57:14

Anna Rose and guest host Tarun Chitra talk with Yan Zhang, a professor at San Jose State University, about math competitions, math education, and why he thinks of crypto as a kind of alchemy. They also cover the Gasper paper he co-authored with the Ethereum Foundation, which combines the Casper FFG finality tool with the LMD GHOST fork-choice rule into the proof-of-stake protocol underlying Ethereum's beacon chain.

Speakers

Topics

Transcript

[Music] welcome to zero knowledge a podcast where we talk about the latest in zero knowledge research and the decentralized web the show is hosted by me Anna and me Fredrik so this week myself and guest host Tarun Chitra chat with Jiang yen about math competitions how crypto is like alchemy and his work on the gaspard' paper before we start in I want to mention that I'm currently looking for someone to help me out on all things ek

that is this the zk podcast the ZK Study Club the upcoming ZK summit meetups that I have planned for the summer kind of all the other things around zero knowledge as well as the ZK validator now I don't know if you've heard about the ZK validator it's a validator that is currently validating on cosmos and Kusama very soon it will be on polka-dot and the purpose of this validator is to promote privacy and zero knowledge technology on the networks that we work with in general there's a lot of things going on and I want to open the door to other motivated people who might want to come join in and work on these with me so if you're looking to connect with the ecosystem to learn more to potentially get involved in the research and

especially if you are very organized and have some experience producing either events content or generally organizing people in the past please drop me a line I'm looking for somebody to join on a part-time basis to start but this could be expanded out as the work increases I've added an email in the show notes you can also tweet at me if you already have that contact if you see this as an opportunity you think you might be the right candidate please do get in touch so now here's our episode with Chang Yin and guest host Tarun Chitra [Music] so today I'm here with guest host Tarun hi Tarun hey how's it going good happy to be back - on my second second

guessers thank you for joining again so today we plan on kind of going deeper on the math behind consensus and we're gonna focus on the Gasper paper and which is an instantiation of Casper now if you have not listened to our episode with each high on consensus algorithms that might actually be worth doing before this episode because I believe we're gonna be referencing that quite a bit and I'll add this link to that in the show notes so today's guest is Jiang Yan who's the professor at San Jose State University in the math and stats department and a consultant for the etherium foundation as well as one of the co-authors of the Gasper paper so welcome to the show hey thanks happy to be invited Oh Yin I think as a starting point it

would be really great to hear from you what first got you interested in this field and kind of what led you to this this kind of paper that you've recently contributed to yeah awesome I never actually felt I was going to do crypto actually if there's a source what happened was I took crypto as a minor during grad school MIT because you're supposed to have a major and two minors and it was mostly a pure mathematician but I really liked the crypto course by Sylvia McCauley and then I like this so much that when I was trying to become a natural grass eater by taking our hell calls which are like this three-hour oral I asked Shafi goldwasser to be my examiner she basically kicked my ass on

the balls by I don't want to miss I don't misquote her but I think she put a paw on the board and she didn't like totally sob and she just wanted to see how I react to it I got on bias so hard that after there cause I was asking her how the hell you're supposed to do that and she was like another things you tried is okay this might probably worried whatever but anyway I like really fell in love with crypto I never wrote a paper on it because just a minor subject my major is actually like networks and discrete math you got like a mysterious you got an unsolvable crypto problem like it oh yeah yeah it's like something very like meta ironic yeah cryptographic problem or something yes but that left a good memory because it was like you know fun problems and

the kind of thing I really like thinking about even though I ended up doing pure math kind of mostly so flash-forward like 10 or 20 years or I forget how old I am at times you know you know how these things go yeah so I run one of the things I care a lot about is I I run a summer camp for gifted youth and then what I do is I sometimes we invite speakers there and then you know I made some friendships that way and I one of those one of those friends later was like hey you you know like you might be good for descriptive stuff and I didn't really think about it too much because to me it was really just the whole Oh big coin is a scam kind of view that a lot of academics who

are like allergic to stuff like that had at the time but I actually really like new fields yeah so when I saw there was this talk a really great talk by Ali Brahimi who was talking about how machine learning was like how came-- that really struck a chord with me because you know I think that's where interesting science actually happens because that's really the start of something great and then everyone's doing stupid things but you know trying to figure out something good so that part attracted me about crypto so then I got in touch with the a theorem foundation through the friend and then I've been kind of doing work there by both helping them run these workshops

where we focus on theoretical problems which I think I invited to room two one and that's actually how we how we met because I think there's a lot of good valuable math problems in crypto and at the same time the etherion foundation was kindly enough to support me at my university which is not one of these elite research universities mind you is just like very normal state kids but it kids with a lot of with a lot of life to them very authentic people to do research with a bunch of undergrads and grad students so the gasps where paper was actually one of these projects that if you're them help fund so that's like their this thing called a camcos program and I helped direct that SJSU so the Gasper project was like this collaboration between Mattel like Danny

from etherium me and like six of my undergrad students so you know there's a lot of cool teaching of like these people were completely new to the thing and and I'm actually working another project another campus project right now which is on the proof of custody game so the game theory layered for data availability in EVE 2.0 sharding so that's actually the problem that's been occupying my mind space here this is also an excuse if I forget Gasper stuff as we talk it my mind is somewhere else okay but hopefully you know we hopefully at the end we can act we can dig into that as well I'd be super curious to hear what you're thinking about on that yeah I love I love to talk about that at the end but yeah so that's kind of the

lone like so true this route in that yeah I worked on technically on these projects that I think helps the etherion foundation and on an organizational level I'm playing some sort of ambassador role between the etherion but also like you know theoretical mathematicians many of whom are my friends just to tell them hey I know there's a lot of out there in the space but there are some real problems and like what can we make progress on so that's been that's been really fun okay for that one I also need a shout out to the Stanford center for blockchain research would Byron and Dan form a and because you know they're good people who do good work yeah another interesting thing is that you

have worked in other forms of alchemy like this a drink has type of stuff maybe maybe you should also mention that you've worked you your other forms of alchemy who's kind of worked a little bit in string theory type of stuff yeah yeah that's yeah let me let me talk about that for a little bit and so for example my PhD thesis was actually not an extension of my visors research direction what happened was my advisor the Great Khan materialist Richard Stanley gave me some problems and I made zero progress on some of them and some decent progress on others I've got at least one paper on combinatory star in grad school thank God maybe even two or three there was a visiting physicist from brown Sylvester Gates who had this kind of

half-formed problem in his mind which physics speak which means of course none of the mathematicians in the department understood it but this is the stuff I like I like things are not yet defined well and especially given and kind of like what mathematicians would call crank like language of their original fields I'm pure raw so I like that stuff so I like I think I took his raw stuff and really tried to listen and empathize with the way physicists thought instead of forcing a math thing on it and then tried to translate that to a mathematical language which I helped do and improved a lot of structural and enumerative theorems about it like did complex works on it so that was my thesis I think that's representative what I mean when I like this alchemy stuff because I like taking what is like

a very raw deal but extract some math from it ya know yeah so I mean I think historically actually there's been a lot of success a lot of kind of the edge case success in maths in particular has come from people who've done this kind of translating alchemy into chemistry type of work you know there was you know Witten winning field medal for for really the Morse Theory type of stuff there was a lot of stuff in theoretical yes something super interesting about kind of your career trajectory is it there's been a lot of people who when they've taken kind of a career risk of having random many different narratives and not a single narrative they have been kind of successful in maths but one

of the interesting things I think that happens is is that like people aren't quite encouraged at a young age necessarily to do do that type of stuff I think especially in math if you look at the way mentorship works at a young age people you know either do contests or they're kind of given these combinatorial problems on there there's kind of a tutelage that gets you to go down a certain direction and not really take these kind of big risks so given that you spend a lot of time mentoring students especially students who might have a lot of math aptitude that might be like oh crypto is alchemy like how could I do that it'll like put me on the wrong trajectory how do you kind of treat mentorship with students especially as you steer them towards things that I think are at least from

the academic side viewed as a little bit ah God unusual yeah yeah currency is I mean I myself went through duh I would say the contest pipeline I was pretty successful in that and I meant there a lot of kids were very strong at contest so I kind of know what you mean well I think the first thing is you know it's gonna be me being a little bit more realistic I think it's super important not to proselytize a field or a particular direction of research even though I like crypto I try to first select for people who would like crypto I think he was like if you try to proselytize you must start like emphasizing things that are not the

emphasis and that's that's what happens in academia yeah it's like weird competition of people for for talent but you're like blowing up the benefits of your field whereas a lot of fields are just people playing with math puzzles but for the most part just different kind of math puzzles so I think what I do is I really try to select for students and if it's in a contest where the students don't even know what they're interested in then I really try to look at their personalities and be like you like computation so why don't you write some code that will like look it that will simulate this part of the process so that's what happened with one subgroup of the kids I was working on at this paper they weren't really into the consensus theory but they liked

programming so instead of forcing them to learn all that stuff I'm like well why don't you run a simulation of things are talking about and that will help you learn our stuff so there's just a lot of I think being a good mentor is really about finding what the person is actually truly interested in at a matching dad up what would they like as opposed to just try to say is only moral for you now to learn crypto currencies excuse up a good bad back phrase like bad incentives like I think I guess a really good point actually just the fact that you know there's unfort unfortunately there's almost like a sales pitch that goes along with yeah recruiting to your department or recruiting to your company I mean obviously but that means you might be over selling and it might not attract

the actual people who could be genuinely passionate about that thing I do a lot of mentorship where on one day I'm telling you a kid to go to grad school and on another day I'm telling a different kid to stay - hell away from grad school because you know their personality differences so I completely agree with you and sort of I think some of the work you've been doing at the EF especially kind of these these workshops that that's kind of brought together a lot of people from from different backgrounds to work on sort of the big problems that haven't totally been solved yet so how did you how do you you know how do you structure these things there's this element of a hackathon to them and

there's also an element of like not quite a math contest it's it's not like as intense but there is like kind of a little bit of that element you know how do you think about doing that and how do you how do you pick problems for that how do you you know yeah just like walk us through your mental process for that because I think it's a very unique thing to have a hackathon for doing research because of that I think I've never seen that it really in any other field no thanks for even saying it that way because that makes a lot that means a lot to me like I really want to try to design something that's good and kind of unique first of all credit goes where credit is due that would not be possible without al Bernie from the etherion foundation

Alex again who's like a really awesome value adder who helps us organize those events and like I said the Stanford center for blockchain research so and my involvement which is mostly kind of this planning the research topics things like that I think the biggest thing I tried to do is because I'm kind of away from the hype like I sometimes don't even know oh where would a cool sexy new crypto that's coming out I just you are you say Albert's Network right and then I tap into kind of a bunch of people who are working on different mathematical things in this space and I just kind of

ask them okay what is the real math here like don't sell me your coin like what was the math problem and that gives me kind of a kind of top-down view on things what I again I really don't think I'm an expert at it just like entire subfields I haven't touched right but once I get enough broad base of that I can start designing a kind of a program like okay these are some good topics you know with lots of good feedback from Albert and obviously other people I talked to like you know India theorem foundation or out and then we just try to really bring a program where we're work oriented and that philosophy really came from it's a kind of an anti example I looked at

mathematical conferences and I decided let's think about what is boring and don't do that is that let's do what's really good which is with when is a math conference good is when you meet a friend you like working on a problem and you sneak out from the math conference to work on a together over coffee on the table outside while the speaker is talking you inside yeah so if you look at that and you're like how could I extract a model from it I think the right model to extract is why don't just minimize talking and make more time for people to work with each other through coffee and that's kind of like how this structurally forms and obviously have a lot of kind of some organizational experience there from running say this summer camp forgive the students that

translates well into this I basically treat all these adults as students like how do I keep them engaged while I keep them engaged by letting them drive their own exploration instead of being forced to listen to what someone else is doing on their research and that's I think kind of the 80% of how those workshops are run like I've been trying to come up with a concept for like a zero knowledge research thing so I do the Z case summit but that's an event that's a you know that's the permutation it's an event but I really wanted to I've been actually like thinking about doing some sort of research weekend or two-day thing a bit like a hackathon but the problem with trying to put the hackathon models you can't necessarily build that much yet with like your knowledge proof

this sounds like you you can't build little products that you could demo so well one beauty of having a young field is you get plausible deniability and that this is young and like possibly deep even learning is like a successful and I think that's true of our workshops - I don't want to pretend we solve all these big problems we make some good progress on some problems and find good translations but one big outcome just have a lot of people who know crypto coming in and they teach a lot of things - these really smart people that don't know crypto and that's a win so I think if you frame your kind of ZK research thing as a learning / research experience that opens it up a little bit

also like these days I think there's a lot of creativity you can do like maybe it should be done over a discord server okay cuz we probably want to virtualize some stuff knowing that we have the freaking pandemic out there so I think that actually opens up your space of exploration yeah yeah and you know seriously if you want to pursue that feel free to send me like a telegram or something I might even be able to help you design it with some cycles you heard it here first you might be doing a research project a research weekend so I guess to kind of move a little bit from the workshops to to the Gasper paper you know I think an interesting thing about having these kind of research hackathons as you end up making a lot of non

peer-reviewed research and I think the cryptocurrency space in particular has been want of really doing this large amount of non peer-reviewed research I think there are times it's been extremely beneficial it got the message out quite quickly you know sort of sort of akin to the Poincare conjecture was proof but at the same time it it also has led to like a lot of nonsense that's come out - right so you know as you've worked on this paper you kind of were able to take things from these types of in-person events and take a bunch of people who have worked on these problems and condense them into something that ostensibly could become a peer-reviewed paper so how do you view the role of peer review in the cryptocurrency space

and sort of how do you how do you view this the Gasper paper as an example of that because it it's quite a quite an interesting paper because the first half of the paper is almost like a review and that for people who are not encrypt or currency or distributed systems to be able to read it and I think that that kind of line between proving theorems and giving kind of a big description that you're trying to walk there so so yeah what role is PureView play in this well first of all I'm lucky to be working at SJSU and not as like say one of the elite are ones where I had my training because I'm a but I'm gonna get a little bit political and but I hate peer review that's the system let's just just think

with that I think I think it tries to do something good but in practice it doesn't work that that aside um I think crypto should not do peer review because in crypto the you guys move way too quickly and like a peer review system is just not gonna catch up to that in fact this is this is like a meta consensus problem right it's like there's a lot of things come out do you guys want to optimize for it for safety or or liveness I think crypto should optimize for aliveness and if you look at that from a kind of like this consensus analogy I think more things should come out without review and then things should be eliminated kind of very

quickly based on how useful it is I may be more harshly I think this is the tricky thing because there's a lot of marketing around some really bad ideas yeah so how do you cut through that quickly right so so that's the hard part and I think right now people have been doing that through just people are kind of doing a proof of work or proof of status or something if you would just like build on the things that come in first which is why Bitcoin and if there has you know all the share right I actually think this will probably work fine for a while and it might be I obviously have ideas I'm like how this this will change us crypto gets bigger and bigger but I don't want to expound too much on my meta econ speculations or whatever but I literally think peer

review adding peer review will be with slow down the field and it's probably not a smart thing to do right now let's move on to Gasper which is a combinations a combination of the word ghost and I guess but maybe you can tell me briefly like what is it exactly right so yeah like you said Gasper is really just a combination of these two ideas one is Casper FFG and one is ghost so ghost is a four choice rule that was originally introduced by epilepsy and Zohar but really brought into the crypto space with a Ville at Sam fear when he

was looking for like a correct by construction consensus protocol so the quick overview is a four choice rule is a way that users of a blocking decide what is the right chain to build on and kind of a very natural for choice rule to think of inspired by Bitcoin is something like the fork with the most weight or the most work on it where sometimes it's called the longest or the heaviest chain so the short of it is the lnd ghost where LMD means the latest message driven and and that's the the version of ghosts we use LMD ghost is just imagine that when you look at kind

of this this tree with all the forks in it if you just took the latest message of every single user of the blockchain in this case validator so the users with some weight and every time you're at a fork you always fork towards the branch where most where where you have the heaviest some of the latest messages of the users and the way you think about the message is maybe everybody has like a stamp of their latest message and at any given time their stamp is somewhere they may later change this stamp by moving it somewhere else but you always look at kind of the latest stamp that everybody has so if there's n of us there's exactly n stamps and just always move

towards the fork with the most stamps the other thing that we use here is Casper FFG which is this friendly finality gadget the way that works is is designed to be a layer of finalization on top of a chain like protocol including a fortress rule so for example LMD goes but the main ideas of Casper SFG is that each block kind of has a height depending on their distance from the Genesis block and every height of a hundred you should think of as a checkpoint you might hear people say words like epic and this is like a very common words like at PUC so it'll allow you to define certain checkpoints to be

justified which is one level of confidence or finalized which is the next and highest level of confidence and this is very similar to how in pbft you have these different rounds right you like pre-commit and you like commit and stuff like that so here things that would enough kind of votes are just checkpoint blocks with enough votes are justified and then the next and then there's a like there's like a technical condition and the next layer of justified becomes finalized so basically Casper gives you a guarantee that if you satisfy the assumptions you'll never have a situation where to finalized blocks are in conflict with each other so I think that's the most useful thing

to say about these two things the rest are like technical details we did talk about I mean we we talked about Casper in the context of all these consensus algorithms back in that episode that I mentioned earlier and we you know we can't we mentioned it but we didn't really dig that deep into it it's a it's like a proof of stake consensus algorithm as far as I understand it say I think Casper first of all again there's two Casper's right because there's kind of villas like proof bike has correct by construction saying this is Casper FF ug that we're talking about so friendly finality gadget so I think like the technical term is Casper is a

finality gadget which means is a thing Casper's like a meta protocol like I said it's not a complete protocol if EC takes an underlying blockchain protocol which could actually be proof of stake or proof of work by the way and they kind of tells you how to define blocks as being final so kafir gives you a definition of if you have a blockchain you write with some rules if you put Casper on it what it means is it gives you a definition of certain blocks that's absolutely final which means like unless you know there's a huge attack on the network everybody could be sure that if in their views these blocks fall under the definition of final then those

we can be like a hundred percent sure so so Casper is like this thing you layer on top of a blockchain and that's why it's not like a total problem protocol by itself but this is why you hug it with ghosts because ghost gives you a rule for exactly how things go at the lowest levels and then you have this kind of company protocol so before that Casper was only describing part of a consensus algorithm then right like it's reminiscing yeah like it's missing that ghost part yeah the G is literally a gadget so you know it's it's a it's a thing you like plug on it's like an accessory it's like a very big accessory it was an accessory what's it what's an alternative to ghost is there something else that's used

instead sometimes so for example I think there's a version of the world we can use like just a longest chain rule instead of ghost because that's also a 4/4 choice rule and you can put Casper on that and obviously the other things that are missing is you can do a longest chain but you can still theoretically do it with proof of work or proof of state right so you have to specify the underlying like civil resistance algorithm but once you have all dad down I think there's another world where Gasper is literally that rule plus the Casper FFG is there anything other than longest chain and ghosts for like is there any other alternatives actually there's a very recent paper that

classifies all possible for tourist rules by two probabilists Amir Dumbo and loafers a Tony which I forget the name of the first part of this the paper but the last part of the paper is Nakamoto always wins but basically it compares all different four choice rules and shows that their resistance to selfish mining is optimal for longest chain even though even though like you can get a faster latency so what a little bit of background on like why ghost was invented in 2015 because actually this is this paper is what made me get interested in cryptocurrencies again okay I have a lot of very warm feelings about about the ghost paper

because it was probably the first rigorous probability that existed in crypto most of the other stuff in crypto was a lot of nonsense and abuses of place on distributions beginning like I mean the Bitcoin paper makes on the errors in the sums for certain things right but the idea is that longest chain is great but you kind of have to wait for a while you can't make the block production rate really fast because if you make the block production rate really fast there you're going to have a ton of Forks because there's gonna you know the easier it is to produce box which you have to have happen for a fast block production rate the more Forks you're gonna have and you're gonna have more conflicts so in order for the longest chain to be you know to have

this high probability of you being able to pick the unique best chain you you kinda have to make it slow so ghost was a way of saying hey instead of walking down the chain and picking the longest chain you you you you you go down the chain you say which one is actually the heaviest which one has the most Forks and in some sense but that let you trade-off is you were able to get higher latency you could handle more forking or lower latency sorry so you could handle more blocks per second but you were so able to like guarantee that the network was still safe I would say that paper was really the first paper that really investigated the safety and liveness of Bitcoin in a in a more rigorous manner and did this the study of fork choice rules basically it's taken a long time

to actually formalize what it means to be a good fortress rule or a bad for Israel there's there's a lot of historical context to to why this this like ghost in and longest chain are like on two ends of the spectrum and you can parametrize all fortress rules in between them right so I think that's what like why like if you want to think about for Choice rules longest chain and ghosts are kind of the two things you think about because everything else is almost like that feels like a derivative of that I would still like to add that I think there are just lots of ways to do crypto or consensus that's not about chains right like you can think of there's like dag approaches like you know hash graph and stuff like that and I feel like

sometimes thinking in terms of change like constraints our thinking space a little bit too much you know there's probably an alternative world where like cast Wars combined with those things instead even though Casper has an underlying chain the ideas of Casper are really ideas from this like pbft stuff so if you think of Casper as coming out from there there's all these other combinations that could have happened in their world of crypto we're just kind of seeing one of the timelines playing out and let's just hope it's like not the darkest kind of longing with when when kind of comparing Casper to other pbft consensus algorithms like where does it fall on the scale of like synchronous

and asynchronous like how does it sort of deal with like does does the ghost part of it is that the solution to like where it falls because in a way that's like the fork selection rule or is it a separate timing thing I think the fact that we have Casper means that you're forced to be in this like partial synchrony situation because I think Casper really depends on that and this was like written explicitly in the original Casper paper because you know it has this concept of checkpoints doesn't mean think Casper brains is you know you have this chain based blockchain on the bottom but every a hundred block or so we have in the checkpoint a lot of the Casper

guarantees I think come from this partial synchrony assumption that you know if you wait for a couple of checkpoints nothing terribly bad could go wrong and this is the kind of thinking that I think leads to to the partial synchrony asta all the choice yeah III one thing I would add is you know I think things like ghosts are just optimizations to change the partial synchrony constant like how much latency you can tolerate that's healthful actually that's sort of what I was trying to understand was like how do they fit into where it falls and I mean is it possible to compare Casper to ten Derman in terms of like I don't know if it looked to me that there's

like this scale right there's like the synchronous and asynchronous and partial synchronous that have different security versus timeliness or something like on one side it's gonna go I I think I think I think that the the if I if I if I'm kind of getting where you're going at is you know in tender mint you have basically deterministic finality because it is just a normal BFT protocol it's just that you you select the people that you need to have a committee with by stake whereas in Casper this there's this notion of probabilistic finality very similar to Bitcoin or Nakamoto where there's you know you you you have to you have to come up with a more probabilistic definition of what it means for finality

and so I think Casper is interesting because it it comes up with a probabilistic definition of finality like oh this transaction has made it into the ledger and stays in the ledger forever that is both different from ten durmand and different from Nakamoto yeah and so yeah maybe maybe it would be good to know like how did you guys choose the definitions of safety and liveness for your protocol because I think one of the things we've seen a lot in the last couple years is that people have started changing the definition from the original sort of pbft definitions they've been kind of mutating the definitions and you have to play with the definitions to give you this kind of relaxed version of safety awareness

right so one thing I did realize when we start on this project was kind of this disconnect between different types of people defining safety and liveness so for me as a default because you know Casper FFG was already kind of defined I kind of built upon like metallics intuition to use those definitions but yeah when you compare with the other stuff that's out there people might use slightly different terms to describe things yeah I think something that confuses people especially if you haven't spent a long time the literature and noticing that it's mutated over the since 2015 so the way to think about it is like you know

Byzantine fault tolerance eighties playing port you know I kind of traditional deterministic consensus Nakamoto probabilistic consensus and in probabilistic consensus you need to take the definitions that you have of like what it means to be safe like transaction makes in the ledger stays there forever and live I can keep accepting new transactions you have to mutate them so that there's some probability of failure so like you could it's small and you can tune it to be so small that it's less than the number of particles in the universe or something but you have to mutate those deterministic definitions to have this probabilistic nature and then after that you know once people started realizing how how you if you mutate the

definitions you can get better engineering properties then you got this huge burst of like tons of different definitions of safety and liveness like avalanche is a different definition tasks breweries is a different definition so I think by default we used the terms Fatali cad when he was thinking about city or liveness in the original casper paper but at the end of the Gasper paper we do some comparisons it's like it's like there's a shadow but you know a fairly broad with the other stuff that's out there like you know tenorman Definity and stuff like that where we were yeah I did see kind of different slightly different uses of safety and aliveness to come up as for

as for choice of choosing one over the other I don't think I did a very principled view on that although I would say one of the main meaty parts of the Gasper paper is this definition of probabilistic likeness which again probably has been appeared in other papers under some form but you know there's this like we we do approve similar to Casper for liveness but we also have a very long and involved proof on probabilistic lightness which is in some sense a harder problem because you need to have a model of what kind of things could happen there's a point brought up earlier about how these different kind of fork rolls are just to take care of kinds of latency or behavior and if you want to make a principled analysis you

need some distribution on in real life how often do people fork right well how often do people do the wrong thing because like if no one ever Forks then you don't need a fourth choice rule for example so but that's a statement about the world that's not a statement about your protocol so you you need some assumption on what happens in the real world to do a principled comparison and I think that's why it's you don't see a lot of math on that because these assumptions can create like you know arbitrarily weird graphs and it might be hard to mathematically summarize one with the other so we make a particular such guess is this because there is just not that data just doesn't exist like there there just hasn't been it hasn't existed long enough or there's not

enough Forks or what's the well I think it's not just a data problem it's just also like you know you can define kind of a really hard process and I might just end up being something too ugly for you to think about right like the thing that this reminds me of is there's this thing called the Chinese restaurant process from computer science which is you have a bunch of tables and then people come in and they decide where to sit and where they sit depends on how many people are already at that table so they might go to a new table with probability 1 over m plus 1 or join an existing table with probability proportional to the number of people at that table so you can imagine doing something like that for blockchain which is like some guy will come and fork with some probability or join an existing

thing with some probability and it might be really hard to formally analyze your point about there being data or not that actually helps a lot too because if crypto was an older subject we could say if we just back fit a model into these things things look like this model but we don't know that we just have a bunch of little chains kind of trying their own thing so anything you need to try is stealing Torrens words some bad first order approximation with Poisson distribution and and that's why I didn't want to go too overboard with the probability stuff in Gasper because we make some kind of assumptions you know if you make too much you end up in this I think failure mode

certain fields like econ has which is you you try too hard to make assumptions about what the real world is without seeing it and then you might just end up proving these things that are of no relevance when when you hit real life so we're trying to avoid that basically yeah I mean another another question in this regard is there there have been multiple definitions of probabilistic aliveness so for instance avalanche has a certain definition I guess Definity it's like dkg type of things in a certain definition it's for right now everyone in cryptography and distributed systems has focused so much on this model freeness like the notion of a Byzantine adversary verse in the

versus an honest adversary is very model free you kind of say Byzantine adversary can do anything on this adversary doesn't do anything other than exactly what the protocol says but in reality neither of those two parties exist right like everyone is someone somewhere in the middle every participant in the cryptocurrency system or a distributed blockchain system is rational at to some degree and so the question is more like okay do you gain a lot of benefits from maybe adding some model specificity in the same way that machine learning actually gains some benefits from that and maybe you know especially when thinking about liveness because as you

pointed out liveness --is is the property i think that cryptocurrencies has a huge advantage over traditional databases on so yeah this is my speculation hat and not my mathematician hat but i would say if i were to make a prediction here it will be similar to the finance space in the following way like we might make stronger assumptions and the stronger modeled assumptions about like how people might behave just as like you know we introduced this stuff like Ito calculus or like Brownian motion when people are studying finance back around 2008 and obviously there's a cost there's a gain and a loss the gain is I think you do just get a better

predictions than a total model free thing but the loss is as these models get harder harder to figure out where they go wrong and then hopefully we don't have a big fallout like 2008 whatever you know you like that that's a very different mechanism that's a lot of people doing automated algorithms on on groupthink with particular fit models causing like this correlative failure but I think we'll definitely be true that more and more experts will enter crypto these experts may make a local living out of using kind of a more or less model free approach that eats out some actual value but and then eventually the fields going to calcify a little bit in that way as we start to hit the limits of what their

model can do and hit their blind spots so I expect this kind of cyclic output yeah I guess I'm just drawing the parallels to machine learning because I I think we saw the same thing happened yep before we're like there was this machine learning and Finance have very crypto no matter how much it says it wants to be uncorrelated from the past mistakes I think it does actually share a lot of these properties when it comes to modeling stuff we're like everyone wants to make the most general model but the most general model doesn't tell you anything yeah and then people start making an overly specific model and the earliest specific model works but then it it's very brittle like it it's some edge condition happens March 12th happens and it's a most precise you're

modeled and more brittle yeah and so there's kind of this trade-off so that I think that's what these probabilistic liveness type of assumptions kind of are getting at this trade-off surface between and that's like the difference between deterministic consensus like in in in in pbft and kind of these crypto consensus that has probabilistic failures but you can kind of tune them yeah how you tune them is is is more broadly this question of general generousity ver specificity but in the case of this particular work what like one of the questions I have for it it's like what did it what did it do exactly like what was the what did it how did it move the needle from what already

existed that's a really good question and just to dig into that paper a little bit like one I think is just good when a proof of concept like becomes kind of more complete proof of concept because there was actually no blockchain is built on Casper FFG besides the fact that it got you know pretty locally famous within each community as oh this is one way we can build forward so Gasper is at least like a real plan for that and currently going forward I think you know I would say phase 2 or 3 of 2.0 is when this stuff should be completely actually inside the specs and particularly the specs for the

beacon chain because the shard chains I think do something slightly different but like the beacon Ching stuff will be based on Gasper so I think the the main benefit is now there's like an actual theoretical theoretic design that those specs could be based on so that's a lease of I think local interest to the etherium community and I feel the other good thing about it too is with these analyses of say the probabilistic liveness and there's also a section on what happens with dynamic balladeer sets it's not as like deep as I want but I think it does a good job as like a first pass we at least have kind of in formal writing some of the ideas that has been kind of floating around this space orbit

Alex braying like you know here's some ether research posts on various things in fact the dynamic validator set thing was interesting because he had a post on this I think there was like a slight mistake in one of them and then we kind of patched that up but like now we just have like this additional assurance that like okay this at least on a on a in the big picture works so it gives kind of this level of confidence we have that at least humans like myself have looked at this and be like ok this works for the most part and there's actually an exciting thing does not mention in the paper which is like you know they're these guys runtime verifications right they have actually dog gone head and done like kind of a formal

verification of this of many pieces of this paper and I don't know if they have they're going to talk about that I don't know kind of like publicity of episode on formal verification I know some of the runtime and verification folks yeah you see migrate people yeah that's a that's interesting that that sort of comes back in but it's it's like they've done formal verification on pieces this is what you're saying like things that already existed I guess that means you don't have to do formal verification on those again they're sort of I think the part that I looked at was they literally took some theorems from the gasket paper and is like they were pissed checking us is like okay well this farts gonna work and if I think they're gonna go try to

go above and beyond that because they're working with more directly like that if you're in a code base so I think they're not only checking this paper but maybe some implementations or definitions of these things in the actual specs so I look forward to seeing more of their work well one thing you said was that the this work wouldn't necessarily be used on the shards but rather on the beacon chain yes how exactly like how exactly does it fit into the beacon chain I'm trying to picture like and and we did do some episodes on the beacon chain but I maybe even need a little bit of a refresh on like what the beacon

chain does and how this would actually fit into that sure the sharding model as far as I know is you have this main chain the beacon chain and all the data and the transactions are on these shards chains so what the beacon chain does is that beacon chain is save the data on the beacon chain are like these interactions with it and it's charging like oh this charge chain has this data with this route of the new data so the beacon chain is just kind of like the general right the general knows what the each of the individual units are doing and the units kind of do their own thing so basically the way this fits in is the begin chain is a block chain in fact

each of the shard chains and the beacon chain is a blotching all by itself so the beacon chain as the block chain uses a protocol and that protocol is Gasper so Gasper is literally the protocol of the beacon chain is it does that mean that Gasper is deciding on which data from the shards is included in it's master chain right so so the way we think about Gasper is I a Gasper is just a blocking protocol right in a protocol transactions could be anything it's just you know lighting Bitcoin transactions are like a KB five bucks so you should just think of the beacon China's this is a chain where instead of we keeping things like a gay be five bucks we we keep sentences that talk about the interactions or what is happening on the

char chain is that yeah and and that that completely black box is the the actual content but like Bitcoin doesn't know the content of is blogs are money transactions we just call them transaction because that's what people do in practice I wonder like if there is this is this is clearly like I need to revisit eath 2.0 because I kind of forget this but is there like a is there a state machine and a vm like are you still is that still the kind of makeup of the beacon chain do you know so I think that's the makeup of a theorem and if you're on 2.0 because these char chains have data to write and then that date that data altogether comprises on

what happens on the virtual machine but again the idea of this virtual machine is content like like the virtual machine is this emergent property from the fact that people other in sentences like define this variable add 500 to this variable and stuff like that the blockchain structure doesn't know that is running a virtual machine in the same sense that doesn't the Bitcoin protocol doesn't know that is doing this thing about transactions between different accounts or like sorry a better way to say it there's a version a big point that doesn't know that it is about these accounts but uses the same consensus protocol Nakamoto consensus so so I would say yes this this will still be

used to do the virtual machine stuff but that's almost like orthogonal to the blockchain layer I feel like what we did we've covered what it is we've covered the different parts we talked about the difference or how it improved on what was there before is there anything else on gasper that you think we should mention or say kind of more to the end of that time I shouldn't forget to give a shout out to my students Diego Hernandez Thor competitor Kim Pham George Chow Juan Sanchez Joo hooks in in in Wong they've done a great job and a lot of them have graduated and are doing other cool things right now well what was the biggest challenge you faced on Gasper I think the hardest thing I bumped into

while doing this is ask you know I was like drafting this paper right I realized okay we have this skeleton of kind of the protocol but then there's like actual implementation details when when you know when the thing his code which is there's like some other considerations like there was this um the maybe I'm thinking of this in east specs or at least plan specs because these things change there's this idea of attestation inclusion delay which are these attestations which is you know kind of like the messages we were talking about earlier when we're defining ghosts for various reasons for for other reasons like incentive reasons

they might not want to include an attestation as a message until a delay like a couple of few slots or you know or even one epoch has passed it's like a sliding scale that you can use right well this effect the proofs we have here definitely and now consider it like five of these patches you don't know how well these patches will like play with each other or play with your main thing well they actually change our safety and liveness guarantees on everything that's very possible and it's not it's not it's not scalable to like write a proof of like okay for each subset are these patches do our safety and liveness things still hold I actually found that to be difficult it's like something that

looks like an innocuous patch how much does that influence your safety and lightness concerns that's why my answer to your question which is not really a direct answer I admit is something like I think the big problem with using consensus is we can always only say things about this main skeleton of your protocol but a lot of the real life safety aliveness concerns may actually come from these little is that people make especially patches done by developers or organizations that did not really read your consensus paper I mean not to keep making the analogies to machine learning but the theory is pretty useful is relative to the

practice right and everything that people do in practice is completely unfounded theoretically at least from like an analysis perspective like I don't know it's like some of those things shouldn't converge that like you know they work good enough for evils government Montt face-tracking that's yeah like the biggest things are going to be like again using a theorems point of view but also other blockchains if they're m governance right what is the flow chart of introducing a patch to your protocol how does a community decide or how does a community put input in this and how do the devs decide whether to push something like I think

these things are actually more interesting from a holistic point of view then like what big ideas in consensus did we or did we not use I feel that's like a small part so I I think we we're almost out of time but I want to ask a little bit about what you're working on now because you would sort of mention that at the beginning so that you know we're putting kind of gap gasper aside what's the topic you work on today so the topic I'm working on now and with the kopi I being Daschle friar from my institution SJSU who's a game theorist and that's actually an exciting direction right because I was like the main person before but now I brought in at least one other mathematician and the actual game theorist on that game theory

problem which is exciting is we were studying the we are studying the game theoretical properties of the proof of custody game which is kind of this which is the game theoretical structure of the etherium 2.0 sharding design so basically when you when you shard the short of it is when you shard not all the validators are downloading all the data in fact each validator only downloads one ends of the data on average work and is the number of sharks but now you will kind of want a system where they can be sure that the other data is actually being downloaded by other validators this is the this is kind of data availability problem and this ties

into a couple of other problems that are sometimes confounded with data availability but is slightly orthogonal for example the data retrieval bility problem because not all you want to know that data is available maybe you want to be able to see it in the worst case right like something bad happening so there is some game theory design around it we're kind of analyzing the Nash equilibria of that game theory and this again game theory is very is very understandable for undergrads so I think this is a really good fit for an undergrad project and I would love to be able to summarize kind of like the end of this project when one is finished and that should be soon actually well I think you know once that work comes out definitely send it our way and maybe we

have you on again to talk about that Ben yeah that might be fun I get it inserted a lot more of my crackpot philosophical and political ideas with Tarun because I think we have a lot of data in Commons yeah well that's why I never run to academia thank you so much for coming on and sharing all this with all of us and yeah helping us to kind of get a little deeper into consensus algorithms learning about Casper ghosts Gasper and although and also I guess all the work you've been doing on kind of education and research thinking outside the box yeah thank you so much for coming yeah thanks for inviting me and

Tarun thanks for joining again as a co-host a problem always always love being on on podcast cool all right and to our listeners thanks for listening you [Music]