ZK HACK III - ZPrize Results

14 Dec 2022 · 23:20

Alex Pruden reviews the results of ZPrize, a cryptography optimization competition, during ZK HACK III, a four-week series of workshops and puzzle competitions on zero-knowledge tools. The session covers how participants approached the ZPrize challenges and the work still ahead to make zero-knowledge proving systems faster and more efficient.

Speakers

Topics

Transcript

foreign first of all thank you everyone for coming so this is we're taking a bit of a gear shift here so we just spent the last a little while talking about a Leo and now I'm going to tell you a little bit about zprize and specifically how zprize ended up um so for those of you who aren't familiar let me just go through what zprize is I've given a talk at I think it was CK Summit seven where I announced uh Z prize and what it was but I'll just kind of briefly run through it in the next couple slides here so you guys can uh can hear it again for those who aren't familiar the Z prize was an industry-wide competition to accelerate ZK crypto and I want to touch on a couple of those terms quickly

so industry-wide means that there was many organizations and individuals involved um we had 30 things obviously stats are on a coming slide we had 32 Partners in some capacity we had 20 sponsors we had Hardware companies providing like like Samsung and AMD providing actual physical hardware for the competitors to use and so this is really a big tent effort um that that no individual company could do alone though I did organize it like I said I I think it very much was the work of many people to get it to this point and the idea you should think of when you're thinking of Z prizes is DARPA Grand Challenge is a good analogy the darkest Grand Challenge for those of you don't remember Mojave Desert 2008 or something and you know it it was a competition to to have a

self-driving car race basically it was a self-driving car race the first one and it's credited with kind of kicking off the the self-driving car industry and so this idea having a competition uh you know friendly competition between individuals throughout the industry or you know maybe even people who aren't in crypto but you know have you know a competition to have people submit solutions to problems that that are kind of universal in the space that might help move the technology forward that was the idea um and the last piece I'm going to highlight here is the last bullet which is that everything in the Z prize so all the submissions for all the competitions and I'm going to go through each of them in detail is open source and I'll post a link after this in the chat where you can find all the entries but bottom line

is every single entry is open source uh under MIT Apache so not only do I hope but encourage everyone who is um you know is working on ZK or working on a project to check it out hopefully there'll be something in there that could apply to you Okay so in a little bit more detail what were the goals of the Z products what did we set out to achieve um so the first was to improve the probably the main thing was improving performance of the key General algorithms that's kind of a word salad so what I mean by that is there's some low-level Primitives which many of you in this call are probably familiar with uh that go into a zero knowledge proof low level mathematical Partners so when you're generating a proof for example with a ZK Stark you know you're doing something called multi-scale

multiplication and number theoretic transforms so there's these kind of like little building blocks that that can be you know aggregated to create both snarks and Starks and bulletproofs and all kinds of different flavors we focused on these low-level building blocks primarily because there's wide applicability um so of course you know if we had design and you'll see how the prizes are structured in a minute but you know designing a prize it's a you know it's very high level application focused you know it's a specific thing you probably can get better optimizations but it won't apply as widely so we've we spent the majority of the prizes or the majority of the uh Focus for the Z price was on these on these lower level algorithms and you'll see that here in a minute and I think the other thing is just really I guess maybe this is say

something quickly about the motivation for the zprize personally um one thing that we noticed in a Leo and I don't know if anyone here was was part of testnet too but testnet 2 was at the time we were using a different consensus algorithm proof of succinct work it was a proof of work variant and the main difference between purchase the sync work and proof of work I think one of the noticeable differences was you know shot 256 hashing is relatively commoditized it's not that complicated you can there's little some little tricks you can kind of get an edge but by and large the knowledge of how to do that efficiently is is widespread as opposed to in proof of succinct work you're generating a zero knowledge proof and there are a few teams specifically teams that have worked in hardware for a long time that you know we're really

good at doing that and we're of course not really that interested in sharing that information and I think this was one of the problems that I noticed coming into this competition that extends Beyond a Leo there's a ton of great optimization work that's done for this project or that project or here or there but there's really nothing Universal I think honestly I look at artworks which many of you probably knows is kind of the standard library for ZK and rust as an inspiration where this is something that's just a universal building block that everyone could use so um okay so I talked about already a little bit the the who of the Z prize that I I guess I'll just name some names here so Samsung AMD xilinx both provided Hardware in Samsung's case they provided mobile phones and design links provided uh some fpga cards uh c1100s and and

