Navigating the ZKP Learning Curve: Bottom-Up vs. Top-Down Approaches | Adrian Li | ETHTaipei 2024
ETHTaipei·Wed, Oct 9, 2024, 12:00 AM
Navigating the ZKP Learning Curve: Bottom-Up vs. Top-Down Approaches | Adrian Li, PSE | ETHTaipei 2024
Transcript
hi great oh thanks thanks uh good morning well thank you for being here um I'm Adrian Lee I'm the head of the ecosystem development at the psse team for those who don't know psse team is uh the team that previously known to be applied ckp part of the ethereum foundation and we've been working on you know developing the ecosystem essentially uh for the next little bit so today I'm just going to talk a little bit about navigating the ZK learning Cod curve right so first let's talking about the learning curve who here has tried to learn ZK before who here has found it to be very easy much fewer people of course so we're going to talk about that right because why is it so hard what are the challenges that there are in terms of learning like things about ZK and how we can navigate around that so let's take a look at some NN some memes right just to get things started right wake you guys up a little bit um you know whenever you start learning something it's always really difficult and during it you feel like it's almost impossible and that's where a lot of people give up um but afterwards you feel like it's not so bad but then you kind of take a look again at the next time it feels that way every time and that's kind of a natural cycle in terms of learning anything and I think we can most of us agree with that right um here's another one this is actually from uh uh Eve online you can see how um they're comparing World of Warcraft very easy slope at the bottom and then you have some very difficult things so maybe for us the red line would be like learning HTML right maybe green is like JavaScript and then and the black part is is like zero knowledge proofs right so that that's a funny meme there here's um actually similar to what we had from the first meme that we have at the beginning like you this is how positive you are about learning the thing that you want to learn in the beginning you you really love learning it it's really enjoyable because you feel like you're learning something useful and then you know you get to a point down here where it's just really frustrating you don't know where to go and then you see this red line here a lot of people give up and that's you know what we want to try to avoid right but you know if you persist you can you know come back up to slightly positive right it's not even that positive but but that's kind of like um a lot of problems right and you notice as well that most of these memes are not about ZK this one's about learning programming languages um the previous one was talking about like learning how to play games right and this is also you know just for fun you know we have a different learning curves for uh code editors as well you know this this is something like you know if you know you know type of thing right if you've never used emac or Vim you know those things might not make a lot of sense but you know things can be hard is kind of the the point of this so you know one of the problems I think you know when I was trying to look into um this topic is that there's just too many courses right there's too many ZK tutorials out there you don't know where to start right so ZK tutorials ZK tutorials everywhere right and then so you ask your friend maybe you have some people um that are researchers or people who have done like ZK apps before and like oh where should I learn right and they've got opinions right everyone's got an opinion right oh you should learn this you shouldn't learn that oh yeah Starks versus snarks oh oh you should like just skip circom go to Halo 2 or it's like oh no like you should use our DSL right so there's like so many things that you know people tell you ZK learning is easy just follow my tutorial but there's you know everyone has their own opinions on what to do right so like couple more you know learning ZK is easy there are so many resources or like you know just look at another tutorial right the next thing you know you've been learning intro to ZK for like three months and then you're still like still thinking about alibaba's cave and uh more like thought experiments and things right so how do we tackle this right um so some here's some context right last year we at psse decided to host a program in the summer called the contribution program so the summer contribution program and the goal of this was to grow the next generation of ZK open source contributors um what we did was we found University students um specifically because of our Personnel at the time we focused on Taiwan South Korea and Japan and we've we were looking at University students with some programming background they would have like a computer science major or a mathematics major and we wanted to take them from a place where you know they have some basic programming knowledge but they um don't really have much understanding of ZK but they were very curious and they want to and we want to bring them to the point where they can U make open source contributions at all right and that's why we don't call this a you know Boot Camp or anything like that because the ultimate goal is not only to teach them something but to help them become contributors to the space and I think that's how we at psse really believe we can have more impact on the world as well so what this program looked like you know we had like all these you know smiling faces from Korea um actually like that's suan he's going to present next he's sting up here um about a topic that's much more technical than this one um this is uh in Japan right you know we had a a nice guest come come with us as well you know we took very many uh really nice looking pictures just to give you an idea um you know people really enjoyed the program and got a lot out of it um but so let's talk about the curriculum right because that's that's the kind of meat of the program and also I find to be like the most challenging part right because I personally had to write the entire curriculum for this and I didn't really know much ZK at all so we'll see how how that went right um so this is kind of what we had last year I'm not going to go through every single detail here but basically we had like this intro we go from like um we're going to like talk about modular arithmetic talk about some basic cryptographic Primitives and we launch right into elliptic curves and and ZK snarks and then we talk about a little bit of our psse projects as well and U how to write circuits with circom and and we have some you know examples for them to try out and after that we throw them into the open source and be like hey just work on some issues right so there was like a lot of experimenting going on because we didn't really know what we're doing we just wanted to throw them into the weeds and see what happens right so here we have this is kind of we actually went through many iterations of the curriculum as well because the way that we tried to come up with the curriculum at the beginning was we just asked all the researchers in psse like hey what do you think they should learn and then of course there were pages and pages and pages of things right you know all the way from like very basic things obviously um like like I said you know just like ideas like non-technical ideas about what zero knowledge is um and like you know just modu arithmetic and all the way down to you know pairing based protocols um you know very specific things so let's see here so there are three takeaways that I want to talk about for this pres particular presentation that maybe can help you guys or help your community make this ZK learning curve a little bit easier or a little bit more manageable for you and here they are um I think number one it's important to know how to you know to start and also when to stop with a solid foundation let's talk about what that means right and number two it's important to also build and break on day one you know having that practical aspect in the beginning is very important and number three I think this is the most important one you really should consider everything as optional right because if you dive into every single thing yeah you're you're basically going to get stuck in in the weeds quite a bit and there are a lot of weeds in uh in this particular space so so the first one uh what does that mean right to start and stop with a solid foundation well you know I think one of the biggest feedback we had from our curriculum was that the Lear learning curve was just way too steep you know week one we had this very simple thing here you know 12 mod 5 equals 2 for those who don't know modular arithmetic you can understand this very quickly it's like 12 divid 5 what's the remainder it's two okay good that's week one right but what's week two oh okay it's elliptic curve pairing with pairing based cryptography and you need to know exactly how this is happening right and this is already a simplified diagram right it's that's actually telling you the treat this as a black box so I mean I think like people kind of had a little bit of Whiplash from you know where we started and where we came to so that's week two and then we had like another six weeks after that right so so I think it's really important for us when we learning anything um to really black boxing and really consider whether or not we need to dive into it right uh we don't need to step into every single little Concept in order to understand the big picture it really depends on what your goal is right and that's kind of navigating different between a top- down approach and a bottom up approach um because you know within the PSC team as well a lot of people were saying how we should you know build things up from fundamentals and and Primitives um and then there are other people who said you know just run the code first you know get them to have a high level understanding and sometimes you need a little bit of both right and I think striking that balance is the hardest part um when you're not sure how to strike that balance um build right because the the moment that you try to make something even if it's like simple hello world type of program you're going to realize what you're missing right if like oh you don't know the syntax well maybe we should at least learn the syntax right um if if it's something that you know just writing a very basic circuit in circom maybe you don't need to know the specifics of um you know all the different cryptographic schemes there are that we're talking about right so that leads into the second point which is we should build and try to break things on on day one all right one of the issues of uh the program we had was we didn't actually start doing any circuit writing until I think 3 weeks in and and by that time like you know people have been basically studying textbook knowledge for two whole weeks and so it's been quite tiring for them and then we just throw them into circom and be like oh just just do it you know and of course that was quite challenging so you know okay let's do circom right like you know you have no prior experience and you look at this this is actually from the circom documentation supposed to be really easy and if you know if you've kind of done what you've some of this before it does look easy but you know maybe if you're just trying to learn the syntax and write a very basic circuit you don't need this maybe you know you can use a shortcut right so one really good tool is ZK repo um you know thanks zerx Park and you can actually just do everything in the browser right there's no need to like go to the command line install snark JS and there are a lot of issues with the tooling that may not be um as smooth as usually it is as as people might expect but like with ZK rep. you can just go there and like run every code you want right so you know the idea is just make something first you know you don't have to make something that's really complicated sometimes people go into it thinking it's like oh I want to make a token mixer right and then that's kind of like the one thing they want to do right but maybe you know you don't have to do that right because there you can always go back to the hard path afterwards you can always download snark JS and and run everything yourself locally afterwards once you're comfortable with the circom language a lot of the tooling things will become something else right A little bit easier so everything is optional right when we when we wrote this curriculum I tried to really put in a lot of content that people would want and then so what happened is that we just Mark everything as optional but because we had it in there people still really wanted to like watch all of it and I I tried to put these um minute markers right how long these like YouTube slides YouTube um links are and you can see like just this bottom part here is like two hours long right so are you really going to spend two hours on this optional thing right and then there's also like two Long blog post up here um I think they're really important for understanding the the concept but maybe we can just focus on one and leave the other one as optional as well right so that's some of the changes that we we're doing for um for the next for this year summer program and then there are people who just wanted to write like circom like really basic circum things and really just understand the basics of what's going on do they really need six links to learn about BLS signatures probably not right so I think one of the approaches that we're we're taking um or we've learned from feedback is that it's important to like just leave things as optional and let people dive in when they feel like it um because there's always a balance to be struck between you know giving structure um and then also you know giving optionality so maybe this is what all they want to do right and like I think I can like anyone here like completely non-technical can understand this as well there's like the constraint you know C must be like a * B and then so this is a circuit that proves that a * B is equal to C that's it right and then so you don't really need like two hours of YouTube videos and and like six different blog posts to tell you that so you know you know this is kind of cliche but you know I really like this quote from then exp Perfection is achieved when there is nothing more to add uh not when there's nothing more to add but when there's nothing left to take away so we want to really cut down as much as possible on what people need to learn and just give them the optionality to do that and I think it's important when you're self- learning to to do that for yourself as well right so what does the new curriculum look like well this is kind of a very basic overview oh oops here yeah so first what we're going to do is that we're actually going to take a lot of the easier stuff like arithmetic and stuff like that we're going to put it as a prerequisite so there's a module zero that the students will have to do at home right and then when they get in on week one then we can actually get started coding in circom from day one with ZK repo so they can just start getting used to building things whereas previously we wait waited until like the the third week um so that's and then we also broke it up in week three with a hackathon so we actually have like two full weeks of studying we have a hackathon and we have two another two weeks of studying right what this allows us to do is like you we can actually be more confident in making the weeks more rigorous so previously we didn't really have time to dive into plon as much but for a lot of people here uh you know we know that we know how important that is to understand right um at the same time we didn't even have much time to touch on Halo 2 we had to make them pick between circom and Halo 2 which isn't really ideal either um but now because of the way we've broken it up we have a section on that in our curriculum here too so that's why like we moved a lot of stuff into prerequisite so we can really focus on what is really important here um also I forgot to mention like previously if you see like the modules that we had from the old curriculum things were happening in each module of half weeks so 2.5 days per module right and that's super confusing of course right you know you start something on Monday and then like midday Wednesday that's supposed to be finished and you're supposed to start the next module um so we're just going by weeks now and we're just in this way like there people have more flexibility in in terms of how they can um move around with the topics that they like to talk about um so fewer week based modules students complete a module before the program starts so that we can have more time to do focus on deeper things and we also broke up the program with the hackathon students start rating circuits on day one so these are some of the applications of how we changed our curriculum based on the feedback that we had from the program last year so conclusion I guess this is pretty quick presentation you know these are the three takeaways know when to start and when to stop you need a solid foundation for sure but you don't need to go into every single thing and if you're not sure what that means you know try to build something right and I think it's important to build something on day one and also realize that everything is optional um you know a lot of times you know as adults I talk to some other people as like oh hey what books are you reading and then they say they don't read anymore and I think a lot of people actually have have this um bad experience from school or university when they're required to read a book in full right but these days when I read something or learn something I just flip through you know I can stop any time right no one is stopping me so it's important to realize that it's the same in anything you do in life as well right everything really is optional it really depends on what you're trying to do and what your goals are right if you're even if you're being you know you want to be a researcher in a specific topic you know you probably need to ignore a certain other topic so that you can focus on a topic that you want so I think that's a really key um takeaway at least for me personally too um so you know what are we trying to do with this curriculum right we want to create a future um where we have all these new ZK engineers and researchers we want to create a scalable curriculum as a as a public good as well and we want to grow the communities so before we got get to that actually this is an old screenshot but we have a good first issue tracker um that will allow to work on good first issues from psse projects so that you can get involved and think see how you can you know contribute to open source um I think it's a gfi. P.D unfortunately I forgot to put the URL on here but you can see we're going to link it from the main page of P.
D um and UI is different as well but you can see there's like a lot of issues that you can work on and just poke around in and that's actually what we did for our uh our summer students too so the reason result results of the program are you know about 50 people finished it and 90% were open like new to open source like they never use or maybe they've used GitHub before but they never like made any PRS they never wrote any issues before right so that's why that good first issue um list of good first issues it was so important um yeah so with this program by the way like you know we developed the curriculum with student feedback as we talked about but also uh after that we gave some of them learning Grant so that they can keep on developing their expertise within the space and beyond that there we have specific projects um part of the acceleration program where they can work on and get a grant to work on those projects and develop their expertise in a certain area so you know I think this summer program and specifically this curriculum is a really good way to get people started to get to the stage where they can feel comfortable contributing something to open source so what are next steps for us well um we're actually expanding so we're doing Latin America this year um I don't quite remember the countes off the top of my head but I I believe it's Costa Rica Ecuador and uh there's one more but unfortunately I forget U we will also run it in Tokyo so and taipe again as well and like the great thing is that we're going to have previous years um students to help lead some of that too so hopefully we can create a more self-sustaining type of uh um process here and of course we want to build a local community so thank you for listening to my presentation if you want to see the curriculum it is open source we do want to give this out to other um ZK study groups around the world so do scan this QR code here um it is still very much a work in progress we still have to update the new content but that's where we're going to host the the curriculum and we're probably going to do a little bit more advertising as well um or you know kind of marketing to tell people that we have this curriculum but I I think it's a really good place to start and uh thank you for listening to my talk okay so so does anybody has any questions yeah hi uh Adrian I've gone through the ZK playground course here in Taiwan that the PST is see also sponsored and contributed to I believe and uh your modification to the curriculum really Mak sense to me like start hacking from day one um uh but I was wondering whether You' gone through too many programming languages within your curriculum for example learning rustlings sorry I can't hear you I was wondering if learning rust in one week from the wrestling May a bit too much for students so they have to learn like twoes and yeah so that's why we we actually um from from the new curriculum we're doing circom like from day one so by the week week two or three like we can you know they're hopefully more like familiar with circom already and then they can switch over to like they're not only just doing rustlings right they're going to do rustlings and they're going to do a lot more Deep dive into how to work with rust and things like that um I think one week to learn all of rust from scratch you know is obviously very difficult but also this is just to give them like something to start with right there are a lot of people depending on what they're trying to work on that they maybe end up not using Halo not using rust at all right and if if they're really comfortable and they have you know with they have all the skills required to do what they want to do with circom maybe they don't right but you know that's another thing to keep in mind you know with this particular program you know we want to keep things open um make sure like we introduce them to things that they can dive into but um you know everything's optional like I said right so you know again like not everyone needs to learn rust not everyone needs to learn Halo to to contribute to the ZK space and I think that message is important as well wow but yeah thank you for your question does anybody has any questions yeah hi Aden uh I'm a Ras developer and I came across the PSC acceleration program that's happening and I came across the issues list on that um and to be honest it felt a little intimidating for those uh issues to for like for me to tackle those issues so would you say this uh course would be a good starting point to get across to those issues on the PSC acceleration program I I can't really hear I think the echo is kind of strong sorry yeah I'm saying I'm a rust developer uh yeah but I came across the PSC acceleration program issues and they felt a little intimidating so would you say that this course would be a good stepping stone to work towards that sor yeah right oh yeah the topics are very tough I I think I think so yes so so the question I I'll repeat was that the acceleration program has a lot of topics that seem quite difficult uh and the question is whether or not the the course is a good intro to that I think it is um but at the same time I think we also recognize that not all the topics in the acceleration program are quite easy either so there is a bit of a gap and that's why like for some of the students they took a learning Grant to kind of you know bridge that Gap right um the acceleration program is designed to for people to build expertise in a specific topic um so if if you don't have the the fundamentals to do that then it's going to be quite difficult right so to answer your question right it really is the acceleration program is kind of like where we're dumping a lot of random ideas that we think um people can work on but there it is a very large variety of um difficulty as well um the program itself you know the curriculum I talked about um I think gives a really good foundation um but at the end of the day like I think I really need to stress that it's really important to build the skills to self-learn to bridge those gaps to those um particular topics because it is a space that's moving quite fast and so there's no way we can have a curriculum that will prep you immediately for you know these ideas that we want a to build on I hope that answers the question thank you thank you so much Adrian Lee thank you
Automatic transcript — names and jargon may be misspelled.