ZK Hack V Workshop: Proof Singularity with Nebra

ZK Hack Video Archive · 17 Dec 2024 · 44:16

Shumo Chu leads a ZK Hack V workshop on Nebra's approach to proof aggregation, framed as a 'proof singularity' that combines many individual zero-knowledge proofs, potentially from different proving systems, into a single proof that's cheaper to verify on-chain. The session covers how aggregation fits into a broader zero-knowledge verification stack.

Speakers

Topics

From ZK Hack Video Archive, hosted by ZK Hack.

Transcript

[Music] hello sir hello hey everyone can you guys hear me yeah please let us know if we can hear Sumo well I can hear you very well in front great also perfect perfect and also like Gaylord please uh remind me the time if I'm uh running over time in the end just yeah we'll do we do will just just pop up on stage in case you need to rush or slow down or maybe there are question that we miss but you know I I make myself known but for now I will uh I

will stay in the background I will just pop up your screen on stage instead of mine here you go excellent awesome awesome so so yeah feel free to take some breaks to check if there are questions in the chat we want that to be interactive as well but now I will leave it up to you so so yeah good luck with the workshop looking forward to it actually and yeah I'll be in the background if there's anything just talk to me I will hear you okay great great amazing um hey everyone my name is the shumo I'm the CEO and co-founder of nebra and uh first thanks a lot for both Anna and Gaylord for organizing this amazing event I see great Vibes here uh let's get into

it uh first uh this is our community link link so it's a very high quality commun uh Community there's not of like a a very theorious technical discussions and the ZK development uh please join us and scan the QR code um so so that we can still interact after this uh um after this ZK hack I'll stay here for a while to um like uh give you guys some time here um okay great um so first um let me give you a introduction of the uh our live product so the first

product we live called the nebra UPA um from the high level point of view Nea UPA is a very simple product it give you 10x reduce on the verific the verification guess cost uh for example um for nebra uh before using uh you probably need a 250k guess to verify a single ZK proof Now using us is roughly like 25k to 30k um and secondly um this um product is purely secur by cryptographic security which means we're using a recursive snarks uh the way we're reducing the guas cost is to a Val proof

agation So eventually the uh security of the the proof is verified on the Bas layer um so there's no other kind of Securities there's no like schans here uh last but not least so we are actually live on ethereum base and World um so the base will be live um actually uh later later today or tomorrow but the um the address is already there so and I give you a like a um a PowerPoint or slice presentation so let me just um give you a deep dive to our um like a product doc so let me stop sharing here see the screen

now yeah also um please um comment anything um in the in the Stream okay great so um so I think like I said the the goal of the project is to reduce the ANM verification cost so and this is high level how it works let me make the screen bigger so the high level thing here that so you can think of a nebra as a uh like a uber pool so the the purpose here is that we can aggregate proofs from different circuit different parties into

the same aggregative proof and getting verified onchain so instead of paying um the proof cost for each single individual proof now you just like um pay the same cost for 32 proofs um so so this is a workflow for any kind of ZK powered application using nebra first is that you register your verification K using nebra UPA and this gives you a circuit ID and we have a like a types scrip SDK to handle everything for you it's just like a a few key stripes in the key stroke in the command line so it's really easy to use and secondly um you submit your proof to NE UPA together with a public input associated with with

appr proof and then um there is a NE UPA contract and contract entry point you're just waiting for the event that indicating that the proof is verified now after this event um you can um continue your business logic by create the is verified function um in the in our like a smart contract to execute the application logic and uh last but not least so the verified U rejected or rejected proofs uhu can be viewed at nebra um proof Pro proof Explorer so I'll will show that later so um that's a so that's a very high level so um then let's actually get just go through how

like you uh can use nebra so the first is the setup so um again we publish this like a NE UPA as a typescript package so you all you need to do is a yarn add nebra UPA um or so for uh we are fully tested using eers so you should uh install eers for for the convenience and then um basically you can um so we have we develop this like a UPA client so it's basically command line tools for you to interact uh for example in um so this is uh this is node Jazz code in this node Jaz code um you can see normally you would import like

