STARK Validity Rollups: The Ultimate Scaling Technology - Louis Guthmann
ETH Toronto Talks · 27 Jul 2022 · 37:46
StarkNet ecosystem lead Louis Guthmann introduces StarkWare's zero-knowledge rollup StarkNet and makes the case for STARK validity rollups as a scaling technology at the Toronto Ethereum Developers Meetup. He briefly touches on Cairo, StarkNet's smart contract programming language, and on some of the underlying cryptography.
Speakers
Topics
From ETH Toronto Talks, hosted by ETH Toronto.
Transcript
[Music] if you've been coming to these meetups regularly you may know that I share a particular interest in a very specific type of profile pictures simply put they kind of look awesome and they pop out to my eyes when I'm usually Doom scrolling on Twitter at midnight um it helps tons that you know the people sporting these very particular very Niche profile pictures are usually Web building contributors such as Roscoe kallus and Patrick McCory who both support these very Niche profile pictures our next guest also Sports one of these Niche profile pictures from a very particular nft collection um they're called the bastard Gan punks
and based on our shared Affinity I trust that my next guest and I will get along just fine because I also really like these nfts um his name is Louis Goodman and he's an ecosystem lead at starkware the organization behind a layer two ZK roll-up called starknot so Louis is currently based in Tel Aviv Israel um but he studied in France where he completed a degree in management at the Paris essec business um before moving on to studying math physics and computer science at a top French graduate engineering school is an extensive professional background in data science before joining star core more than three years ago as a product
manager he's currently ecosystem lead for the organization I would say it's probably easy to say that the web 3 bug hit um Louis card at some point because he's also the co-founder of the zero knowledge Global medium so Skye he loves his cryptography and he loves his crypto so he's also somewhat of a troll because on LinkedIn I I saw you declare in a comment that web 3 is a scam and that's why you're working in it no context anyways um there's been tons of announcements on the Zero knowledge side of things recently um and if you're unaware zero knowledge or ZK is another flavor if you will for layer 2 scaling um the other of course being optimistic Roll-Ups ZK technology is often
construed as something of a moon math discipline um but the teams that are working on it are truly working on some revolutionary [ __ ] the team at starkware starknet and Louis of course are no exceptions so without further Ado I'd like to introduce um uh Louis onto the screen well what the presentation I love doing the intros like I mean I have to admit like I feel like on the radio like you know 99 invisible like your team is uh team is uh is presenting or something very cool so so yeah so are you gonna start
I'm not sure do you you do you have a like a presentation you want to do or do you want to just get into like I mean I mean it really depends on you so I mean they could do a plantation I think uh let me just uh it kind of depends sort of like what how knowledgeable the the the the panel here the the people here are about Zeke roll up and zero knowledge group so accordingly I can either put a presentation or uh simply uh so really depends on the sort of like a quick uh feedback and feeling of the of the entire crew here yeah I don't know how does everyone feel about um ZK stuff feel free to unmute your mic or
um type into the chat box like what what's your level of comfort with zero knowledge or um I I worked on an Amina blockchain which is a zero knowledge based layer one um called Mina oh yeah the Mina blockchain um for a bit so I would say myself um intermediate intermediate but uh is this in a particular topic or is this sort of like broad um zero knowledge um I have like I have a regular you know the the startup presentation about sort of like how proof brings to scan and what stock quote is doing and it's like ecosystem approach or otherwise you know we can
just go over uh um over um over question about the space and so on so let me start with the presentation the very broad one uh I just managed to pull one uh probably a second ago so let's start with that and um and uh let's get going here it is okay here it is as you can see so it's actually quite a different station I have to admit to December but should be the trick um let me can you see my screen I can see your screen yeah I mean we
would go over all the DK evm the all of this kind of stuff um if you want and explain the nuance and all the the details there but so um yeah so let's start let's start with uh kind of uh an overview of a stark ZK roller star validity roll up which is the other name of ZK run up and kind of understand where where we come from so uh the when it comes to blockchain there is kind of quite a paradox which is we have the system which are very brand new in some sense like they just date back 12 years ago and they are slower than basically any 40 years old system you
know and the question is how come why so the reason is because it don't evolve in the same trust model uh the trust more than a regular you know finance and Money Transfer is what we call dedicated accountability meaning you trust a centralized entity your bank or a set of central identity a console stream of Bank working with one another in the in blockchain you actually I have a very different Paradigm you are what we are looking into inclusive accountability and so increased electability means there is no this big Center uh centralized server there is you and you can very verify anything happen under the on the network and so because you do that like you have this
much more stronger trust assumption you are usually in the current form of chains sacrifice privacy and scalability by scalability I mean the following thing skeleton means um I'm gonna I mean I'm gonna have less or more transaction for the same Hardware okay and so the question is how do you scale inclusive accountability uh as I said today we have the Triad Phi which is centralized entities very fast very big machine connected to each other through business contract the other one is blockchain slow but uh very optimized in one dimension which is a trust Resident
and so one is fast and exclusive the other one is slow and inclusive and so how do you make change faster the the simplest solution say oh you know what just make it bigger make more block transaction per block and so the pro mode you do that is that you are expelling from the network the smallest actor so one thing people love to do is to compare uh the trust Assumption of uh of uh uh of um you know the TPS number of transactions per second between Bitcoin and Eve and Solana and I like to explain that this is nonsensical because we are not comparing the same thing so
one is like comparing an apple to an orange to Ferrari and the reason it's very simple is the target machine for the Bitcoin Network the the smallest machine in the network that is supposed to follow the network on bitcoin is a Raspberry Pi on ethereum it's a 2 500 laptop and on Solana you can argue that it's a two thousand dollar machine promote so you know when you're a kid in Uganda to get a random you know example uh pinning up Raspberry Pi is a is right it can be easy like it's maybe gonna access Raspberry Pi maybe you can return on your phone but basically it's a slowest potential out of computer you're gonna get and I'm buying an expensive
two thousand dollar laptop is maybe too expensive for you for the uh so much Rich Kids uh in University in in in five places I've actually seen a strong laptop is something that is Trivial and so ethereum is good at rest assumption and at the same time you know when you're Solana you say you know what two thousand dollar machine is like too restrictive a business can pay two thousand dollars a month and all of those are true but they are they are trade-off between decentralization why because the smallest Mission requirement the easiest is to run the network and the more decentralized it should be so how do you scale can you scale it without doing control provide on decentralization and so one way to do so is through uh what
we call optimistic follow-up fraud proof follow-up habitual optimism and so here is it is so inclusive why because you can indeed verify on your uh computer but you kind of assume that some stronger machine is going to keep up with the network at all given time to challenge any arbitrary throat and so it's not completely inclusive because as a small laptop he might not have a repeating power to even himself for the chain and therefore knowing what the what what the frog happened at the current steep so this is where the zero knowledge proved and the advanced cryptography kicks in this Moon map that team talked about is enables you to remain fast
then inclusive why because those big machine that we discussed here now can no longer be the only one to verify the generator proof that what they did is correct and anyone else even the Raspberry Pi even more than there is very power I can verify it efficiently but if what started as you can think and polygon zero putting on Hermes and all of those are doing so weatherproof proof they are doing that are composed of three elements they are they have a statement a statement is basically a program so when I'm sending a transaction I'm sending a statement that this transaction is valid I mean I'm going to verify this transaction to be valid against the consensus rule against the state and so on and then the what we call the blood producer The Miner is
going to look at the transaction and run it and so at the end of the blog the minor or the sequencer even though you call it kind of know what's true I mean definitely know what's through that block on Thursday on Dutch proof is going to generate uh proof that with the blog was correctly I was correctly uh prior the the price is prior inflation but it's going to compute it correctly and the proof the cool thing about it it's super efficient it means that you get scalability why because the proof will take roughly a small what we call a casino runtime to prove but the verification is is uh
in log n log Square to be specific so I can verify um um I can verify on that or efficiently in login roughly the the the the the runtime of the of the computation so now how does it affect change because before as you can see here all the transactions need to be verified one by one now I can have a proverb show me that this the database of State move from one to B and send the proof along and now I can just accept the group and verify I set this new state and verify the super efficient uh so Stark net uh stockware has two
offerings two solution one is a SAS platform called star case which is uh RG stage um used by dodx which Universal and diversify uh geogx even knows about it they but so where is not the one that most people know about and so that's probably the most successful game in crypto so they don't have any tokens they do fantasy football and they are a highly profitable company just selling nft card of uh soccer player and start it has been live now for almost a year enables anyone to run smart contract and basically develop as if they were on ethereum so stock where the company is like uh
doing very well um we uh achieving the number is wrong now by 100 Mil uh so we we have a lot of researcher now the team is in red people we are focusing on bringing those proofs to to production and so as of May 2020 what oh no the 2022 uh now we have 630 billion dollars of trading over uh 200 million transactions settle uh with the bear Market the TV are kind of drop but basically all the rest now those numbers remain true now the question is what about start Ed right now have a very active community and I'm very proud of it because it
wasn't a clear challenge it was a clear change when you started Stark that has probably at this point um a thousand monthly active death meaning they have to try it worked every month at least or every week on starknet uh roughly 20 or 25 projects that fundraised to be only on stock net and over um I think the download of like some of your SDK is reaching sixty thousand seventy thousand the next type of Stark net which we announced uh two weeks ago was the launch of the token which will enable us to reach decentralized the universe stage which is whenever we will be able anyone will be able to run proverb and sequences and so
um the third ecosystem is growing extremely fast and the whole point here is to say that if you are a Dev and you are joined with free or if you're another three you should have a look about what's going on Stark that because it's very very exciting in a very brief note as a no as a developer what you get on Stark that you don't get anywhere else at this point is three things you get cheap code data meaning you can pass through data from Oracle or from macro tree for cheap YouTube computation which enable things like fossil meaning the ability to verify the state of ehere you only using the block hash and go back in time and you have accurate abstraction you need all wallets are smart contract wallets which means that you can have
you can you can have application that will Sparkle that we can also check make sure that you don't spend over you don't understand that you don't get hacked that you can replace your key and so on and so forth another exciting projects are building on top um we already have a uh I think kind of feature complete relate to Eve and as of now we are focusing on developing more tooling infrastructure security and getting more and more Dev on board to uh build uh furthermore the ecosystem in the in the network so to we have today two full node Juno and Pathfinder we have um and study version made by open Zeppelin a block experiment by nevermind um a father for modification
um and Foundry like infrastructure to write smart contract basically anything you want should exist or want the verge of existing on Stark so if you have any question about stocknet now I'm available in this we can continue for the more cryptography stuff so I had a quick question and then I I apologies if I missed this during your presentation but like you mentioned the verifiers are pretty fast right which makes sense oh I guess makes sense right um but uh the proving portion uh from what I've understood can take drastically longer than that um then I
got a quick sort of like few seconds or so um um I've heard on the order of magnitudes of hours or or needing to at least with like for example ZK sync needing to wait we're not needing to but like it being economical um and cost effective to wait for a few hours prior to creating a proof with like a certain number of transactions uh has is that something uh Stark net is um I'm sure you guys are thinking about in terms of scalability uh can you speak to like where we're at now like 2022. so so that's a very good question which would change a lot in a couple of weeks uh as of now we set we send proof every eight hours meaning that if by the time we
sort of like set a transaction you're roughly gonna wait eight hours to uh for instance withdraw near one but you have to remember something the only sort of true case where you're gonna feel the the latency is when you withdraw and the comparison goes compared to optimistic product what the withdrawal would take weeks I mean literally a week uh uh for the same thing so we already like order might be faster but now the interesting point is that in a couple of weeks we're gonna have uh uh uh in the couple of weeks we're going to have recursion and so recursion means that you can make a proof of a proof and so what's new that you can make proof
and batching proof together so I can next you want to prove that are faster to prove but don't paralyze computers and prove them together and so we're targeting now in a couple of I mean it couldn't change but roughly we're targeting one hour latency in the near future uh for for going back on that one interesting thanks for that uh um but now so um but all scores like the the lat I mean all of this really depends on the number of transaction because the the savings that you get on the secure lab are basically based on battery the savings are like starting which point do I get saving compared to running things neither
and so the thing is it's actually relatively low uh last time I checked with a while ago it was very long time ago but I think my story check was you only had to wait it for like another transaction to be worth it to batch in terms of cost and verification time so um so so yeah so that's kind of where uh um where all of this come from um now and to conclude this um the you have to remember that of course all kind of bridging that exists today you know like through liquidity Network and so on can also work independently the main advantage of those short proof
that seems like long that they're not that long actually they're not that long because it means that for instance as a liquidity provider only have to provide liquidity for an hour not for a week for an hour before getting back my money back another one or one and two whatever you want to say back to so yeah the other question about uh security to Cairo why do we have our own language that's a very good question so uh ZK do not run on the same Computing model than x86 computers I mean CPUs ZK uh your computers run on Beats and bike right the cheapest operation you can do is ixor in a z keyword the cheapest operation
you can do with the division in the term of proving so you actually have to mimic xor to make it look like xa6 on the other hand division is expensive and unregular CPUs because it's it requires a lot more operation and so you are not running a same Computing environment as a start so as I said like for instance also like sorry I say like the basic elements we have on the regular CPU is bits and bytes in ZK you have what we call effects a field element which is basically a big unit and so that's the first point why do you
need a different language because that core point is like very telling about the way it can change another thing is that Ezekiel like zkp are about verifying and therefore the language is non-deterministic or can be made non-deterministic for instance um let's say I want to compute uh x square x square um that's a good example let me I want to I won't get I'm going shooting them I have a narrate and I know that this element is inside the array the run time to find this element in a regular computer it would be uh like a
computer or event right like I need to run over the array to find it I I know that this element is the area regardless I know in average it's all of it um in the ZK roll up I mean in the in the zkp environment it's actually all of One probably complexity the perspective of the the proof why because I can just show the the element in this at ease at this index I'm verifying where it is I don't have to find it so from the perspective of the CK it's O of one it's not all of it so this is just like a couple of examples where you can get dramatic Improvement of performance by playing all this the
specifics of the language of the environment you're working and so we optimize for performance thinking that we can get backward compatibility as a second thoughts that's why we now have warp and that's also why we are um pushing for actually other language to compare to Cairo so it's not entirely true we we'd actually for the story we kind of made a very ballsy movement move back back in the day because when we started everyone like crept over us for having our own language people say your Authority is Ultimate language that will ever be made in the universe
uh nothing will surpass it and going after telling you know we're going to teach you a new language from scratch was a very hard Endeavor the funny story that it's actually at this point I think an advantage I'm going to tell you why we so again of course I either getting performance that I told you about before but actually the funny story that good Dev the non-copy pasta ones they actually are okay learning something new if it's cool and that's what we have said like if you look at what project being on stock that I can tell you there is almost none that just that could be passed as of what exists elsewhere if you look at topology
at Brick at edge of the car at a Giza Tech um uh uh vkx zigzag all of those just to name a few right are three that are very different from anything that exists somewhere anywhere else because there are people we just show up and say okay that crazy random idea that they couldn't do on Eve because you know goddamn competition is expensive and call it now I can do it fossil is something I've been dreamed about for years like this stretch proof it's not a like view as used but going to be used by snapshot x and by Loot and by dope
war and by a lot of application looking into how they can leverage the reading the state of another chain I don't know two and one Etc directly on started so why didn't they take their own language it's because they made the board they they made I think in my opinion sorry I'm gonna be a snarky here a bad choice no because I I mean they made a choice which was to say be even compatible evm compatible or you know to please whatever the if you're saying at the time uh I mean the the I I think it's uh I think the the loss in performance doesn't make it worth it and I think I'd
rather work from a clean slate than the making something that is like really Backward Compatible in your opinion is the warp transpiler than worth dealing with or is it better to just learn how I mean if you can write I'm going to say I always teach people warp is great like Greg vardy is an amazing guy it's a great tool like cereal um the the thing is e unless you have like you know like unless you eat one inch and you your product by default has to be cross-chain because he has to and you want to maintain one single code base for every place you do because that's why it's too complicated then I would say yes as one inch try
warp if it works for you I mean if you're trying something brand new why the [ __ ] would you bother with the existing limitation and and and things that just you know doesn't make sense because for instance as I said started do not have uh EOS we don't have like private Keys per se we have account and then the private key is just a signer on top then message messages value or orders of sort of transaction level operation that exists on if doesn't make sense so if you're using something just that exists today you're going to have to make a adaptation which might be annoying awesome
um anyone else have any questions nothing nothing about uh cryptography perhaps like I'm I like I'm way out of my realm here the various variation of the KVM if you want uh the solidity compatibility evm compatibility in evm uh what was the last one uh equivalence yeah yeah sorry just just to clarify in my head is starknot evm compatible then like so if you consider so we marketed this web at work
is technically even compatibility I see we don't Market it this way because we think it's diving genius to claim that you will be able to just for it instantly because right there are things that doesn't make sense or the the the model of stock net does not follow exactly VM so claiming event continuity will be these dangerous although you can write solidity to Cairo using Warp but some operations just do not make sense of code genomics and for instance uh block time step we don't have block time step on I mean I don't see any sort of I mean ZK VM would say block types that make sense or
block hash you know like a there is a code uh like a word block hash on the on solidity right I think it just doesn't make sense for for Stockton so so if you have compatibility means that you're you have a your your VM is able to read to read soytic files so it doesn't have to be read evm by code but basically read solidity and turn it into your language so this is what zika think and WordPress are doing you have a evm uh compatibility which is you are able to simulate I believe the
recall uh to basically take each Pub code and turn it into your own VM so you work at the up code level not at the language level but you are not running the the up code themself you are transferring into your new VM that's what I understand that's what uh that's what vkvm by polygon does the Hermes does I think and you have the evm equivalence which is actually implementing each up code as its own circuit which is what scroll is doing so for instance um
I finally understand scroll would be able for instance to prove ethereum the dkvm and polygon would not be able to prove it for you well if by proving new like if I give you an old block of if scores should be able to prove it I don't think that polygon can percent in that sense and obviously the casing cannot defend it because it's based on on the authority no word quick quick question so this is probably for a whole other conversation but um is uh starknet um Quantum safe so the elliptic cryptography so so Stark
are quantum secure NBT curve cannot be made to secure by definition but it's a curve I mean by definition of the show algorithm to be specific I would invite you um uh so the reason okay Quantum security is uh okay so computer computers are you know the like the boogeyman of all cryptography um and there is reason why the reason is because compute computers are good at basically three things three things we know that they're good at three things they are good at finding the shortest path like you know like if I give you like the uh I think if the cells you know the third the salesman uh problem they will find you the actual shortest
path um the second thing is they are good at uh or I forgot but uh another algorithm and the last one is they are good at factorizing uh prime numbers so everything is basically it's basically toast whenever we have compute computers and by your modification of the short algorithm you can also break any tips of cryptography now uh hash function general purpose hash function like sha or ketcha or not I mean they are heuristic they are not based on any sort of mathematical
assumptions they are not breakable as of today as far as we know based on uh quantum computers and so Stark are are post continues secure probably costing them secure as at least if it exists one large function that is Collision resistance so if it takes this one functional degree solution you can get starts but as of now so today's the stocks itself are consumer resistance that's what we also have a Quantum resistance signature called Ziggy Stark but start that is not because Darkness use analytical cryptography and the state is maintained using something we call
pedestal hash which is a hash based on YouTube curve that's it a question there's a couple of questions I don't remember people leaving cool perfect and it's like a lot of like the whole the stuff about the elliptic curves like that flies right over my head so I can't remember I can explain the words do you know why I mean I can do like if people are boring and go over a tiny bit about cryptography I basically studied cryptography by myself uh back in 2017 2018 and you know sort of like learning alone so um back in the day so so
um you know you know I arrested work right work I'm hard say yeah uh for them uh somewhat uh and after maybe explain to like a kid right right so everything worked because um uh it's hard it's assumed to be hard to factor two large prime number if I gave you a number and they are the pro the other products of two primes it's hard to factor them because I mean you don't know what the prime number it's the prime number is big enough you need to iterate over all numbers to get the final right and so um the probably very same I mean is no
longer used for modern cryptography or try to be avoid is because there is an algorithm that that breaks like so security of cryptography depends on the number of bits within the system you're using the crystal system and there is say model which is basically I take two large number which is going to be I probably my public key okay I take two big prime number I multiply them together and this is my my public my public key this model um is has like factorization of that thing as a an algorithm which is solvable and if I recall correctly
um so okay give you an example are you familiar with the birthday paradox okay there's nothing to do cryptography very Paradox is a starting thing uh okay here it is imagine you have 50 people in the same room uh now another people in the same room and you uh starting out uh no wait you have you have 25 people in the same room what's the likelihood of them have you say two of them are being the same birthday I don't know what the number is but at some particular number it's a hundred
percent yes I don't know what that number is uh 25 so if you have 25 people in the same room chosen randomly assuming distribution of the birthday or random what's the likelihood of them having same the same the same birthday you say there is 30 uh if I if I'm correct it's 50 yes uh you checked it Daniel do you check it uh yeah yeah 50 I mean the 50 I mean sorry five I need to check but uh I think it's 20 50 basically and if you go to like thing 40 you're already at like nine percent because if you just put the math of it you can see that it actually just goes
very fast that start the more people put together the more Randomness and the more likely how they have to collide basically and so what happened is there is for instance the likelihood of finding is a two two point two hash function the likelihood of finding two numbers that Collide will that have the same prey match I mean animated pretty much you basically uh have a security like uh basically after has the size of the group sample you have 50 chance of uh 99 gender finding collisions I mean okay I was me being trying to be uh to be fancy here I'm gonna stop there
because it's it's cool but it's too complicated for a discussion now I mean still appreciate um you that's it the attempt yeah but basically there is algorithm that vector vector uh prime numbers the two prime numbers in if I recall uh uh o of um uh like all of uh like X like wait log I think it's like uh but basically four times faster that like uh four times faster two times faster than the the regular the dumb algorithm let's go to the the snow algorithm and so you you want to use
because you use some structure of any natural numbers and you want to use anything curve uh operation because they don't have the structure which makes it safe okay anyway it looks very short it's cool but it's uh