️ Ethereum's KZG Ceremony with Trent Van Epps & Carl Beekhuizen ️
18 Jan 2023 · 36:31
Trent Van Epps and Carl Beekhuizen join Bankless to explain the KZG ceremony, the trusted setup underpinning proto-danksharding under EIP-4844. They walk through why the ceremony matters for Ethereum's data availability roadmap, how the multi-party computation process works, and what it means for the network's broader scaling plans.
Speakers
Topics
Transcript
welcome bankless Nation to a very very once in a lifetime opportunity to do something really really cool on ethereum and to help me explain exactly what's going on in this world of kzg Ceremonies I've got not two people from the EF Carl baziken who is a researcher at the ethereum foundation Carl welcome hey thanks for having me on and then on the right I got Trent Van Epps who is an ethereum Steward and also the lead behind the protocol Guild and overall ethereum Enthusiast uh Trent I think shares in mine and Ryan's branding of we like to work for protocols and we consider ourselves employees stewards of this crypto Revolution specifically ethereum well Trent welcome to the show thank you for having me Cheers Cheers
okay guys uh what the hell's going on what is a kzg ceremony uh why do we need to do this and what does it mean for ethereum Carl you want to start uh yeah sure um so the ceremony is uh much like we've heard some of the things happen in the past for other protocols but the idea is to get a bunch of people to come together and generate a secret such that everyone who participated like no one individually knows the secret it's like shared in like the collective memory of everyone but um there's there's no way to reveal this and then uh we can perform some some math and cryptography on top of the secret to leverage it for all sorts of
fun and useful protocol things um which is why we need it here okay everyone's coming together to create a secret but no one individual knows a secret uh I think we're talking about like cryptography level stuff here but can we unpack that what that means like what does it mean to create a secret so sure like a lot of these cryptographic protocols start with just assuming that there's something that no one really knows and it's like it's a key which unlocks the entire system um and uh the the these these the the commitment scheme that we're wanting to use um for eip4844 which you can touch on in a moment later um requires this uh a secret to be sort
of embedded um and in this case it's um a number that we encrypt and we perform some calculations on to make it a bit more useful uh but it's a number that no one can know so uh you contribute like someone everyone has a turn to add a little bit more to this number and to make it a little bit more random and a little bit more secure but in essence like no single person or even collectible people can can know the the ultimate secret unless everyone gets together to reconstruct where this the secret number comes from so eip4844 that's something that we've talked about on Bank list pretty frequently uh Proto dank sharding uh is is what this is called and this is something to unlock a new property of ethereum called blob
space so in addition to block space which everyone transacts on we get Blob space and blob spaces like this uh data space for specifically layer twos it's what takes the breaks off of layer twos uh it's probably perhaps one of the last major upgrades to ethereum before it really becomes the full vision of itself there's of course some other things to do but Carl what you're saying is is in order to get 4844 we need this like number thing and we need this number thing to be a a secret uh and so this is like I think one of these uh properties of this universe that is very specific to this crypto industry uh why does everyone need to not know what the
secret is why does this number need to be secret what happens if we if we were to know what this number was so this this number is basically used for these commitment devices so the way that uh l2's uh reference the the data that we have in these blobs the way that their references on chain is via these commitments we call kcg commitments which you can see is very similar to caches like we have right now unfortunately hashes are very complicated or very expensive to calculate in stocks so that wouldn't work for ZK based l2s um as well as for uh like full tank sharding requires some extension polynomials
which are basically similar even more fancy cryptography but using using um similar cryptography to to what we're using here so if this were to Break um if someone were to know the secret it's basically the private key to this these kcg commitments that allow us to make these commitments so breaking the private key means that anyone could commit to anything so that means you no longer have any of the sensible guarantees of like this is a a blob and the blob is really what we say The Blob is it means that sort of all bets are off in terms of what a data blob would be or what could be committed to okay so basically if this number if this secret were to be known all of the blah all the data that layer two is put on the
ethereum layer one wouldn't be secure as in like anyone could have those private Keys like metaphorically speaking anyone has the private keys to any Layer Two that's putting data on the layer one so basically it breaks every single layer too if somebody does know the secret yep and you can do all depending on how these layer twos are constructed you could do all sorts of fun things like proving false things in ZK or inventing transactions that didn't really exist for the optimistic style it's it's really not something we can afford to have happen for these these l2s right so if somebody knows this secret that we are all collectively producing in this moment because this ceremony is ongoing we'll talk about some of the details the ceremony is ongoing but if somebody was to know the secret somehow we'll talk
about how feasible or unfeasible that that knowing that secret is but it's like God Mode for Layer Two yes like if you have the secret you are you are God of all layer 2 transactions is that is that a fair description yeah you have the five if they're using if they're using the blob space they're using the blob space we're assuming that they will be using 404 but yeah if they would have to be using it in order to get compromised in this way yeah cool okay all right so that's so that's something very very important um so it's we don't we don't like uh we gods in this world we like everyone to have equal access no one to be a superior over over others why do we know that what we are doing here with this kcg ceremony is secure
how what are the assurances that we have on this so for one it's being it's being operated as a public ceremony so anybody can contribute and this is important because the ceremony has a one of n trust assumption that means only a single person has to destroy the the entropy or the randomness that they're putting into the ceremony or calculating over only a single person has to be destroying their Randomness or behaving honestly if you think of it in the general sense for this to be secure so you know right now we're at we just broke 9 000 contributions um literally eight thousand nine nine nine of them could be behaving malicious
they could all be the same individual they could all be David in in different hats and he could have retained all of his his Secrets or his entropies and if I was the only single honest contributor who you know did some keyboard mashing and added some random text this would be secure uh layer twos could be confident evident that this couldn't break obviously that's far from the truth you know there are many thousands of Unique Individuals that are contributing to this um and that's part of the the assurances so one is like we want this to be run in a publicly accessible process uh and so yes you can check that box um the other thing is once the ceremony itself is complete so in a couple months
when they when the output is actually put out um uh there will be a verification process so the community and and we'll be Carl and I will be part of coordinating some of this we will encourage people to run a script to verify that yes this is the actual uh output of the ceremony that took place so if you participated you'll have a verifiable proof that your ethereum address was included as part of this or it's linked in some way you'll have a signed message from the sequencer um so they'll be again this this verification dance sort of like social signaling of like uh you can think of it as sort of like
not an exact analogy but like when when bitcoiners do um soft work upgrades uh where like you you signal something in your node um this is similar in that like everybody's like okay I'm signaling that yes I accept this there's nothing that actually happens on chain um it's more of a social process but this verification is super important to actually make sure that the uh the output that we're putting into clients and is will provide the foundation for for is actually what was produced and then I jumped ahead a little bit the another another bit that sort of ensures that the ceremony is run properly or reduces the likelihood of failure is that we have multiple implementations so you can use the hosted interface but you can also use a couple different
different CLI implementations um which are like code that you would run locally and then it contributes um so we have this is a bit unique to other ceremonies that there are multiple implementations that you can contribute through um and this this helps make the the entire event more secure because you have uh differentiated paths that people can contribute through kind of like the the multi-client ethos of the ethereum execution layer or the consensus layer uh where you're much less likely to have a consensus failure if you have multiple clients same same idea applies here if you have a couple different ways of applying uh contributing to the ceremony you're less likely to have a bug in all
of them those are those are the three main ways that we can we can make sure that this is like a good outcome right let me reiterate those three things just to make sure I totally understand it uh the first reason why we know that this works is that it's a one of n trust assumption as in only one person has to behave honestly for this whole entire thing to work uh and so uh if somebody has already done this signing and pro part of the ceremony and then they forgot their key that they put into we're already good um and as somebody who I can't remember if I typed capital letters or not capital letters into my key we might be good here um you know this one this might be a solved problem we can just shut it down we're done here but that's the idea is
like the reason why like having a god mode overall ethereum layer twos that use blobspace is a terrible outcome uh but why we're okay with this is that the uh how easy it is to have completely uh the strongest assurances that this works is so easy to achieve just by having one person forget their key when how many people did you say have signed so far Trent um well I don't know if it's well we have over 9 000 contributions over nine thousand what the breakdown is between like uh GitHub or ethereum sure okay so that's one reason why we know this is gonna work uh the other thing you talked about is that uh there's an additional step where we're going to produce this secret that we're all we're all contributing to uh but then before
that's that secret actually gets implemented into ethereum into the the clients uh there's going to be a process where everyone can check that they that their met their ethereum address actually did contribute into that number right and so uh it's a way so like if we produce this number somebody's gonna have to take that number and put it into the client to actually update the clients and we need to make sure that like that is the number that we produce is the actual number that goes into the software and so there's going to be a moment where everyone can verify that this is the correct number and there is a mechanism to say like if you your ethereum address signed a message to go into this kzg ceremony that it is actually the number going into the client so we have assurances that way
and then the third thing you mentioned is that there's multiple ways to access this ceremony and so like maybe the there's the front-end website that probably most people will use but maybe for some reason that is logging everyone's Secrets maybe that thing is corrupted and so we have like another way to add Randomness into this thing that is like you said a multi-client way to do this so you could go through ipfs or some other route and again only one person needs to forget their secret and and this is how we have these assurances that we feel good about that this whole thing is going to work is that is that a fair description yep yep good summary cool uh Trent I want to ask you a little bit about like uh zoom out and like take this from a little social sociocultural
philosophical standpoint the way that I've been describing this to people is like you actually get to write your initials in the base of this pyramid this metaphorical pyramid that's going to be around forever can you talk about this like getting away from the actual details of the cryptography and kind of what this means from like a socio-cultural uh moment in ethereum yeah one of the really cool things about ethereum is that it's developed in the open so you know before I started working in the court protocol protocol space I was just like an Enthusiast following stuff on Twitter didn't really know a ton of what was going on I knew it was exciting but I wasn't entirely aware of all the
things that are going on obviously it's still today I'm learning um but it was it's hard to imagine back then and still today like how I can contribute technically to ethereum I found other ways to contribute um you know helping to coordinate Network upgrades uh coordinating between client teams engaging the community in core protocol upgrades things like that but before this if you're maybe not as technically knowledgeable there's not really a way for you to contribute technically um it's just it's it's a really um deep domain in in those terms however this is a really unique
opportunity for people who anybody really in the ethereum community to contribute directly to a technical part of the ethereum protocol and in fact it requires these contributions it's not like oh it would be nice this is literally made possible by having the the broadest cut of the ethereum community come in contribute to it um and this to date there hasn't really been anything like it um like I said before you can you know follow stuff on Twitter you can um uh listen to the core Dev calls you can be part of the community at a certain level but you can actually contribute to the protocol so this is uh I really like
what you said about like adding your name to the base of a pyramid or I think I've also compared it to like writing your name in fresh concrete uh assuming that this concrete isn't replaced in a couple years but yeah it's this way of um somebody who you know is really excited about what ethereum is and what it's doing to to have a really uh a deep impact and I think that's a really important opportunity to to take hold of for people who are part of the community um because it it has a significant impact for many years to come um and it's it's really yeah like you said it it's it's interesting from a social perspective that the the community itself can literally provide input to the social or sorry the
technical protocol in this way um through social signaling through sharing this around through contributing um and it's I don't know if there will be many opportunities like this in the future it's a very rare rare bit uh to to have this window into the protocol like this uh maybe we'll do an update to the the setup in a couple of years if something needs to change or we need to to you know create a deeper uh or a broader um if we need to do something Beyond this for tank sharding itself possibly we'll have to update the ceremony but um you know this is kind of treat this as as your one opportunity to contribute directly to the ethereum protocol and
it's definitely something very special yeah and the the ethereum developers are a very you know talented technical uh competent bunch of people and I totally think that they could have just like gone into a room done some ceremony themselves and being like okay we did it like we don't really need to have this public ceremony uh but that's not really in the ethereum ethos and especially when there's like an opportunity like this to get so many more people involved uh like the way that like to put a visualization in people's heads like imagine like a floating eth logo has a massive line of people and each one of them is coming and putting their very unique handprint with all their unique fingerprints and they're touching the heath logo and they're leaving that
print there and then everyone is adding their own little handprint to ethereum and well while we could have had the other event where just the ethereum devs just did it and it probably would be just totally fine we would be robbing the whole world of this opportunity to be a part of this fun ceremony and it really adds like social legitimacy to ethereum we can get like I'm gonna go after like recording this video I'm gonna go send this video out to like uh like Kathy Wood and and Hester purse and like Andrew Yang and like try and get all of these other people just to like hey it's like don't miss this opportunity to like leave your hand print at the core of this structure because it's it's like a social legitimate socially legitimizing like
mechanism right like we all get to even though even though like uh it's gonna totally work either way it's like a it's like an nice way to just like you know put a little bit of yourself into this core core protocol yeah the other thing I'll add to that um and something we touched on earlier about like the one of n trust assumption is that yes obviously we could you know a single core Dev could do the ceremony themselves or like up 20 people could do it themselves but that's not that's not credible we talk a lot about credible neutrality or credibility in ethereum or legitimacy like you just mentioned um and and this is very much an effort in building credibility not just for the people who are around now but the people who will be around you know using
ethereum in 10 years in 20 years in 100 years assuming there's no setups in between there um but we we need this to be credible as credible as we can make it now for the long term uh because if if we don't make it broadly accessible we don't have these multiple ways to contribute um we don't try to do all of these things then the output of the ceremony loses a bit of credibility over time and so yeah definitely very much about building consensus around the was the community able to participate is it a legitimate output things like that so let's go a little bit into the details of the timeline of this whole ceremony uh Carl I'll throw this one back to you uh what's the timeline of this whole thing like what what are the
like dates that people should know about and pay attention to yeah so we launched this thing on Friday the 13th uh of Jan for for meme reasons it was it was just too tempting uh so yeah that was uh that was a bit of fun um and the idea is to to run the primary ceremony for at least two months um and what we want to do is give everyone a fair opportunity to make sure they feel like uh you everyone had a con a turn to contribute and that there was some point it wasn't like oh you have a week quickly rush over to do something maybe your way you weren't paying attention that didn't work out for you we were going to give it like an extended period of time for everyone to
to participate um so our current planning now is is to have that run for about two months uh until the the 13th of March um then we're going to switch to what we're calling special contributions so something we've seen in uh previous ceremonies in the past is um some people have come up with really creative ways of of contributing um so doing things like uh for some of the original um Z cash ceremonies uh people used some radioactive cloth from Chernobyl and uh flew up in an airplane and pointed a geiger counter at this cloth to to try to collect Randomness that was hopefully far away from all sorts of uh noise
collection sources um by being in an airplane things like this just ridiculous ideas that like give us extra layers of assuredness but it's also art it sounds like art yes yeah it is and this is actually a very important like component of how this works is like we we're having thousands of thousands of people contribute uh right now and that provides like a lot of a lot of security but like at some human level we we relate to these stories 9000 people is mostly a number and I can see many of my friends on this list and I've contributed in in that list sure that's fine but seeing these like other ridiculous efforts that people make to to do this is like far more convincing at like a some kind of weird um monkey brain kind of part of the story because the spectacle of it too
yeah yeah yeah so that's this period we're going to have have after that um do you know of any cool um like experiments that people are thinking about uh doing in this in this space so we've had we've had a bunch of things um we're actually still like opening like we have a grand surround open at the moment to the end of this month um trying to like ask people to to come up with cool ideas and and we'll throw some money away if you if you have something that's interesting uh we've had some some cool examples of like destroying the computer afterwards to make sure that there's nothing left [Laughter] lots of people asking for crazy amounts of explosives for things [Music] [Laughter] please no no more uh applications for
exploding things yeah yeah but at least one right we get to explode somebody gets to explode something yeah these kinds of things so like either weird ways of creating the entropy or convincing other people it's destroyed afterwards uh people are trying to use like cat toys to to to to sample some some entropy uh building weird Hardware around that these kinds of things um and then the other thing we're encouraging people to do is to like write their own implementations of the software so something we've taken is a very unique approach a very ethereum approach um is that this this whole idea started as a specification so much like uh the the consensus layer clients are all like there's the consensus specs and if you can Implement
those then you have a client we've done the same thing for the ceremony where it's like here's just a minimal and it's designed to be as simple as possible like here's the thing you can write uh Implement yourself and then have work and so we're like encouraging people to try write their own implementations even roll their own cryptography here and maybe your cryptography is going to take really long was really slow or does something weird and different so we're trying to also allow for people to to do that then to allow for like other just more implementations of of the code bases to just further reduce the the chance of like correlated failure through the system because I think we're like rapidly approaching the point where with 9 000 people there's no realistic way I mean already there's no realistic way that
everyone's going to get together and and reconstruct the secret I think um it's always useful to have more people and like I think like we want as many as possible but like it's it it's rather unrealistic um for that to happen so now we like I think the more realistic failure cases look like oh there's a bug in uh windows or um all Firefox browsers uh have this weird thing which somehow leaked the secret or something like that right so there's some weird correlated failure which starts attacking many of these contributions um so the having try to encourage people to write other implementations allows us to transition over to uh like reducing those other risks that we have that like
sort of more Black Swan style risks um that that potentially pose to the ceremony and perhaps also one of the reasons why this like open Period of of contributing Randomness is so long is that there's no real reason for it to need to be short like I think we have uh the the what's the next upgrade Shanghai upgrade for 4844 is uh speculated to be end of March early April no one really knows but that's kind of the vibe and so like why not just open up this window and for the majority of that time Shanghai is withdrawals oh excuse me right right yes right uh Cancun Cancun right yeah good to have yeah it's expected to have 444 obviously like nothing is guaranteed but
yeah that would be a little bit later in the year sure sure yeah and so yeah that that period would be we're basically going to try to fill that entire period until you know I don't know exactly the timeline but we'll try to fill the entire period with contributions as much as we can yeah so like we'll open up again to General General contributions after you've done these weird and wacky special contributions uh right up until the last moment when client devs need to uh take all of this uh shove it in the clients have everyone verify that their contribution was included in this and then we can we can ship uh 4844. yeah and right there would be the the verification period where like everybody performs this it doesn't have to be very long as long as it exists of just like
the social signaling of right here's the output are you good does this work for you it works for me I see my name in there like and no one raises a flag saying hey mine's not here if no one is no one's running is raising a flag see mine's not here like we're good right yeah exactly yeah all right guys this is this is really really cool are there any angles of this whole entire ceremony that we haven't talked about yet that we need to touch on um I mean this is maybe more a little a little basic but like um so we the lobby is pretty designed yes the lobby is pretty large I'm looking at it now it's 2 800 people Trent what's the website that people can go to people you can go to ceremony.etheoreum.org that'll have you
know the summoning guides the hosted interface a couple of different ways that you can contribute and also like a bunch of FAQs and information if um like our higher level answers didn't if they weren't enough here go there we should have most answers uh for any question you might have um as well as like the transcript is hosted there's also ceremony.ethereum.org yeah so yeah just on like a procedural note the lobby is pretty pretty saturated right now so if you're trying to contribute or you're really excited about um being part of this as you should uh maybe come back next week and the lobby will be a little bit less um no guarantees we're hoping that it'll be
um you know the weight won't be so long why is there a weight at all why why do why is there a line yeah so there's well I mean the simple answer is like just a lot of people want to contribute at the same time and one of the misconceptions which we're trying to improve some of the copy around is there's not actually a cue so once you get to this Lobby um I know you've contributed David but there's like this uh intermediate stage where you've you've created your entropy and submitted it to the sequencer and then you're sort of in this uh intermittent well it's literally a Lobby that's what we're calling it uh and the the sequencer picks randomly from this this space so it doesn't matter if you contributed 10 days ago and you've been sitting in there for 10 days
um I don't think anybody's actually waited that long but uh it doesn't care how long or how early you contributed it'll just pick randomly from here so there's no cue and this is something that was very common with other ceremonies that had to do uh when they were passing around larger amounts of data you had to strictly schedule when somebody is contributing so um I would do my calculation do my contribution pass it back to a sequencer and then there would be an explicit next person that was scheduled in advance uh very common for other ceremonies that had other requirements they you know either usually usually it comes down to like the size of data that they're passing around
um why can't because why can't we just all add it all at once why is there like a bottleneck what's the constraint there sure so uh it has to be sequential um and is this with ethereum blocks no no this is uh this is related to powers of Tau which is like the the construction that we're using to okay actually this is what trusted setups are at least the first phase what they're typically called is powers of Tau uh and it's it's a sequential multi-party computation so while I'm doing my calculation over my entropy you can't start until you actually have so it's it's strictly step by step right um so like you can't Randomness gets added one
at a time not not in parallel okay right right it's not like yeah it's not like you're you have to build upon the previous person's Randomness you can't both create build off of the same Randomness okay I see right and it's like it's like uh I mean I don't want to lean too heavy on uh analogies here but it's it's like uh coming to a consensus on the head of a blockchain like right there can only be one right um and and it has to be sequential like block after block so otherwise we wouldn't be adding Randomness together we would just be making it right yeah exactly so once once I'm done calculating on my entropy I send that to the sequencer uh which is just a server
doesn't actually make decisions really uh and then it would pass it to the the next person in sequence and that's that's why the the queue is so long or that I'm not not going to say Q the lobby is so large um just because there's so many people and it just takes a little bit of time is the computation done locally or is that done on a server computation is done locally yeah okay so your computer is the thing doing the computation to add the randomness to the the sequencer Okay cool so that hence okay interesting okay cool uh the sequence sequence are literally like when it's your turns like here David you are in charge of the current powers of Tau right and and that is that is you adding your fingerprint to ethereum okay
and if if you watch if you watch like your your CPU usage or something it will Spike and all your cores will suddenly rev up for 30 seconds or so while you do your contribution and then you send it back and you're done cool that's really cool yeah and in that moment that is that is when your computer is generating your fingerprint based off of your inputs to add to ethereum so that is that is the thing that you are adding to ethereum is is that uh with when the CPU heats up yeah and I guess one one other thing I can add to this you asked about like other things we have missed so one the lobby is pretty large uh so if you're thinking of contributing maybe come back in a little bit a couple days a week uh there's plenty of time don't worry about
missing out uh the other thing is we're working through some bugs so if you have already tried to contribute there's a couple issues with user sign outs where uh well I won't get into them now but like basically we're working on them and we hope to have them live soon so if you tried in the past few days and we're hit with some error that you weren't sure how to resolve uh we are actively trying to solve them and hopefully that'll make the experience a little bit smoother yeah cool awesome guys Carl Trent thank you so much for walking us through all of this uh I hope everyone in the bankless nation definitely gets an opportunity to add their little thumbprint their fingerprint their handprint whatever their DNA whatever you want to call it into the the soul of ethereum because this is a moment uh here's a fun little
anecdote when um my nephew was born about uh almost two years ago uh the text message from my brother-in-law went out to the family and was like you know Lincoln born at this height this many pounds and I took that text and I put it into an ethereum transaction and now in the future I'm going to give give my nephew those private Keys just because he'll it'll be kind of cool he'll be the only kid in school that has uh proof of work era private keys and this is just kind of like one of one of those things like that where like you get to embed something very deeply into the ethereum protocol and it's going to be around forever and that's just a unique property that only crypto systems can really enable and so I just really want to impress upon people that once in a
lifetime moment that this uh kcg ceremony is really bringing to the table so Carl Trent thank you for for helping me communicate that to the bankless nation thank you for having us yeah it's been great thanks cheers uh any is since you guys are on on bankless uh we don't really have uh there's not too many opportunities for EF people to come and like have a Podium is there anything else that you guys want to talk about before we wrap this thing up I'll obviously show protocol Guild um it's a collective of core devs who are trying to improve the incentives around working on core protocol so the main thing that this organization produces is just a curated list of uh literally the people who are working on the protocol
it has members from I think about 20 different organizations from throughout the the space it's not just the ethereum foundation and today we have about 128 members um and we're hoping to build Norms around uh protocols or applications to contribute back to the core protocol previously there's no single contract or single address that people can send to you know there's many Bitcoin grants there are many individual ways to contribute but it's really hard to for somebody even if you're embedded in the space to find a way to say I want to fund the protocol I want to fund the people who are making things like the merge possible things like 1559 we all love ultrasound money but like who actually made that happen so this is a
way for people to contribute back to the people that made it made it happen and hopefully uh boost some of the incentives to work on the core protocol so uh I'm I'm a member of that organization and we're actively building it and uh yeah that's I guess that's my my one show spot people can check it out or hit me up with any questions Carl you wanna you wanna soapbox um I don't actually think so I uh don't have any weird wonderful things to contribute just like I always appreciate the coverage you have here of the more research your topics and like allowing everyone to to like get involved with all those things a little bit more I think that's that's an exciting important thing in the space that we can never have enough of so yeah thanks for
that well thank you Carl and uh thank you Trent for for joining me cheers guys thanks for hosting bye yeah foreign