those were for their prospective prizes core weave um is a cloud services company that specializes in gpus they do a lot of stuff in the AI space if anyone's used any of the stable diffusion models or you know tried the stable diffusion models they host all that but they also are great for competitions like this where we you know for some of the categories we wanted access to relatively high-end gpus for the competitors so they provided those um and then yeah the the total prizes uh is actually a little less than 7 million because we didn't get a submission for every prize but in total 7 million was committed from all these folks here so in particular I want to highlight the gold sponsors which were Helio andoma the folks at Jump crypto and then folked out Pioneer's price um and yeah and I think you know again

the money's great the resources are great but one of the things that um you know this that would that made this this competition possible was the people and the time that they spent and I'll highlight the individuals as we go through the deck here okay so I talked a minute ago about this idea of the focus on the lower level Primitives and I yeah and one of the ways we we tried to account for the fact that teams had specific things they wanted to optimize but we also wanted to make public goods that were broadly applicable as we split the competition into these two categories high level categories roughly the open division which was kind of the public goods Division and the idea there was it had to have multiple sponsors and then the team division which was like Hey if you wanted to basically have a

bounty paid in your you know your projects token for a specific this or that you could you could do that um so that was the breakdown of the competition I talked about the low-level mathematical derivatives I've just defined them here um so yeah this is uh like I said multi multi-scale multiplication is mostly used I won't read this read the slide but it's also used in snarks like typically people think MSM or snarks are more MSM heavy kind of vanilla CK snarks like Marlon Blanc uh across 16. and then NTT also sometimes called fft or fast forward fast forward a transform uh is often more used in Stark so they both depending on the exact construction they both kind of use a mix but typically you

can if you think MTT it's generally more applicable to Starks MSM is generally more applicable to the the broader family of starks um cool um and then one piece of this that I haven't mentioned yet before is you know we're talking about these algorithms and accelerating them but on what platform are we accelerating them and what's the use case here and we wanted to make sure that these this work was broadly applicable for a range of use cases and so we we kind of took the same problem that you'll and you'll see in a minute actually the problems are mostly focused on these two parameters I just highlighted here MSM and NTT and we said hey you know do this on a mobile device do this on a laptop do this on a server that might have access to an fpga or GPU or multiple

um and the idea there was we wanted to span the possible use cases for ZK for example you know and as many of you probably we know the way it kind of works is you know the larger program or the statement being proven the more intensive the proof process the proving process is certain for and then Firstmark it's all constant time verification but for Starks it can be more involved to verify so bottom line is the larger the the problem is potentially the more uh the more involved it is and so doing these on different Hardware platforms kind of um it fits with the model of that we think snarks are going to develop in that for example if you want to do a simple payment like I wanted to pay for nav you know I just wanted to prove you know

that I paid in like a z cash transaction that's pretty simple to do on a phone but if you want to run on input through a machine learning algorithm and prove that you know hey your the output of of your you know of that data was correct according to whatever you know algorithm it was you know that that could potentially be a much bigger program so that would be something most likely we would expect someone to Outsource to a server in the same way that the web works today basically in the client server model so we kind of spanned all three of those Hardware platforms and before I go I guess the last thing I want to say about hardware and it's a point that I've raised to a few people in the course of the Z prizes Hardware acceleration is really really important as Technologies mature and an example I

really like to use is um https um which is the you know the encryption standard basically it's the it's the standard that make sure all internet traffic is encrypted there was a time and the internet when not all traffic was https by default and what really changed what what made the difference and ultimately caused it all to become the default was um Intel integrated AES instructions into their CPUs and so basically this Hardware integration really made something that was still complicated in theoretical time or theoretical complexity terms uh or or more intensive but in real world terms made it much more practical so um okay I think I think I've hit this slide enough I guess the last thing I'll

see you'll see that various prizes kind of have different focuses again depending on the use case latency and I just let me just Define these in case people aren't familiar with this term latency is performing one pass as fast as possible throughput performing a bunch of tasks in a given time as many tasks as possible in a given time span and efficiency perform one task as cheaply as possible effectively and these again correspond to slightly different use cases be it a roll-up or be it a an hft or something that we could imagine for ZK Okay so a lot of context settings so now let's get to the good stuff so these are the different open division prizes and I'm not going to linger on the slide because we're going to go through each of them and I'm going to tell you guys about the

results so first of all these are the results um so uh if you if you're counting and you're paying attention you'll see there's less uh there's less column entries here than there were um than there were prizes and that's because we didn't actually get a submission for every prize and there's actually one prize that is still ongoing that's the third prize the Planck the izk uh prize and um and so that's that's going to conclude in January so potentially even more good news to share at that time but in general we got great improvements across the board so every submission beat the Baseline for prizes that we got submissions for and in some cases the winning submission the Baseline by quite a lot the biggest one as you can see is the Marlin verifier so we we had um basically structured a team

