New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Next Phase in Scaling | Oren Katz - Starkware

Ethereum DenverWed, Oct 9, 2024, 12:00 AM

Speaker

APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply

Transcript

to announce that our next speaker is or in cats of starkware talking on the next phase of scaling so everyone give a huge round of applause hello uh so I'm Orin from starkware uh and I want to share with you uh uh I want to present the proving technology we've been working on for a while now uh so I'll both start and end uh with these highlights so it's going to be the fastest Pro proving technology out there uh it will significantly reduce the cost of uh uh generating Stark proofs and it's going to be seamlessly integrated into Stark net so if you're using Stark net or building on Stark net you're going to reap the benefits of this uh without the need to do anything so what I'm going to do is I'm going to uh first I'm going to explain why or how proving technology actually helps with scaling blockchains I'm going to run briefly through the history of proving uh and its relation to blockchains uh then I'm going to introduce this new Pro we're working on uh I'll briefly touch a few of the improvements or the the mathematical enhancements that make all this possible and then I'll end with the benefits of all of this so why do we have a scale issue with blockchains all so blockchain is a decentralized technology uh so you have lots of full nodes typically tens of thousands or even more but each and every one of these full nodes uh really has to execute all the transactions of the entire network add to that that we want a full node to be able to run on a weak machine uh and we end up with u us limiting the throughput of the network so all of this could actually work that that's basically why we have a scale usure in blockchains so how does uh proof systems how does stark or other proof systems actually help with that so the main idea is simple we want to take all of this uh computation of running all the transactions off chain uh there we could actually only run it once in addition to running it uh will also generate a proof a stark proof that basically shows that all these transactions were valid we're going to send that proof on chain and the only thing we're going to do on chain is basically verify that that proof is valid instead of run running all these transactions and the nice thing about Stark is that verifying a computation is a lot less expensive than actually running the computation it's exponentially uh lower cost than actually doing the computation itself and this is the way how we can uh run lots of transactions offchain but still uh verify them inexpensively onchain so based on this idea idea we came out with this concept of layer 2 validity rollups uh and the way this works is that the users send the transactions instead of sending them directly to layer one they send them to layer two or more specifically to a sequencer which is running air to this uh depicts Stark net but it's true for any other validity rollup as well the sequencer sequences these transactions into blocks these blocks are then sent uh to the prover to a stark prover that generates a proof that shows that all the transactions in these blocks were indeed valid that proof is then sent on chain to a smart contract and on ethereum that knows how to verify Stark proof and when uh that contract verifies the proof only then can we basically update the state of the rollup on another smart contract on ethereum so this where we're able to run uh much higher throughputs than etherium can handle without compromising the security of of the base layer which is ethereum in this case so this concept of proof systems is is not really new it's been known in Academia for several decades uh even the later enhancement of that which is zero knowledge proofs was already published in in the80s in 1985 uh but for many uh for many years it's been something that has been researched but not really used anywhere in in any industry in production because there simply wasn't a use case that people uh thought uh warrants that uh things started to change once blockchain came around uh so first there was Bitcoin then ethereum the first time zero knowledge proofs were actually used in production were in zcash in 2016 and then they weren't used for scalability but rather for private transactions over privacy a couple of years after that uh the Stark paper were published Stark is the proving technology that we use it has some uh better qualities than the one that ones that came before it and also Stark where the company was incorporated and two years after that we deployed our first uh rollup on ethereum mainnet that was starx starx is an application specific rollup uh that caters for a specific family of applications which is cry crypto exchanges so it supports uh spot trading nfts derivatives uh but it already was able to show that we could run a much larger uh number of transactions on ethereum at a much lower cost and there are several uh multiple exchanges actually running on that technology a year after that we deployed the the first Alpha version of starnet Stark net is our general purpose uh smart contract platform so it's more like a full blockchain running as a l 2 on top of ethereum I just mentioned both of these uh underneath the hood we're running uh our Stark prover that we called stone stone stands for Stark one which is the first prover that we've developed when the company was founded like five or six years ago uh so all of starx all of starnet up until today is running on that prover uh here you could see some numbers uh for starx and Stark net uh as you can see they're big uh I'll highlight some of them so if you look at starx starx has facilitated to date in terms of trading volume it's it caters for exchanges so traded volume of over $1.2 trillion uh the number I like most is the one on Top If You aggregate the amount of saving that Stark X and Stark net has saved in gas cost on ethereum to date that's all by itself over a billion dollars so if somebody wanted to run all these transaction on ethereum it would have cost a billion dollars more than it did uh this is another nice metric for Stark net that shows the size and the growth of its developer ecosystem um so Stark net what you see on the xais is basically the number of developers working on Stark net in q1 2020 and the y- AIS is Q4 last year Q4 23 you can see Stark net over there not only is it uh the biggest ecosystem outside e theum it's also the fastest growing one one and this is basically due to the strength of the technology and the strength of the community okay so what's next so like I said all this was running on stone stone is basically a prover that we've built five years ago even more uh now the world has progressed uh and we know how to do things better today uh so I'm very glad to introduce now the Stover since the first one was Stark one uh it only makes sense that the next one is going to be called St now it incorporates uh several uh uh enhancements and improvements and uh advances basically improving technology uh I'll mention them I'll I'll touch briefly some of them I won't have time to go over all of them so it uses uh a small field uh the msen 31 prime field uh in order for us to be able to run Stark on top of that field there's this new invention called Circle Stark I'll talk about it uh a bit in a second uh it also uses gkr lookups mixed degree uh traces and also some improved uh uh chairo virtual machine I won't be able to touch all of them but if you're interested come and talk to us afterwards so what's the meren 31 field uh so it's a it's a prime field where the prime is exactly 2 to the^ of 31 minus one uh which has some neat properties so first of all it's small uh that's what makes it good for performance it's less than 32 bits uh which make it pretty granular for atiz as well which is what you do in Starks and proof systems uh it has this nice property in in module reduction in that 22 31 in that field is exactly equivalent to one which makes computations easier and it it basically offers great performance for both CPUs and gpus but there's a problem here so the field is great but if we want to run Stark on top of that field uh we need another thing we need a structure of a group uh over that field and for Stark to function properly on that the group has to be of size that divides by high power of two things two to the^ of 30 but meren 31 doesn't have that the highest power of two it divides by is actually Four is actually two it's not doesn't even divide by four so luckily there is a solution to that uh which uh a few researchers from starer published a couple of years ago uh that's called EC fft elliptic curve fft that basically enables us to run Stark on top of a group that doesn't have this nice proper on top of a field that doesn't have this nice property because the group we build is not the uh generic multiplicative group but rather an elliptic curve a group built on elliptic curve but there's another problem here that the the operation elliptic curve operations are expensive so we can use it for stock but will be quite inefficient so now there's a better solution this is an article that was published just uh two weeks ago uh it's a a collaboration between polygon labs and starkware uh and basically it introduces a new type of uh uh uh a new type of group that we could use for Stark that actually has better performance and that's called Circle Stark so I'll start by showing a short movie of uh about uh Circle Stark is that well you know me at least better than this does you think I'm biased fell but let me ask question what I can you hear it hardly okay okay so uh first uh a couple of apologies I'm the next few slides are going to be a bit mathy so I may be losing some of you so it's not going to be long bear with me another apologies to the ones who actually want to Di deeper into the math this is going to be more hand waving than than rigorous so if you want to hear more come and talk to us afterwards uh so there are many types of groups uh the simpler one with uh is what I call the gener the generic uh multiplicative groups for Prime Fields is basically all the integers up to the prime minus one uh with uh uh uh multiplication which actually forms a group like I said this is the simplest but it doesn't work well for M 31 and Stark so the the other option I I mentioned before was instead of using integers we could have each group element basically be a point on an eliptic curve and then we use the elliptic curve multiplication for the group operation that's also a group that actually does work for Star but is quite inefficient and this new idea is basically we could use another curve which is just the circle basically the unit circle so the group elements are basically points on that Circle and the operation is a pretty much a angle addition so if you want to add two points on on the circle on the curve so each point corresponds to its angle so if we want to add the point that corresponds to angle a with the point that corresponds to angle B what we get is basically the point that corresponds to Alpha plus a plus b and one can show that this is indeed a group and it's a group that's very simple to actually do star operations on and fft and all that we need for for this uh and from 1031 it has exactly 2 to the 31 points okay so so what's in it for you so first of all this is going to be a lightning fast prover uh way faster than anything out there today how fast uh so we're not done with it yet but we estimate it's going to be more or less 100x faster than [Music] Stone and for Stark net so first like I mentioned before it's going to be seamlessly integrated underneath the hood so for whoever is using Stark net building on Stark net uh sending transactions to Stark net you don't need to do anything and you'll get the benefits of this it's a it's going to lower the fees because it's going to cost a lot less to generate the proofs for the transactions of the network a lot less uh it's going to improve uh the finality both on layer one and Layer Two uh for a similar reason because it's going to take a lot less to generate a proof uh so we could submit it a lot quicker and as always with uh uh technological improvements it opens new possibilities some of which we probably haven't even thought of uh until now uh just to get you thinking consider that today generating a block on Stark net and typically on networks is something that takes a few seconds maybe up to 10 seconds whereas to generate a proof for a block is something that takes a lot longer something like 10 minutes now imagine what would happen if generating generating a proof will take also the order of magnitude of 10 seconds which is the same time it takes to to build a block uh what that means for consensus what that means in general and last but not least all of this development is open source from day one so if you want to take a look at it so we're not done it's still work in progress it's still early stages but we already have some code and a working example of a simple proof for a Fibonacci series so uh you could scan the QR code and go to the GitHub Repro and and take a look at it so I'll end where I started this is going to be the fastest Pro out there it will greatly reduce uh the cost of computation of generating Stark proofs and it's going to be seamlessly integrated uh into Stark net thank [Applause] you

Automatic transcript — names and jargon may be misspelled.