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

Loading player…

Workshop Starkware | Victor Sizaret | How does Starknet scale Ethereum | ETHDam 2024

CryptoCanalMon, Oct 7, 2024, 12:00 AM

Join Victor Sizaret for a workshop on "How does Starknet scale Ethereum" at ETHDam 2024. Starknet is a a general-purpose zkRollup (Layer-2), scaling Ethereum with STARK proofs, the Cairo programming language and native Account Abstraction. With the Starknet stack, you can build user friendly computationally demanding dApps, such as fully onchain games, DeFi and generative AI. Starknet provides Ethereum-level security by producing STARK proofs off-chain, and sending these proofs on-chain. https://twitter.com/starkience https://twitter.com/Starknet https://twitter.com/StarkWareLtd https://starkware.co/ https://www.starknet.io/en James Campbell - MC of ETHDam, Hackathon Organiser, and Web3 Developer. ETHDam - a conference and hackathon held in the heart of Amsterdam, Netherlands from April 12th to 14th, 2024, celebrated its second edition, gathering more than 600 participants. In the dynamic space of ETHDam, privacy and security took center stage, featuring groundbreaking discussions on hacks, recovery, and the revolutionary work of figures like Pertsev. Privacy is dead in crypto, people that know, know. People who don’t know, should know. ETHDam is powered by CryptoCanal, an education and events platform growing in Amsterdam, spreading its roots to Rotterdam and Zürich. Keep up with us to see updates on future events: https://www.cryptocanal.org/ Follow CryptoCanal on X: https://twitter.com/CryptoCanal Join CryptoCanal TG Community: https://t.me/CryptoCanalCommunity Join CryptoCanal Discord: https://discord.com/invite/XJVjpCqQBz We would like to thank our partners that made this event possible. 🌷 Battleship Partner 🛳Oasis Network https://oasisprotocol.org/ Jet Ski Partner 🛩⛷ NEAR https://near.org/ Canoe Partners 🛶WAKU https://waku.org/ 🛶Trail of Bits https://www.trailofbits.com/ 🛶Avalanche https://www.avax.network/ 🛶Privacy + Scaling Explorations https://pse.dev/en 🛶Threshold https://threshold.network/ Our Canoe Partner & Official Node Provider 🛶dRPC https://drpc.org/ Sponsor 🤝EF Ecosystem Support Program https://esp.ethereum.foundation/ Paddle Partners 🚣ChainSecurity https://chainsecurity.com/ 🚣Lido https://lido.fi/ 🚣Cyber Capital https://www.cyber.capital/ 🚣Diva https://www.divastaking.net/ 🚣Firn Protocol https://firn.cash/ 🚣Beefy https://beefy.com/ 🚣0xbow https://www.0xbow.io/ 🚣Obscura https://obscura.build/ 🚣Panther https://www.pantherprotocol.io/ 🚣Maven 11 https://www.maven11.com/ 🚣Zama https://www.zama.ai/ 🚣zkSync https://zksync.io/ 🚣Secret Network https://scrt.network/ ETHDam AfterParty Fren 🥳Bitvavo https://bitvavo.com/en Chapters: 00:00:00 - Introduction 00:01:25 - Increasing Block Size and the Need for L2 Solutions 00:02:51 - Creating a Proof of Integrity for Ethereum 00:04:00 - Scaling Ethereum 00:05:29 - Programming language for generating proofs 00:06:41 - Starknet: Native Account Abstraction 00:08:03 - Understanding the State of Starknet 00:09:23 - A Introduction to Akio Smart Contracts 00:10:41 - Traits and Implementations in Rust 00:12:00 - Making Money on Starknet with Only Dust 00:13:28 - The Growth of the Developer Ecosystem in Kiro 1 00:14:56 - Carm and Rust 00:16:23 - Implementing Blobs and Chart Analysis

Transcript