division prize to uh to verify as many Marlin proofs a heterogeneous set of marlin Crews as possible within a given time span and you know we really Advanced this data they aren't there which is applicable to a Leo but also to other folks that use the Marlin crew system and potentially those techniques would apply to other crew systems as well um yeah and on average we had about 5.35 Improvement on on the Baseline so uh really good and I I want to stress that in some of these cases particularly the ones where the um you know the the Baseline the Improvement on the Baseline seem as well like the GPU MSM GPU uh we had a very good Baseline so supernational is a company that does Hardware acceleration for snarks they do a lot of work with

filecoin they've done some work with us um they really know what they're doing they actually implemented the Baseline so um people who beat that I think it you know it just goes to show that this is really probably almost as good as you're going to get uh with something like this so without further Ado let's go through here and we'll just talk about each of the prizes who one and maybe I'll make a couple points along the way and then we'll kind of conclude with where the Futures can potentially lead so first prize uh we sponsored this is MSM again multi-scale multi-scaler multiplication acceleration on a GPU and again the server category and so the the um the problem was to you know compute an NSM over 2 to the 26 which I think is 64 million so one of the computer science

guys in here can correct me if that's that's wrong but anyway so two uh 64 million points roughly and so this is a pretty big problem and so we had actually a tie for first matter Labs which many many of all are familiar with with their Z cases product and a company called urid software actually tied for first it's really interesting that they tied because they actually took a slightly different approach to the problem and they their optimizations differ uh and so actually they we've been discussing with them and they're going to submit a combined solution taking the best of both of their approaches and they're going to uh submit a pull request to add that to our repo as well so in the final analysis the the best solution should be actually even better than than the than what the two winners submitted

um okay this is the same one except with uh with fpgas so fpgas I didn't defy earlier but an fpga for those are not familiar is a fully prepared chemical gate all right and it's kind of what people you know it's specialized Hardware that mostly is used to test um you know to test or build architectures before they're they're put into silicon or create or A6 are created but people do use them for a variety of applications and especially in hft ETC and so uh you can see jump crypto in here is of course they're you know a big fund and they they um they have some experts that have pgas and so we have two submissions here this is the notable thing here is two things one hard camel uh is a team that there's four people on

the team but Ben Devlin is one of them and he was submitted some of the open source fpga work for zcash so I highly recommend checking out his GitHub repo BS Dublin and also this uh the the you go to the zprize.io blogs there's an announcement for the winners and you can click on their uh their they'll create a little website to document their solution really good it's actually a ton of great resources about snarks I highly recommend checking it out so um cool uh the second prize was NTT acceleration as you can see this one was sponsored by polygon primarily we were also sponsors at a Leo but um this was really the focus here I'm not going to do it justice because it was it was this is by far the most complex uh um competition there were several stages

the competitors had to work through I copied and pasted the the first phase of uh of of the competition here but the idea was really about um you know having a big NTT problem and having to split that problem and solve it over two cards that's really at a high level and um I referenced earlier Supernatural uh is a team in the space and they won this competition and this is this like the last prize is the first that I know of fpga library that you can you can use to solve these algorithms so hopefully this is something that will provide a foundation for future teams who uh who want to use this stuff um last note here the scores don't try and think too much about that that's there's a lot of different factors that went into that so like the main thing to

pay attention to is first through fifth we have all the specifications for all the competitions on zprize.io so you can see what the scores actually if you're interested um okay uh the fourth open division prize so we skipped the third that one's still going that's the Planck the ick all right and so this one um this is an MSN acceleration in Wasa and so the way to think about was webassembly and the idea here is really you're running running it in your browser um the use case that we would imagine is you know you're you're on a website or you know you're interacting with the with an application through your browser and you want to generate a proof right there um which maybe let's call it like something like an authentication or something like that um so this is this is the idea behind this project so

um the oh yeah I should mention the architect of this prize actually before I get too far the entity acceleration dzk raw me from dck did a great job and white kind of did a great job architecting this prize and in the case of price horror we had um bouillon from Manta Network it was also which imagine network was also a sponsor but they organized and specified the other thing so here we have again some pretty good results um these numbers like the Baseline is one so it's just really a multiplier so we got some pretty significant Improvement again we see that you're good software did pretty good here but we have a number of different implementations same thing here the top two did slightly different things so a combined solution probably should be even better than that um so this is probably six the one prize

we didn't get anything for in the open division was prize five which was a plumo and plonk implementation which is kind of a bummer because that was a really interesting one but oh well um prize sticks the moral of the story for all of you watching is that you know even if you don't think you can do it you should submit a you should submit a solution because if you're the only one you might win by default um and that's the case here so zhenfai Zhang as a former late espresso he was the only one to submit one for this prize and let me just quickly talk about what this is so fast aside and hashing for those of you don't know Poseidon is a stark friendly hash function so this becomes very applicable when you're constructing Merkle trees which is something we do all the time and

