Exploring Blockchain Scaling Solutions - TOKEN2049 London 2022
TOKEN2049·Mon, Oct 9, 2023, 12:00 AM
Transcript
all right well it's going to be a tough act to follow but uh we can certainly try uh I have here with me uh it's my great distinction and pleasure to introduce Alex and Jack from Star Square uh Mata Labs famously developed CK sync and starkware so today we'll be talking about blockchains and how they scale and I think an easy way to do it would be to start from first principles and ask ourselves what is a blockchain and how does it scale and specifically what different features of the blockchain need to change for the networks that we have today to be able to scale Uriel hand it off to you um can you hear me yep um so blockchains I suspect I don't need to tell the uh audience at token 2049 what that is uh we're trying to build a permissionless decentralized ledger which can scale uh the problem with blockchains of course is that they do not scale firstly because in terms of an open permissionless network layer one blockchains as they stand today there is really no notion of division of computational labor and so all nodes in the network essentially perform the same work over and over again and because of that they cannot scale the easy cop-out is to go for a faster stronger Machines of course faster stronger machines exist but by doing so and this is not a technological limitation this is sort of an ethical principle by doing so by going for a faster stronger Hardware more expensive Hardware we heard the decentralization of the network uh because uh all sorts of players who would otherwise participate are priced out of the market and so that's sort of the basic challenge that layer one blockchains face and that's why a whole slew of approaches and Technologies uh to create layer twos has been going on for several years now we're a member starkware is a member of this set of participants set of players with an approach uh often referred to as ZK relapse or a zero knowledge proofs we prefer to call them validity Roll-Ups because in their current Incarnation these things actually do not involve ZK zero knowledge that's the short answer Alex thoughts um yeah I I love to add that um um blockchains for me if you look higher level uh their coordination mechanisms economic coordination mechanisms between different people uh where you have um the ability to interact trustlessly and this trustless component is the most important thing we have we could have economic coordination using authorities as we've done in the past with banks and with institutions and with different other means to you know coordinate and agree on uh what's the the economic reality is today but the innovation of blockchains is going Beyond trusting individual people or certain trusted actors and technologically we achieve that by building peer-to-peer systems that do not have any Central Authority do not have a a single point of failure and the way the it was originally constructed by uh by Satoshi with Bitcoin and which wasn't the the idea that was inherited by the all the existing blockchains is what's known in the Bitcoin Community as they don't trust verify principle that you essentially verify all of the work that happens on chain you don't have to trust problem is with the naive approach it leads to like technologically to quadratic work like if you have n participants then each of these and participants have to do and pieces of work to verify the state of the chain and and all the activity that happens on the chain that is not scalable Beyond you know like that that goes very quickly uh um to the degree where it's not sustainable and the idea of layer twos is to use some more sophisticated methods to either Shard the execution Shard the this verification of work uh split it in multiple parts and like make different groups of people that that check work in in each of the group uh or to use something way more advanced uh as zero knowledge for example that can succinctly verify succinctly attest the Integrity of the computations for on very large array of data so that every participant can check the Integrity of the entire State fully trustlessly Alex why is it that you can't do that on the layer 1 Network can you generate these succinct proofs on the layer one you can do it on layer one in fact there are layer ones that try to be to be succinct Mina is one example of that uh I'm not sure uh I actually cannot call uh any other one out of top of my head uh Z cash in a way yeah I mean are on on the path to accomplish that right but um I I think the um uh the the more important aspect of layer 2 is that is that you can experiment with something you know like ethereum is already a uh the king of uh layer one smart contract blockchains it has a very broad uh audience token distribution is is we're really well done it's really decentralized it has a culture and community that is very principle that is based on ethos and values more than on on some you know like ephemeral incentives uh so it's great that we can bring the these new technologies to the world of ethereum without disrupting without reaching consensus with everyone that this is the right way to do it or this is the right way to do it we can experiment and then let the best approach win okay well ethereum like you said is sort of the king the smart contract platform that we first the first instance of of these platforms started with ethereum so Jack what do you think is missing today in ethereum that we need to start thinking about these layer 2 Solutions these off-chain methods that it will enable ethereum to scale yeah I think hello testing testing all right is that okay um you know I think one we've so by the way the three of us have been working in the space for a really long time seeing each other at conferences for you know since 2017 right or and so anyways uh we've seen the history of this problem and one of the interesting things I think that there's a a greater appreciation now around the segmentation of users and use cases I think before it was what's the best way to scale ethereum and there's just one answer and there's a lot of people fighting a lot of smart people arguing about what that best one answer is and I think I think the the question has changed a little bit too to like what's the best way to solve it to scale ethereum for these types of use cases maybe a gaming application has a different set of trade-offs they care about than you know a deck that has huge huge financial volume so I think there's also more specificity as these different smart people and businesses and approaches come together solve the problem I think it adds a new wrinkle and a new twist to the equation but but in general I mean from the inside looking out ethereum is clearly the place where developers are building and it's a place where people are looking to scale you're looking at ad ethereum plus as opposed to let me start from scratch and you know take the most powerful machines and Brute Force this thing I think that's you know from our world not the answer there are a couple of different approaches today one which um pays respect to the hegemony of the ethereum virtual machine which is at the core of the ethereum network and there's another approach that says ethereum was not designed to natively host a lot of these uh cryptographic Primitives like snarks or Starks you know you'll you'll hear people talk about the way you generate these proofs uh starkware um decided to build a new virtual machine one from the ground up that's compatible in some ways with the ethereum virtual machine but fundamentally sort of introduces New Primitives Mata Labs has a slightly different opinion it says or they think that not only is it interesting to try and develop a one-to-one compatibility with ethereum but the bet is that people will continue to build on ethereum Uli what do you think um the way we see this we we were basically forced to uh develop uh Cairo which is the programming language at the heart of starknet uh the decentralized permissionless network that we're building out and we were forced to do this because uh the alternative was to deal with raw math if you will and that's too complex and too dangerous in terms of the security of the code that that's created um and the ethereum virtual machine couldn't provide us with what we needed there and so we concluded that what we need is a new stack and if you actually start looking at at the the layers that are forming and what's done in each layer you come to the conclusion that ethereum for the most part is going to be the security layer for uh for the you know in the coming years and so another question is what happens on Layer Two or what happens on layer three which is a concept that we introduced uh about a year ago we we published about this Vision which we think is very exciting and now the question is what are the needs of those additional layers and they're fundamentally different from the needs of ethereum specifically these are layers where a lot of computation is going to take place and ethereum hasn't been able to support a lot of computation and so if you look say five years out the question is applications that are then dominant in the future what language will they be written in is it solidity or is it something else and we think they will be written in whatever is the best tool for those environments I should mention in this context four weeks ago 20D community members in the Stark net ecosystem started working to build out a ZK VM which is the term in our neck of the woods used to describe something that runs in Layer Two overs you know a zero knowledge system that is still evm compatible and four weeks later we know we have 85 coverage of ethereum op codes and erc20 support and all sorts of exciting stuff so for me more than anything it demonstrates the expressivity of Cairo as a programming language but I think that at the end of the day people will want to do the most efficient thing and and the legacy of the evm which is a few years old looking sufficiently far out I think is going to be a minor consideration that's our bet Alex I agree with worry that eventually people will want the maximum efficiency and we will be having applications that are unimaginable on blockchains like ethereum today our take is uh and by the way we were not implementing byte code compatibility on vbm we actually took a very similar approach we've built a new virtual machine from scratch similar to Cairo that is designed to be most efficient in the ZK execution environment what we did there was um with like why we called it ZK AVM is for us evm is about the set of standards that people like standards about interfaces that developers expect so we are a team of developers and we see developers as our primary audience of of users and we want to make the developer life as easy as possible uh for you know for the maximum adoption of the platform so um what we what you can do with ziki sync is you take code written in solidity and you compile it into this efficient virtual machine we just made sure that all the patterns of interfaces of of the standards of the conventions that are present in ethereum can be transferred one to one specifically with regard to security and censorship resistance for example that you can take any transaction and enforce it from layer one so it cannot be centered at player two Etc things like this we just made sure on the on the Virtual Machine level that that's the case and we believe that for the near future solidity is going to dominate the space just because standards are sticky if you look at you know like modern Mac OS you still have the terminal with posix compatible commands from like Linux from 1970s if you look at modern web browsers JavaScript is still the dominant language you know like you you have different flavors you have typescript you can compile you can webassembly Etc but like JavaScript was what was the lingua Franca of the web for the last 20 years or more so we believe the same thing is going to happen with solidity and evm which is going to be the standard for a while because there are so many two and product and libraries and and services written for the evm environment that is just going to be there for a while eventually then people will be using more efficient tools uh and and we'll see what Market will uh crystallize it yet speaking of tools I know uh scale has been working on a lot of tools under the hood Jack maybe you tell us a bit more about that yeah and well first I want to just roll on this because there's you know there's a theme here so I think this is a theme that you find within the ethereum ecosystem of people who really understand evm which is different than you know other chains that just you know for Geth and there you go or evm compatible but we also spent a tremendous amount of time optimizing evm and we have a c plus ethereum uh instance and a lot of low-level networking optimization and it's just because evm off the shelf is this massive uh bottleneck um it's obviously powerful proven language and proven virtual machine but you know I think people that understand it well are doing other things with it and there's a common theme Here I I want to add there that that there are many many benefits you know to the evm compatibility as sort of a general approach but it if ethereum could have handled you know not 15 transactions a second but 15 million transactions a second I would have said no fine let's all bow down and accept this as is but I think that it's very important you know that stuff like uh Solana and and Cosmos and after since it all these different approaches and different attempts and different experiments I think are exceedingly important and when people start talking about ethereum in this context in sort of quasi-religious uh terms in terms of you know this is the thing and nothing else should exist it concerns me I think experimentation is actually crucial to uh to success of the whole ecosystem and and I think that we should support that as as a community we should and we should adopt ideas that we see elsewhere and and exchange ideas I think that's very healthy yeah um and so just I totally agree uh and and to continue to that that point I mean so if you look at scale we took a different approach and uh but we also believe in modularity right if you have a single machine doing a single thing you're not going to get much out of that and you will hit your limits very quickly um or you just have to make the machine bigger we've we've used modularity to scale horizontally so there's already 18 chains across the scale ecosystem but we also recognize that someday when we have billions of users we need to go further and so Within These 18 chains and hopefully it will be 180 chains or 1800 chains they're all working together and they're operating together but we want to have a plugable environment in a configurable environment so somebody could say hey we have a ZK solution we like and you know at the end of the day you could we could partner and collaborate with the experts in zero knowledge proofs and other other techniques to get an even added layer on top of scaling but right now you know people can show up and we have people talk to us and two days later they've deployed to scale and they have you know 50 000 users using an application that's happened because of the interoperability with it within ethereum speaking of these sort of different chains uh this is a fascinating idea of app specific chains or developing chains so networks on top of networks that are able to do very specific functions uh specifically I use um very fascinated when I read the work on layer threes and and uh and Beyond in fact the idea of just adding networks on top of networks um both I know meta labs and stockware have been working on this for a while and and scale is planning to implement something very similar so maybe we talk about that's a little bit uh specifically why it's a good idea and what's the limit to that reasoning so I'll start with you know from the end the limit conceptually we don't know of a limit in any engineering system there's always a bottleneck so write the the the honest answer is at any given point in time there will be limits um the idea came about layer three you know we conceived this this whole concept of fractal scaling um because of a need because we had teams coming to us wanting to build out on Stark net and uh one particular team said well our revenue is denominated in dollars and this is a public chain that you're building and you know you haven't invented new physics just yet so just like ethereum has gas fluctuating your network will have the same thing and what do we do how do we have Revenue denominated in dollars and our cost structure just fluctuating all over the place and what they said and of course you can try and mitigate that okay you can't solve it categorically but you can try and mitigate that by giving them more control so specifically they were the metaphor they used which I love is noisy neighbors right so if you exist on ethereum and you're uniswap the minting of Apes you know it's amazing how the metaphors turn quaint in this ecosystem now Apes is now like I I sound like a dad but anyway so the minting of Apes is your noisy neighbors and if you're minting apes and there's a rush to the exits because uh SPF or something then those are your noisy neighbors okay so people want applications in certain contexts say I will forgo perfect composability I'll settle for interoperability in fact I'll forego all sorts of benefits of the public chain in exchange for more control I need more control in fact it's not only that I need more control over who will Deploy on my app specific chain or my ability to conduct operations there with my own token I want control for the software stack meaning for example I've witnessed the resolution of EIP 1559 on ethereum this is an improvement protocol for ethereum proposal for ethereum that took two years and web 2 companies come in and say I don't have two years to spend I want to introduce this chain a change I want to do this on my layer three in a matter of weeks not a matter of years and the public chain I understand that's a far more conservative and slow-moving beast that's fine but I need to be able to run my own show and to do that as a layer three so that was sort of it came about because of a need and that's the approach we're taking I like to say know that uh you're also working on layer threes uh it yes this is true and we see layer threes and fractal scaling more generically as essentially the end game for blockchain scaling this is the way we're going to be building the internet of value problem without uh layer 3 is why we can't really build it with independent blockchains is that you cannot scale trust with independent blockchains trying to bridge them always requires some degree of trust that is subjective you know you see the validators of that chain and then there is some degree of uh you know like the way you uh you believe the messages they are passing are correct but you cannot transfer that to to you know different network and then from there to another Network Etc and you cannot really also build a single monolithic blockchain system that will incorporate all of the world's value transactions that is just physically impossible like you cannot imagine internet running on a single computer or a single data center even right you need a network of parallel running systems and that is achievable with rare threes the great thing about layer 3s is that like specifically if you build them on on the basis of zero knowledge proofs recursive is your knowledge proofs is that you can completely scale that trust you can be mathematically sure that the transactions that happened on some remote part of the network are valid and you can blindly trust that Network without knowing who is running it and so you can build this completely trustless bridges that are fully seamless that require no collateral they are like perfect Capital efficient and completely transparent and the the costs of sending funds asynchronously from any point of like any address on the entire network to any other address is going to be just a simple cost of a simple transfer within this network so um and on the question of limits essentially you're bound like how limited is internet yeah you can add more servers as long as you have physical Hardware that you can add to this network but it can grow like completely uncapped the same thing is happening here because all of these chains can run in parallel you have infinite capability of parallelization and of bridging between them the only thing that limits you is the computational capacity to produce your knowledge probes and we're going to be pushing the limits of efficiency further and further down until we get to a fraction of ascent per transaction like a fraction of like of a fraction of a fraction of percent and then essentially go depending on the sort of consensus and the type of communication that agents have in some of these networks some of them tend to scale better than others some some of them if you double the number of nodes or the number of agents in the system maybe you get close to quadrupling uh the sort of cost or the overhead some do much worse so in terms of Simply scaling the number of nodes in the network what do you think the Practical limits end up being knowing that like the dominant type of consensus mechanisms that we have today for ethereum for example um so the the this would apply to layer one systems or to systems within a single monolithic consensus because they all must be running in the in what they originally described as Don tries to their don't trust verify environment or they cannot trust each other they have to verify the transactions so you can be more or less efficient with layer threes you break out of the blockchain trilemma entirely because you are not adding servers in the single Network you're adding new networks that are essentially independent from each other that have very loose connection very loose dependency and you can do that without any limits I mean you're just limited by physical and computational capacity that you can provision with all the servers in the world that will be generating their knowledge proofs and that that do the best of my knowledge you can only do it with your knowledge groups no other method is known to me that can accomplish this completely unkept trustless Network building yeah you know I want to try to just sum that up because I think that was very well said and if you look at all three of us I think are taking different approaches at solving this problem but there's something similar in the sense that we've all recognized that you know traditional methods if you're looking at a monolithic database especially a blockchain you add more servers you add more resources it doesn't actually add any more capacity okay it doesn't add more throughput be like if you're you know writing you know trying to call it Uber or Lyft and there's you know a lot of drivers but there's only a fixed amount of writers okay what we're all trying to do is bring more capacity to the equation and we do that by adding and you know with the layer 3 environment more and more networks more and more capacity but then you have to solve for as you add that additional capacity what are the security mechanisms you're optimizing for and the user experience and I think you know all that comes together and the goal is to you know let as many transactions process as possible while having an understanding of physics okay it's you know at some point a database can only they do so much and regardless of how many you know compute power you put behind them like you know that will tap out and we're trying to solve for you know not just you know the 100 000 users today that are actively like you know interacting with a blockchain directly but you know future where there are hundreds of millions or billions of users well I think we we have a little bit of time and then we'll open it up for a bit of q a if if that's okay with everyone but uh let me ask about uh one particular question that I think is interesting and that's to do with uh the native token on the network we have good mental models and mathematical models for when you have a layer one network and you need to secure it and in order to do that you introduce Economic Opportunity costs in the form of a token but as Alex said when you start moving to layer twos and layer threes you start to break away from this fundamental limitation of a layer one network which begs the question do you need tokens on these layer 2 networks that are native to them or does the layer 1 token act as uh the sort of Master Level economic uh value transfer mechanism maybe maybe I can ask Google you first well we've come to the conclusion that starknet requires its own token for multiple reasons the most important one is that this is the most efficient mechanism that we know of to allow a decentralized public good to exist and for the general public to coordinate its evolution now this ecosystem is a new one compared to ethereum and as such has different needs and different participants different requirements and and so in that regard we concluded that a fresh start uh makes more sense um I think this is a really good take the tokens are something with much more than just a technical security mechanism it's a way to coordinate communities over shared values over shared goals and there might be different mechanisms how the tokens are used in different communities and so taking this to the world of layer threes and fractal scaling I I totally believe that we will have a lot of different depth chains or like specific Community chains or specific applications you know Focus chains that will have tokens that work to function differently and serve different purposes and that is going to be a a very cool thing to watch and experiment with yeah in scale the the tokens utilized to add security across the entire network so if we didn't have our own native token to the scale Network then as new chains are added there's nothing that bonds those chains together and pull you know that you actually create a network effect of security okay and so I think part of it is Network effects and growth and Community Development but at the end of the day payment and security are really critical components to having a token and I think networks and network effects are stronger when you have uh you know when tokens add value in terms of you know increasing security increasing involvement and you know at a form of payment and some l2s don't have that and they're using tokens for governance only and those I think are you know there's just frankly less of a need in that case to have the token but in terms of these layer three environments they're really critical and it'd be hard to establish a bond amongst that decentralized group of actors without a token well the the last thing I'll ask about the tokens is again what Alex mentioned about bridging in particular and uh bridging is a very generic term it just refers to how different networks can communicate and transfer value to each other but they're not all created the same in fact if you if you sort of go look today you'll see there's an entire zoo of different architectures for Bridges uh some much more secure than others but we've seen empirically that a lot of them tend to be very insecure and very small flaws cause a lot of loss and economic value unlike some of the dapps for example where it sort of could be contained why do you think that is really uh why do we think that is I think for the most part these uh Bridges um concentrate often an astounding amount of value and so there are a lot of eyes uh some of them white hats some of them not so white uh looking at this and taking advantage of every crack that they see um so you know I think it's an obvious answer there's it's effectively an open Bounty program um and uh the public responds in kind well my take is that most mechanisms that secret Bridges today are inherently custodian like through to to some degree or you know to much higher degree than uh uh than like most scaling approaches that are not even ZK based right so you you have to trust a lot of people so you violate this idea of not trust and we see it you know with two days or like this week's events with with centralized exchanges like trust someone can appear very trustworthy but then black swans happen and you know like you you cannot see be behind the scenes you do not know what what's really going on there and how things are secured how things are operated Etc so most hacks we see with bridges are actually attacking those centralized mechanisms not the decentralized uh smart contracts or uh like math and cryptography behind those things um and uh you know centralized systems are notoriously hard to protect protect against hackers there are a lot of zero days there are a lot of vulnerabilities and this is why we're doing crypto crypto is means like cryptography trusting math rather than people uh rather than the process I think you trust the code open source code and there must be math behind it yeah you know a lot of these Bridge attacks they expose the fact that you could have the most the world's most elaborate consensus model you could have this unbelievable Nakamoto coefficient but you might have a thousand nodes and with billions of dollars of stake but then you know your weakest point of attack is the fact that there's a three of five multi-sig and a centralized server running the bridge and if you're a government a malicious government that says hey let's go put resources and attack this you know this chain are you going to go after the consensus where all the money is no you're going after the bridge and that's why the bridge attacks are happening yeah you need to penetrate three machines and you're done yeah that's right um if the audience has a couple of questions we have a little bit of time please so so we're talking about scaling I'm totally sold on on ZK technology but my understanding is we're still two three years away from Full usability um what do you think of other scaling Solutions like side chains like polygon or optimistic rollups and what's the future of them once ZK technology will be implemented so um we met with some of we know all these teams well and respect them very much uh side chains I think fall into the Trap of uh at the end of the day if you click enough links um you rely on a small set of participants to secure the network some of the names mentioned uh optimistic ropes we know the teams well and we respect them very much when we started working on this stuff beginning of 2018 they said this is all beautiful but it's going to take way more than it will take with optimistic rollups we have been on mainnet supporting General computation with zero knowledge proofs actually ahead of of those players and vitalik beginning of I think last year said this is going to take you know having a programming language for General computation I said it's going to take five years ten years all sorts we're there it's moving a lot faster than I think most people expected I think it's moving a lot faster you know my co-founder Ellie has been doing research and zero knowledge proofs for the past 25 years and uh he's also one of the founding scientists of zcash and he keeps talking about the fact that thanks to blockchains cryptography has seen progress over the past five years that it hasn't seen in decades there there's so much IQ flowing into the space there are so many creative you know engaged people working on these things it's moving very fast now I want to be very clear there's a ton of work ahead right we're far from done we're far far from done but we're working on it yeah I fully agree with URI on both points so with with proof of stake systems like side chains they are a ticking bomb they are you know like like what we've seen this week things are good everyone is confident everything is fine until it's not and that can happen like over and overnight and some of these systems experienced vulnerabilities around the these game theoretical mechanisms so like validation mechanisms that were luckily fixed in time but they might not have been so like it's it for me it's a dick environment it's a huge risk for the entire ecosystem because if if they go down I want to add that this week it actually didn't take overnight it was actually uh there wasn't enough time for a night to uh yeah it was a few hours yeah you know my my feeling there is you know one it's a great question I think I think time is also a factor there's segmentation and who are the types of users and applications and what are their security needs and also time to Market's an important thing and and scale has an approach that integrates side chains without the you know we do a lot of things for collusion resistance we do a lot of things for uh redundancy and and liveliness across by creating a network effect across chains but you know we've had since June 17 million transactions and we have about a million transactions every three days now and we're really focusing on gaming and what three applications you know that need high volume throughput we also believe in segmentation and are excited about adopting ZK and and other Advanced Techniques that I think are absolutely critical for other uh higher monetary value transactions so um but it's all trade-offs but one trade-off is time and we can't just sit around and wait forever but but I think the you know tremendous respect for all the teams you mentioned and the techniques and I do feel like these different techniques will find the low-hanging fruit based off of their trade-offs because it's all a game of trade-offs just after this uh regarding ZK specifically uh I agree with the way again like the base of innovation is is extremely fast and we're going to be we're actually surpassing optimistic Roll-Ups because to the best of my knowledge there are no optimistic grow up with permissionless fraud proofs which effectively means they are trusted systems they are not yet optimistic but they are way more legit than than side chains in my opinion uh but on on the basis of innovation with ZK sync just launched the the very first MVP of uh our network with uh ZK VM on ethereum mainnet fully functional with proofs with everything enabled with uh uh you know reasonable costs for transactions and we are going to be opening it to the developers and users gradually as our roadmap outlines in in the next month it's not going to take years it's not it's not two three years away I think we're we're just on time and uh with that I'd like to thank my panelists again this was my distinction and I hope you everyone enjoyed it and uh we hope to see everyone outside maybe we can uh entertain a few more questions and thanks for having us thank you thank you [Applause]
Automatic transcript — names and jargon may be misspelled.