eers or like some other stuff so the difference here is that um you just import uh UPA client uh from the UPA SDK and also import config from the UPA tool and now you can um this is pretty much everything um so let's go to the um register applications um so in the register applications um so the way so the way you can um so the way you can think about nebra is that instead of a in normally if you want to coding like a ZK applications you need to sort of writing your own um however you call it like a verifier do so that could be a grossing

verifier that could be a plunk verifier um but using NE you don't have to using that so instead you need to to uh register your verification key with us first um so basically the neb UPA contract expose a register VK method which accept the verification key you can use and then we will for the convenience so basically this tool will give you a circuit ID so this is a unique identifier for your circuit so that after register the verification key you can use it so it's it's rather straightforward um so again the best way is still basically using like a um like a the depending so basically the current

uh uh nebra UPA support U two concrete proof systems so the proof system implementations so the first is snar JS and second is Gnar right so we have the coding examples for both um how do you um how do you ver how do you register your verification key uh e snar GS or in like gar um so there is a difference between the civilization format of the snark JS and knar but don't worry we handle that for you so everything is just like usable using our types script SDK so that's a that's a high level of the reg uh

register applications um so you can see um all you need is basically having the UPA tools and you can do you can do that by either in your like a typ script code or using a command line tool so then the next step is hey like now you have registered verification key um now you basically are free to use uh NE UPA so um so then so this is like um um how you submit and verify your proof so again right so basically we um like assuming um you are using some like a JavaScript or typescript SDK uh typ script like environment so um again for both snar JS

and and Gnar so you can uh we basically implementing this like helper functions for you to um submit the proofs uh to uh to NE UPA um so um yeah please dive deep into please uh check the documentation for the further details and also join the join our telegram group for technical support so now you after you sub after you submit the proofs um the thing you can look at is our proof Explorer so let me show you a give you a brief tour of the proof Explorer here um so this is our proof Explorer so you can see the link here is um like a neoscan

doio um so go to the neor go to neor scan. so you can choose the different deployment so this is etherum sapoia like a word chain saoa and word chain um so you can see these are the running proofs for example let me CH the historical proof so um we have so you can in each single proof submission you could have um submit a single proof or submit a batch of proofs so this is a this is a single um this is a single proof batch which contains one single submission but inside this single proof submission

there are four proofs and now you can see the um you can see the concept right so this for for each single proof within this submission and there is a circuit ID and there is a proof ID so this proof ID is a like unique identifier for this single proof and this circuit ID is the um basically a cat hash of the verification key I just mentioned um so and you if you look at this this circuit ID you can see like uh all the previous proof being being submitted as well so um in in nebra UPA we are actually planning to for example uh

actually replace a circuit ID with some meaningful things for example for the circuit um this is a summer for circuit and this is I don't know like your ZM circuit to have a like a human um like metadata replace a CET ID but this is still kind of a work in progress um yeah so let's go back to the let's go back to the docs so and then we have two very detailed comprehensive sections of the guas cost so so we have two kind of gas costs right now one is because we have two submission interface one is uh like off

CH submission why is onch submission um so you can t to the details on how does the cost differs the basic thing here is that the um the off submission will have like much lower gas cost um so um so for especially when you're using l2s right we basically um like um we basically will like U recommend you using the op chain submission interface um so uh we have a other features for example um test testing workflow um so basically we have some like a convenient helper functions for you to test your uh test your app without actually uh even

running on test net and then um we have um some additional features in SDK to help you to do the front integration as well um so um you can check the current deployment contract here so um we have um like a UPA 1. 1.2 Deploy on like ether minnet we have UPN 2.0 deploy sapoia um like warch sapoia and workchain mlet um so I guess last but not least um we have op verification um tools for you to test U because we have received the many um requests from people um like before the