blockchains and crypto and so you know having a more efficient in terms of lower number of constraints implementation Poseidon is something that's really desirable so we had a baseline of 440 constraints in gen fake um submitted one just under 200. this prize was put together by the folks at Panther protocol and Luke Pearson from polychain Capital so um yeah so this is cool I think this is this is actually something but since a lot of teams do use beside it I think this would be something that gets get today created um across the board um okay last open division prize is the investment acceleration on mobile again this is really the idea it was a mobile payment and I was really excited about this a because the the organizer evicted craft from C Labs did a great job and this is the ocelot which is cellos

Community Foundation uh funded it so you know they're obviously really interested in mobile payments I think this is a really interesting use case that hasn't been that explored Samsung donated a bunch of phones for the teams to use and this is the first to my knowledge time that uh a zero knowledge career has been generated on a phone in under a second so um so this is the size of the of the problem two to the 16 is not you know it's not a huge problem but it's still reasonably big and the winning team was able to compete that MSM in 569 milliseconds so really impressive that was the consensus snark team um if they were here they would want you to go to the consensus skin Arc repo and check out all of their uh their open source uh ZK work and go but they won

this prize and this was a really cool one that again and I think as we as we look forward to his DK adoption and people potentially being able to do this on their phones I think this will be a really important work that others can build upon okay uh and I screwed these up I one should be two and two should be one but these are the two team division prizes we only got two team division submissions um and these were both alios sponsored um but again I mentioned the Marlin verification one really cool some great outcomes there and then I mentioned posw earlier as a you know this was our formerly our um our our proof of work algorithm we have a new consensus algorithm called aliopeft which is a kind of a combo proof of stake proof of work for posw still plays into it and so

this actually got integrated into uh all of our libraries and so people who um you know who are proving on our Network and take advantage of of the work that supernatural has uh has done here there's there's specific implementation is the one that we we implemented and I guess the last thing to note here before I skip to the last slide is these two prizes were the only ones we actually considered efficiency which is something that I don't think people consider enough uh in in terms of this technology so if you think about a roll-up for example um you're only going to settle the roll-up transactions on chain whenever you have enough transactions in the you know for the roll-up to equal the cost to actually verify on chain so that we need to pay the transaction fee or the gas cost to verify on chain so the

cheaper you can make that gas cost uh and the capital costs associated with it the more frequently liable settle so so this is actually something where it's really the scalability really depends on a efficiency and again like I mentioned earlier verification you know a lot of focus has been done improving but I think verification is an area where I think there's a lot more uh interesting opportunities to optimize so um that's it so that's the results um again very excited about it this is the last slide um where do we go from here so um some of you may remember this this whole idea came about about a year ago in Denver so we're going to be spending the next two months until East Denver kind of talking about these you know talking about the work that's been done

going out and promoting it uh making sure the competitors get the prizes that they've that they won and um and then at each end where we've got we've got some side events going that we're actually organizing our own separate conference so anyone who's interested in that we can we can show the details there but that should be really fun to discuss these results and potentially to get feedback on where to go from here if you're asking my opinion um I think it would be interesting to broaden the uh the scope outside of just the low level algorithms we did a lot of MSM and NTT I think that's great but I think it would kind of be interesting to make it a little more abstract to kind of look at a more complex system which would open up more doors to potential optimization not just on the hardware

level but the algorithm level and would give you you know ideally the competitors would be given the freedom of choice on how to you know the best tool for the job you know one example is you know you could say do a you know uh the Merkel path for a Merkel proof and you can use any proof system for example and and any hardware platform so maybe that you know there's some areas where you can combine different proof systems or elements from different proof systems and potentially you know iterate or or create something all new and so I would like to the next competition to kind of move just outside of the scope of just hardware and have give competitors more freedom to to kind of build a solution to a problem without thinking about what

that solution has to look like too much but I also acknowledge that the reality is it's hard to do that it's hard to judge those types of competitions and so I think we will probably end up keeping a pretty large focus on Hardware but I do think it would be cool to expand the range of different uh classes of Hardware that we that that we focus on too on what people optimize in other devices that may be applicable depending on the use case so and then three question marks if you have feedback uh anyone in this in this community here today on this call any feedback is always welcome um so zprize.io is our website interest zprize.io is the email you can send to for any thoughts or feedback on the competition or suggestions on future directions so with that that concludes my presentation

thank you all very much for listening and I really enjoyed being here and thank you very much Anna for giving me the time to share a little bit about this [Music]