[Music] I'd like to welcome Victor from starkware thank you very much okay uh and my house keys they go over here um okay so today I'm going to talk about biding on Stark net um for those who don't know actually who knows what starnet is raise your hand okay um are there any solidity developers in the room any rust developers yeah all right um then today I'm going to talk about building on Stark net that's the agenda it's what the heck is Stark net and how does it work um I'm going to introduce you to Smart contracts on Stark net because they're a tad different to the other al2 and then how to make money by contributing uh so what the heck is Star net uh essentially we have a big problem if we disregard blockchains completely if things are centralized and you have this really big server um let's say Google is a really big server things are centralized at Google you uh push events at uh Google and it basically all goes through this one big server and this is not really cool because if this server goes down then these people are not really happy and so um the solution is this blockchain idea where these multiple people all run this big server but um in a smaller format and they can all run it like um on their computer however uh what we see with a lot of um the problem with ethereum is that uh the block space to run a node is quite limited and so what you see with these alternative or evm Killers is that uh to make it more performant to make it uh faster as a blockchain what they do is that they increase the block size of um their Network and so if you start increasing the blog space then people who are you know people just like you and me we can't really um if we have a standard computer we can't really run a node anymore because it's too computationally demanding and so um ethereum stays with this bounded or limited blog space and which is also why it's quite slow still and and not that performant and so the solution is to to build on top of ethereum it's to do like an L2 um and what an L2 essentially does is that multiple people send requests to um the server on this L2 and then this information is processed or is delivered to ethereum the whole goal of an L2 is um is to tell people hey this amount of work is not going to be done on ethereum it's going to be done elsewhere and what I need to do to uh tell ethereum that this amount of work actually happened on this other uh space I'm going to create a proof of Integrity I'm going to prove that what happened elsewhere is correct and then ethereum doesn't have to do the all work um and so essentially what we send to ethereum is sort of like a balance sheet it's kind of a summary of all the transactions that happened um and you have multiple transactions that essentially get processed by aover a proof is sent to um a verifier um and this verifier um we actually have a verifier written in Cairo right now which is the programming language from Stark net um and this Caro verifier allows you to build app chains and which are layer threes that are built on top of layer two but I'll get into that in a bit um but essentially this is how starnet works this is how l2s actually work in general you have proof and then this proof is actually sent to a verifier on ethereum and this is why we scale ethereum is it's because ethereum only has to verify um this proof that says hey all of this stuff happened elsewhere um and if we look at um star what it can do is that one block fits around 1,800,000 nfts that's just to give you an idea of the performance so essentially we're scaling blockchains we're scaling ethereum um with Starks and this is what Stark net is um ENT entally this is kind of an overview of how the Stark proof system works but in this L2 this is where the Stark mag magic happens um it's in this proof generation and this is the proof that compresses all the stuff that happened on Stark net and proves to ethereum um what happened elsewhere is correct and I was talking about layer 3es around 2 minutes ago but essentially layer three um if we think of an L2 what it does to an L1 a l three um like how do I say this um an L2 wait it's quite complex because L2 is L3 is um and L2 L3 does what it does to wait it's so confusing um okay essentially the big tldr is that um if you have a prover and a verifier um that is on dl2 then you can create an L3 and essentially you're scaling even more how you scale from dl2 to D L1 is even more scaling than what you do from D L3 to the L2 um and then you have Cairo so who here has heard about Cairo okay nice um Cairo is the Smart contract language for starnet solidity is the Smart contract language for ethereum but also other l2s like ZK sync or scroll now why do we have a new programming language why didn't we just go with solidity the reason is is because um solidity is nice but it wasn't built or the FM wasn't built for provability for generating proofs and so we told ourselves hey what if we just go with a programming language that's specifically designed to generate proofs a programming language that is just for creating ZK programs um and essentially what we're doing with evm is that we're not reaching for evm compatibility we're trying to reinvent ethereum if we were to go with evm compatibility then we would have gone with solidity and ethereum was not built for provability so um that's why we essentially built the Kyo VM and Cairo as a language and some things that makes Stark net cool is that we have native account abstraction so you can uh build really like userfriendly applications um in like quite easily um we have high through put and transactions and uh the devs usually come for the tech but they stay for the community and we have a couple of stares over here um so now smart contracts um Cairo what it does uh essentially so it's this program that is rust like um who are the rust programmers in the room again okay nice um Kyo is actually kind of forces you to write safe code and to it forces you to kind of innovate your program uh just the way it's structured and the way way it's written out um and what is Sierra kasm is what Kyu compiles to and Sierra is like this intermediate layer that makes sure that all the program that you're writing is actually provable and so um we have this I'm going to go over some Concepts uh about Cyro smart contracts um you usually have a contract class and a contract instance a contract class is the code itself it's um essentially uh it creates um a class hash and a class hash is like you could see it as a definition of your smart contract and every time you change something in your smart contract this class hash changes um and then we have a contract instance and that's um when you deploy you first have to uh declare your your class hash and then you deploy a contract and then you have an instance and what this instance basically does is that hey it tells you the storage on this smart contract change um and if the storage changes then essentially then the contract address also has to change um and overall this is a little diagram that just summarizes what I just said but the stet state is composed of um uh contract classes and within the contract classes then you have these instances and how do you change the state of Stark net you essentially have uh two functionalities it's to um read your smart contract and then you can also write and when you write something that usually entails uh paying gas fees because you're changing the state of your smart contract um yeah so we have declare invoke and deploy accounts and uh those all uh they all cost gas fees all right and some quick anatomy of a Kyo smart contract for the rust devs in the room maybe you'll recognize a couple of things um but essentially uh in a Kyo smart contract the way it works is that you neatly Define all the components uh within your smart contract um you neatly Define your storage what goes into the storage and the variable type that goes into your storage um so this is for instance this is the the storage attribute um you always have to create a module and then give a name to your smart contract um and then you define the storage and let say that my value is a felt 252 and then you also have a Constructor comp attribute and what this does is it tells the compiler hey this is the first values that are going to uh be the ones once I kind of declare this smart contract um then we also have events and we the way we expose functions is that you uh you always Define an interface in your smart contract and an interface is kind of like a blueprint print of the functions and then within the contract module you specify what you're going to do with those functions that you define in the blueprint so um in Rust there's this it's a you define a trait and then you do an implementation of this trait so it's very very um similar to rust um and this is the inter interface that I just talked about um and this is how you you expose functions essentially it's the trade and impol combination just like in Rust any people familiar with Solana in the room or have ever done something on Solana traded did anyone build on Solana okay because Solana also has their uh smart contracts written in Rust but it's um in general we see some similarities um and then if you want to call certain functions from another contract somewhere else you essentially use something that's called a dispatcher a dispatcher is always generated when you create your interface um let's say they have two smart contracts I have one storage smart contract and one contract that increments a number the contract um that increments the number will always do a call from the dispatcher from the storage contract so it's going to um you have to use this dispatcher keyword and just basically say hey I'm about to use your function in order to change things inside this smart contract and now maybe something that's uh life-changing for some of you at least for some people in front of the in the front row it's how to make money by contributing on starnet and there's this really neat website called only dust oops only dust is essentially uh it's a platform where um you have projects that are listed and then these projects they tell you which issues should be solved and then um as you solve each issue you basically start earning money and so I want to quickly run you through a couple of projects um and then also show you um yeah how you can get started on it so if I go to the app um for instance um if I'm within the Stant ecosystem there's this open source uh sequencer called Madara um if I click on Madara you actually see um all the people who contributed if you click over here and then if you go over to the GitHub repo and you solve an issue then you start uh making money and we have some people who used uh only dust in the room especially in the front row so if you have any questions on how to get start on only dust just ask them some questions um and yeah you can make quite some money um um going back to your presentation where is it oh it's in the same browser and yeah uh just an overview of the developer ecosystem uh star is right over here um there's quite some growth in the last year um especially with um the change from rear CYO zero to KIRO one and KIRO one is this uh rust like syntax type of Kyo KIRO 0o used to be this Legacy language that was very hard to build programs with it was quite a difficult syntax but ever since the update to Kyro 1 which is essentially this rust like rust like syntax language um we've seen a growth in developers um a growth in terms of toolings as well and libraries so in general it's in the green and yeah um if you want to get on board on starnet just come over and talk to me I'll introduce you to a couple of group chats to people to educational content um this is me on Twitter this is me on Telegram and yeah thank [Applause] you hi thank you for the presentation and I just have a couple questions here so uh what's the underlying uh VM for Cairo that uh I mean underlying VM that Cairo uh is executed by once compiled I guess and then I remember you were announcing that like uh uh the original uh sequencer was supposed to be Rewritten in Rust if that happened and if there further plans to you know leverage any decentralized shared sequencer kind of a technology and also did you make use of blobs so first question uh we use the Carm we don't use the evm um we cannot use the evm because we have our own yeah I meant the VM yeah sorry yeah so we we were using the Caro VM um what was your second question um the next question was about the sequencer oh the sequencer uh it's Rewritten in Rust there was an update last summer and there was an a boost in TPS and any plans for leveraging uh shared sequencer later for decentralized uh in order to decentralize yes it's on the it's we're thinking about it yeah okay and have you made use have you made use of uh blobs and if there's a I'm not sure is the da layer used on ethereum used as a DA yes so it's just like any other rollup uh we use etherum to settle um we used blobs I think we I don't know if ZK sync or we were the first ones to implement we were the first ones okay then we were the first ones to implement blobs um yeah there's a chart with all the l2s and there's a little line that goes Super down with all the fees and we're one of those lines awesome thank you any final questions all right one last round of applause thank you very much thank you [Music]

Automatic transcript — names and jargon may be misspelled.