actually getting the unchain verification work they just want to have an RPC interface to uh kind of test their ZK applications to just like having a very easy to use rest API to test their ZK verifications basically we Implement that and having this like a One-Stop shop for you to do the do the ZK verification um yeah I think that's um I just go through the um the UPA product um I want to pause here a little bit to see do you guys have any questions what kind of apps currently using nebra so there are a few apps uh for example

one is like a Galaxy ID which is from the project Galaxy and one is um like a hyper uh the polyhedra and the polyhedra is um like zik Bridge using nebra and there are more like a uh applications working on the test net and uh since you are asking about applic ations right so this is actually perfect for me to um like uh go to the next sector of this workshop and talking about even more about applications just want to share um like some cool things happens on on nebra ecosystem um so this is a pretty old like Zin landscape I know many project haven't used there uh I just want to do a little bit survey here

right so we have tons of ZK project what is the I mean of course there is a zk2 except for zkm what are the what is your da use the ZK application or like I guess like not even daily use have you ever used any ZK application on CH can can can you guys type in the comment section Dark Forest yeah that's a very cool uh like ZK game uh anything else tornado yeah I use torn too that's great actually and I also I use rail gun yeah you see that's a problem I

claim this is a problem for our entire space right so people invest like hundreds of millions of dollars and in this entire space and no one is using ZK applications today and uh word coin is great yeah word coin is a great example yeah indeed indeed so I think we have a very um it's it's a very obscure space in the sense that we get hundreds of millions of investment and no one is VI applications That's Why Us nebra is hyper application Focus we're not building yet another we're not building yet another infra qual infra uh to to to

to to aim for the L token launch right so basically we're our goal to help the application developers in the ZK space can work better um so with that I'm happy to share um it's still kind of in the semi stal mode but it should be open um to use um pretty pretty soon um so this is the first we this is not by nebra this is the project we incubated we work closely to the founders um to n the the consumer faing um application on base so it called proof. fan what is proof. fan um again this is a a small taser so please uh follow uh this like a x account it's really just like

x.com proof. fan um so the whole idea here is that this is a this is a mcoin Launchpad for anything and what does that mean here so everyone knows mem coins and people want to trade in mem coins like you have Doge you have whatever but what if you can use this mem coins to finding like public good research fing research papers funding um ZK cryptographic development like uh plank history um so I I saw the Chen Yoda um sent a tweet yesterday shall we launch a mem coin for P3 maybe we should because

it's a well-loved libraries and why we not uh like I think us nerds should be able to um launch mem coins and also uh build a community around that but the key here that this is not a normal mem coin Launchpad you can launch a token based on the concept of real world public good and this real world public good can be a research paper and uh can be open source code like P3 can be a x profile for example if you find like a tun's Twitter is very funny you can launch a mem coin um like um kind of linking to tr Twitter the how it works is that like any kind of like a

mimon Launchpad allows any anyone to launch a fair launched um no pre-sale tokens um it's totally permissionless like anyone can launch any token for anything but there is a feedback loop here um so we're using uh like the the project we incubating they're using zls to um con to giving 10% of the token supply to the authors or the creators of this realware good for example um um fad jokes SM allow for pro F yeah

yeah yeah um for example um if you launch a research paper you have a amazing research paper so current the support archive and the Science magazine or basically if your fans launch a token and then you the author being able to be the beneficiaries for the token and using ZK TS plus nebra UPA to claim the 10% of the mem coin Supply and uh I think the team are planning some other featur for example building paper reading groups and building some some other things um like next so this is um I think this is a this is great um

because the way I view mem coin is like attention colony and so we want to so the the team want to like linking the attention economy to public good so now um You can trading your beam coins of your favorite paper so I don't want to save the sound from the team so there's like announcement incoming and uh I guess like uh the team have PES this idea to many people and many people getting super excited um but this is um this is what happen next I guess follow proof. fan the Twitter and there is a l incoming and I think I I tried their product the product is like a super smooth I would say and uh um I think

this is a this is a project like also I personally very very very very excited about so um so okay so that's a and also this is just a example of what kind of a project we're very excited to working with so if you um a hacker have a great ideas of how to build a consumer Fai in ZK project um please join our telegram Channel and you can find me and feel free to DM me on Twitter as well so um like we're happy to help like you how to just like not just uh on the ZK technical side also like bring storming

on good Market U like how do you find like Android investors all this so on and so forth um please join us please join the crew and U um so I think I truly think we can build the ZK application application space together um so that's a example of a nebra ecosystem project so so next um uh I will just um talking about the things um incoming but uh we have been cooking this for a while is we call like a programmable crypto haacker program um so it's not just ZK um so our take here that we have done tons of

research um we have a tons of amazing research and many of the research ZK hack and the ZK podcast has been covered so far um but I mean research is done is overstatement but just but you see my stent here right we have done tons of research and it is time for shipping so um the the way we want to build that is that we want to um like creating an open source Community to haing together on on cooling like our team um nebra is specifically interested in so that we can give you um so these are the these are the following Focus areas that uh um we are like uh uh specially interested

so first is the Quantum proof fure skapes so so as many many of you know right so Google released their newest generation of a quantum computer Willow um despite this current generation of Willow is not a threat yet to the cryptography or to um like a programmable cryptography um it actually shows the starting point of the long-term threat of quantum comp quantum computers to cryptography I think about the world there's no blockchain there's no cryptography I don't think it's a world that you want to live in so um unfortunately many many smart cryptographers they are they have

tons of research on how to build a Quantum proof um like cryptography so in fact I used to author coauthor the paper of the quantum proof uh like a vrf functions which can be a building block for the future Quantum proof blockchains and so I think one of the most um urgent uh development for Quantum proof cryptography is Quant signature schemes and so we have a very good candidate in mind uh we want to working together with the um like some cool hackers to building this like a Quantum proof signature schemes together um again I will show the nebra um like a

community like a telegram channel uh in the end um so um question in the audience has bondes for or hackerson so it's not a super formal thing so I would say um first we have cash price for each task um that's which means so for each category so we have a very specific task ask and U if you finish the um so basically this is will be completely open source and based on GitHub so let's say if you um have a PR and there may be like more than one um people to join

right so there are many many things can happens the first Scarrow is that we see hey there's a clearing the best implementation we just merge the pr then you get a cash price and now or the second scenarios is that hey we see the two competing PRS or three competing PRS um they kind of having some Merit of both and we kind of uh uh bring everything together to to merge the pr together to take one element of of one implementation then people gonna share the cash price so the two could could happen and let's say or it could be hey if the implementation is not to our bar of engineering standard then maybe we kind of dowr the price so anything is

possible it's not you shouldn't think something like a formal but it really should thinking about hey you are joining the community where actually buing this together um and also um like uh um you will get like many Giga brains inside team so if you like if we we chat we do some like a Vibe cheat we seeing hey like you are legit hackers we see your previous code then will'll directly bring you to our internal Dev Discord that's where we ourselves come in communicate as remote team there's no BS at all you can just like working with like a word class uh cryptographers so we have many like a great cryptographers and Engineers they are super experienced to implement this this kind of

schemes um so okay uh any links to the programmable join our uh telegram chat first so we we'll release the uh programmable cryptography hacker program the the detailed soon so this is a teaser and this is basically show you like why we're building this and what is specific problems uh what are the specific problems we're building um yeah okay great so the second um I I'll just like um yeah yeah I think it's really like a building together and a so I think um so join the telegram

first um so I will I'll have the telegram yeah let me get a okay great thank thank you so much zck yeah join the telegram um so great great awesome yeah I'll show the C code code last um okay the second um the second uh uh I think the second um concrete thing uh we want to uh work on is uh f GK to GK reg so um like I guess respond in the um comments on have you heard about gkr and

uh um are do I need to give a little bit background here why we care about the fast GK to GK Rec okay maybe I should give a a little bit background here so uh gkr is a proof a proof system so um so why I guess the first question is why gkr so there are a lot of a project using um proof system such as a stark for high performance uh programmable cryptography for example both uh snc and RIS zero they're using Stark and valid using Stark don't get me wrong Stark is great um the problem here is that if you truly want to build in like high

performance uh cryptography stuff I think gkr seems to be the only solution right now there are two high level uh like uh Vision or Insight the first high level Vision here is that gkr is a linear proof system which means the pro time is linear to the computational load and uh um the uh Stark for example like a plunky 3 it's a a unlog in prover so you might say hey it's just just log in right maybe not super big but the reality is that we are targeting bigger and bigger work node and for this bigger work note um if your workload is super

big for example um let's say a zvm targets trillions of or billions and trillions of like CPU Cycles right then this login can be huge this login can means 100x speed up or 1,000x speed up so we think the linear approver um like we think linear prover is the way to go yes are there teams uh building something like this yes please join our telegram chat we we'll discuss more uh we are working together uh with the polyhedra team based on building the open source the gkr pr implementation called expander um we are like actually

contribute a lot to the polyedra upstreams so um the yeah how do you address a scale that's that's exactly the problem where we're trying to solve here we have some good ideas so um the gcard to Gard recursion the high level is that hey uh we want to build a gkr circuit to uh basically a gkr verifier in gkr the first step is that basically how to how to write a gkr circuit and our team is expert on in this right so we're actually working um on this like a super mega GK circuit and then um the

scalability challenges um is really about um so it's um if you kind of decompose the GK circuit is layers of sum checks right how can you implement the sum checks efficiently and also there are some like a nonnative arithm tricks that you need to use here uh I think it's in general it's just like high performance Circ engineering plus understanding how does a nonnative arithmetic Works um so that's that's that's kind of like a high level yeah um so um yeah any more questions on the GK side okay great um so then I will move to the next topic is open source

the distributed PR Network um so I think there are people building Pro Network already like a galute okay okay let me answer the question first so why is this only I'm not saying it's only only AR Ray of help right um so it's just like it's a high level you need a nine approver and secondly um uh I guess the the second uh second good point of a gkr here is that um it doesn't you don't have to commit the intermediate Witnesses so for example this comes very very handy let's

say if you're building a zvm or if you're building a like a large language models like Nars of neural networks then think about you don't need to com cache do a cryptographic commitment over all the intermediate computation results in let's say a 20 layer neur Network so um then you find like you you have limited amount of choices on how to build a Pro system if you want to have a Bo linear approver and don't commit intermediate witness and you will end up building something pretty similar to gkr yeah I think uh in the ZK zero launch podcast and also ZK whiteboard sessions um there

are many great uh Justin seller um kind of like white board sessions about gkr like there are more insight over there or from the high level point of view um I guess I shouldn't say it's only Ray of Hope it's just like the only Ray of Hope I know because this two properties of gkr is super critical for the high performance um like a proof system and none of the existing other non proof system actually offers so and uh um also you can view like jol or like Spartan that jol zvm uses as a two layer of gkr right uh it's I mean if you're thinking about gkr in the

broader term I guess the Su check is a way to do it um because like that's that seems to be the known way of building something like a linear prover and has all this like advantages yeah okay great yeah thanks so much for for the questions this is makes my um like Workshop so much fun um yeah and uh and also just like so here is my like a telegram handle I post my telegram handle here like if you just like want to join the programable cryptography hacker program just like DM me that's the most easy way and we we should chat yeah um

so okay next question uh so it's the open source distributed Pro network uh like I said there are many teams already building uh like prer Network for example like a gavot for example SN for example R zero like why we why we need a um like why we need a building an open sourced impr Network and so um I think there is a a question about security risk I would address that later definitely like this is like one of the things um I think the first question here is that um it's really hard to build a pro

Network without assumptions of the proof system and uh this is related to I explain like why gkr right so if you are gkr P then you are find all the existing improver Network either it's not open source for example I'm not sure uh suain can risk Z going to open source their Pro Network in the future but it's not right now or or some existing open source framework has um you kind of having to assume how does the works to be the open source Pro Network like if it's too General you're actually losing the performance here so I think like like we want to be opinion

Len in a way that uh because gkr can be fully distributed in a way that if you have a fast gkr to GK recursion then this entire thing could be fully distributed and then you can have like a super high performance per Network um so so we want to be like like utilizing the high performance aspects of the gkr so instead of having a very generic code for the network because timately people don't care the pro proof system like like I think the in my View kind of like a proof system diversity is a is a is not a like a goal

we should achieve because people just were just using the fastest proof system ever and to to to to generate the proof and verify the proof so so basically we want to have an opinionated way of building this like open source Distributing PR network uh instead of a so for example um like some like an opinion native approach like uh gavot or um for example U some very zvm specific like cins or RIS zeros um so to answer the questions like what security risk erases in open source c network um so it's the I guess like first it should always be open source

and if there's higher risk if same non open sourced uh secondly it's if you're building a permission permissionless Network so you need to solve the problem of um the um someone maybe if dropping your proofs so for example there the prover Network while having some incentive mechanisms to give reward for the workers contributing their Hardware resources their electricity to uh generating the proof and now if that's a permissionless left work let's say you post a proof of this kind of particular workload if someone

else can very easily to fake generate another proof with the same thing and claim your reward right and you kind of getting screwed so this is a this is issues how do you um like this is one of the issues of this the security issues of Designing this is solvable there are like multiple ways of solving this um but I think the most important thing here is is basically start building this and start this like syn bigger and how can we building like a decentral network of provs and to actually T like uh targeting very ambitious task for example unch lln all this like a all

this like a like a like a very ambitious task um that's a I think that's a that's a high level take here right and uh it's better to building something from the bottom up from the scratch and to be decentralized from the first first place rather than having kind of like a centralized approach for the pr Network okay um last I think that's that's end my the that's the end of the workshop I think I have like a um 15 minutes here to just here to hang out here with you guys and to ask any

questions um to answer any questions hey we're back great can you hear me yeah yes so maybe I have um I have yeah maybe one question for you so what's the the immediate next thing so you mention your your deployment and base I mean can you maybe you know give us some uh some Alpha about maybe further deploy that are coming that are in the pipe you know oh I see I see I see so basically um we deploy a base a bunch of project using us some base so

if you are deploying a ZK application on base or planning to deploy a ZK application on base please just contact me right so then like uh we will basically like help you like both technical the end to to think about go to market right so I guess like like our as a as a UPA as a product um like our FOC our entire Focus will be like on the consumer applications because we think this is how can we move the ZK space forward so we have too many like like way too many infas way way too less applications and the the the benefit of using nebra is that if you're building a ZT application um we basically lower your user acquisition cost by 10x so you

by using Nea you have like a much better compatitive advantages with other ZK application not using nebra so um um so yeah so that's a um that's that's a that's a high Lev take here yeah I guess some questions are you have you thought about creating content about neb in Spanish would love to please DM me I'm happy to like uh um just like having some uh community members to help us creating like a nebra content in Spanish and uh so I think there's like many great um developers in Span and we have a team member in Spain and he lives in a very um interesting Beach town called

heong Spanish people no he yeah yeah yeah so that's great yeah so it's actually a good a good for me about the about the Z job fair so there are a bunch of jobs that have been posted on the jobs board but also some companies are just there you know to talk to you I guess that's going to be maybe your case shumo and there are uh yes there are quite a few uh posts that are related to you know engineering job or cryptographer but there are also a few you know Community or you know partnership development or these type of things as well so if you're you know curious about ZK but feeling a bit shy or you know you feel like you don't have the skills the technical skills to make

it into the industry well frat not there are other ways as as schumo said we kind of beyond the the the step of you know infra only and there are like applications with hopefully good distribution for them so yeah I think like non-technical rules are going to be more and more popular and needed in the ZK space so yet another reason to join the Z job fair that will be after the the price ceremony that we will be starting in a bit as soon as I see Anna popping up um yeah thank you so much I don't have any more but uh yeah really appreciate you guys having me here yeah thank you very much so yeah thanks sh see you around at the zik job fair and

yeah thanks for the for the workshop great great great yeah cheers [Music]