TEE-Based Rollup: The Sweet Spot Between Optimistic and ZK Rollups | Jobin | ETHTaipei 2023
ETHTaipei·Mon, Oct 9, 2023, 12:00 AM
Transcript
solution for ethereum that brings privacy and scale it ensures the input contrast States and the execution are always encrypted today he will present T based rule up The Sweet Spot between optimistic and zku up so let's welcome him [Applause] so good evening my name is joban I'm a developer relations engineer at obscuro to talk about tee-based Roll-Ups just a second I want to capture you all so I missed starting to record this yes yeah so uh I know that's all of you are here because you know what ethereum is is anybody here who doesn't know what I hope that everybody knows that what ethereum is okay so ethereum is a layer one L1 okay and a lot of l2s have been coming up which is there to solve multiple problems ethereum has got a bunch of problems um which uh at East trying to solve uh and I hope in the long run it will achieve some of them but at this current moment a lot of Roll-Ups a lot of L2 layer to Solutions are trying to provide solution to these problems okay so I'm gonna I'm going to be talk I'm going to talk about te based rule-ups or confidential Roll-Ups which sits between a sweet spot between optimistic rollups and ziki rollups I hope that everybody is aware of optimistic rollups and ZK Roll-Ups Okay so uh just yes so what is t e e based solips so t-e-e stands for trusted execution environment okay so uh I I believe most of you guys have iPhone in your hands okay you guys are using iPhone and iPhone has got a T1 ship why is it's to execute some critical some very highly confidential information on your iPhone without that data data getting leaked okay so it is an isolated environment it's a safe environment it's like a box which is logged and nobody has access and inside that box all your critical highly confidential information is been executed and in the same manner Tes or trusted execution environments are small isolated boxes or environments in your computer chipset which allows you to do execution or do computational activity on your data highly confidential data without that getting leaked your MacBooks have your Windows laptops have your computers have every every AMD has got Sev Intel has got sgx then there is a uh then there is arm has got press Zone then uh Apple has got T1 chips which allowed to do this execution very safely in isolated environment okay then what why why are we talking why are having this session we are doing why are we doing this session on scalability privacy affordability on ethereum why because ethereum has got all these problems I'll take you through a bunch of problems that ethereum has first is scalability from day one itself ethereum one developers started using ethereum started building dabs deploying smart contracts when when the number of the number of dabs in smart contract sued High we started facing the problem of scalability now there is limited bandwidth on what you can know on ethereum okay this results in what network congestion ethereum is has very high Network congestion because of the scalability problem next vote this is one of the very high critical that's why I have put in the center part of the slide uh ethereum has got this privacy issue it's a major issue that whenever you store anything on ethereum your nfts your ens details whatever data you store on ethereum or blockchain is public basically so we say that we have privacy and transparency at the same time but isn't that an oxymoron totally opposite things transparency and privacy both are opposite things so ethereum bytes virtue is a transparent blockchain so what will you do on ethereum is public your name or your Contra or contract details everything literally whatever you input your contract State your execution everything is literally transparent anybody can see so where is privacy I I don't see privacy I can't see privacy and if we go out and start checking out how many of you have uh checked out ether scan after doing a transaction most of you might have tried and you might have observed right what if you have a transaction hash of somebody else's transaction you can basically see what input they have given that's a flower consider I am buying a health insurance and I'm putting my diseases my blood type my uh my address my all details my personal details on only which maybe I know onto a health insurance smart contract and somebody randomly can come and open the smart contract the contract address and see my personal details isn't that a threat isn't that a problem somebody else knowing what is your personal data that's threat that's because ethereum lacks privacy and this is one of the biggest disadvantages and that is why we have not seen ethereum being used in a large scale in institutional applications and softwares ethereum is used in a lot of Community Based projects and apps have you seen ethereum being used widely in a institutional based softwares and applications very rare there are a bunch of them but very rare where there is no need for privacy that's where it has been used you can't use uh so next to what because of this problem because of the scale scalability issue and because of this network congestion the cost of doing anything on ethereum is literally super super high it's it's more I I I came to Taiwan yesterday and um literally with the cost of doing a transaction ethereum I can travel in the MRT multiple times how costly is that you're barely storing information on ethereum and it costs you multiple the total amount of traveling multiple times on MRT it's very high and during the D5 boom when D5 was booming when a lot of people were doing a lot of financial transactions on ethereum the price of a single transaction on ethereum went up till 60 to 70 dollars that's super I I would basically buy a bunch of Nintendo switch games from time and back to home with this money rather than doing ethereum transaction so that's where the statement that ethereum is a public blockchain for the masses goes down it's not for masses it's only for the rich people techie people and they I'm being a bit brutal but sorry but that's actually a problem it's because everybody is using and we are in an early stage of um blockchain okay but we have a solution for that we have a bunch of solution which are trying to solve all these problems but I am going to talk about mainly focusing on this problem the Privacy problem but at the same time we are ensuring that the scalability and cost problem also is solved but the focus is on privacy okay uh just a second and if if you if anybody of you don't think that privacy is a critical problem then I'll take you back to a incident that happened a bunch of years back uh from the the Walmart uh from the Walmart website a girl a teenage girl was ordering a bunch of uh things uh because she was approaching a pregnancy and that same account was being used by her Grandpa and because she was ordering all these products her family didn't knew she was pregnant but Walmart sent recommendations to her Grandpa and her Grandpa got to know that she was pregnant why because it was lack of privacy your data is no more your data companies are stealing your data they're misusing it they are using it to Target advertisements to each one of you so you're getting advertisements based on what you search what you see what you hear literally every every data that you create on internet on mobile phone or your smart devices is being used against you as a weapon to pursue you to buy different products and services that's that's a big risk to your privacy so the next thing so what the current I'll take you to uh I'm not sure I believe that there are a lot of geeky nerdy guys sitting here but I want to even include a bunch of guys who are not that giggy not technical uh and show them what ethereum looks like so ethereum right I'll take an example of a building this is a one-story building and this is the ground floor okay and this is how the ethereum looks like there's a door and the walls are transparent this is ethereum this is a one-story building so what the problem is so whatever is happening inside your house or a building anybody can see that is that a good thing you're doing some personal thing in your house or in a building and the the passing by guys being able to see what you are doing inside your house that's a risk that's the breach of privacy so you can basically see whatever your contract state in ethereum is because ethereum is transparent next thing the door is open so whatever is going inside your ethereum block your your inputs that basically is transparent that's public so whatever is going inside when that is public so basically who is coming to your ethereum house anybody can notice anybody knows okay the next so whatever execution you are doing whatever activity you are doing and that's public that's transparent this is the problem with ethereum then what happens when you start doing this inputs start giving more and more inputs you start doing more and more transactions then there is a stop sign that shows there is a network congestion okay so when more and more inputs are given more and more transactions happen because of the limited bandwidth on ethereum there is a network congestion that is not good right like it's like you're you want to travel to um some station some some place in uh Taiwan and the MRT has a long queue it's a bad experience right there's the same experience with ethereum okay so what do you do you might have observed in certain places you can cut the queue and go forward if you pay more money that is why I said ethereum is not for the masses but for the rich people because if you are ready to pay more money then you can cut the queue and go forward and get your transaction executed that is a problem you have a separate queue like like you can escalate or prioritize your uh whatever your the transaction is by paying more money okay then here that's where the money thing comes and the cost goes up okay so this is a problem this is a very high critical problem transparency scalability cost I've shown you all three next so what we are doing so we have a bunch of current solution at this moment there are two approaches to solving this solving the scalability um cost and somewhat privacy the first approach of solving that is we are we we try to improve the layer one itself by building better node infrastructure but that's gonna cost you more okay the cost of infrastructure when you set up more infrastructure on your L1 the cost goes High again the same thing for the rich people we don't that that to happen then the second approach is moving all your heavy computationally heavy transactions away from the layer one onto a layer two and that's where we have two options ZK rollups and optimistic rollups these are the two approaches that allow you to take transaction away from the layer one and easily do transactions on ethereum and somewhat solve scalability privacy and cost issue but not in a very good manner okay and zero knowledge allows you to do any enables you to do lightweight verification remember light weight verification if there is anybody who thinks that zero knowledge allows you to do heavy weight verification that's not true really allows you to do lightweight because zero knowledge uses cryptography and cryptographic activity on computer computer is super expensive okay and then there is optimistic Roll-Ups L2 transactions but the problem is that sometimes a bunch of things are centralized in optimistic rollups okay then coming to the next uh slide so what solution we have for this okay and that's where what I did is I built a second floor on my house I expanded my building I extended my building so we right now have two floors it's exactly like your house your your house has only you and your wife or you and your husband that's okay when you have two more children what do you do you build a floor on top of it so that you can scale as your needs increase as as your demand increase you expand that's why you've built a second floor a second story and this basically is a player one this basically is a layer two now you can see this is transparent whatever enters here people can see so we have solved that how now it's not transparent is opaque the doors are tunneled so basically what happens is in the layer 2 that we have built we get scalability whatever the inputs go inside that is completely hidden obscured so nobody can see inputs and whatever execution and the contract state is inside the layer two nobody can see that also so basically all three problems are solved scalability problem is solved nobody can see your inputs execution contract sheet so the Privacy problem is solved and because there is no no transparency you can avoid escalating your transactions or prioriting your transactions by paying more money and now you might be thinking how is this possible what Abracadabra have you done what magical spell we have done what magic is this so I'll show you what magic is this I'm unboxing it so this is the magic this is the magic we have unboxes what we have inside a is called as tea trusted execution environment so interested execution environment you can pass input you can do execution and whatever the state is everything stays within this nothing gets out so you have a safe secure isolated execution environment now it's like your secret bedroom now what you do whatever you wish you do inside your bedroom nobody will get to know about this okay so we have built a this is our living room our kitchen everything is here and our bedroom is here so nobody knows whatever you do in the bedroom okay then so we are using trusted execution environment for this and what this allows what this means to you this means that now we can scale with privacy affordably and effortlessly why effortlessly there are a bunch of solutions that allow you to do T based Roll-Ups but the problem is that it's not based on ethereum so if something is not based on ethereum then what you have to do you have to go learn a new language get to know that SDK Works go through the documentation why we have such a very well established ethereum layer one blockchain just use that and easily migrate or Port whatever smart contracts you have to this te based rule up the layer two okay then why it is so people lot of people now now this High Pass grown a lot about zkps zero knowledge proofs but if you dive deep and study more about zkbs that's when you will understand Z KPS are not actually meant for privacy zkbs are actually meant for scalability okay so because because in Z cube is one of the entity gets to know the the information okay you don't actually Reveal Your Secrets but one of the entity gets to know the information that's not the person okay so Z keepers are meant for scalability but and and the Z cube is how many of you have seen uh you might have observed gkps are always Whenever there comes a combination ZK piece for privacy that's mostly for what transactional privacy right Z Capers are mostly used on the D5 side they're telling you can provide transactional privacy with zkps but we are not here for just transactional privacy it's like exactly like Bitcoin we were not just here for transparent open privacy focused Financial system but we are here for what we are here for a generalized programmable transparent open privacy Focus blocks and that's why Tes allow you generalized programmable privacy so basically you can program anything on t e e with complete privacy not just transaction so like I said health insurance your personal data your social media all that can't be made private with zkps but that can be made private with Tes okay next now you will ask me I'll get usually I get this bunch of questions so I got this prepared on what zkb versus t e e means so when you are building something on t e you can build anything on tee without extra developer effort so it's very developer friendly but in ZK piece you might have if you have read about ziki base you might have observed that zkbs require you to make unique ZK circuits for specific use cases you want to build this A B C D whatever the specific use cases then you'll have to create your own unique ZK circuit that means that's an extra effort for developer but with t e is no basically just write a smart contract that you are writing on ethereum using solidity and that's it done the next T is provide you a secure isolated execution environment without any cost because I told you your smartphone your laptop your MacBook everything is a tee so basically you can easily do isolated execution of your smart contracts without extra money but when it comes to ZK piece it's very cost heavy if you want to do cryptographic computation using zkbs it's very complex and it requires heavy computation which is very expensive then what uh teas can take heavy High load computational work but zkps can't and zkps are also not flexible in terms of complex inputs if you give complex data inputs zkps can't take that and finally in the T there comes the questions there are a bunch of T's uh which have some vulnerability and exploits but basically that are being patched day by day and that basically doesn't affect the T the smart contract execution and this comes this is very important Point okay this is very important point where that small pinch of centralization comes to zkp okay ckp have a small angle of centralization because z k p circuits rely on semi-trusted sequencer parties for verification okay these are a bunch of things which is T versus ckb so rather than riding on the zkb hype wave just go and dive deep and try to understand what actually is zkp made for Zeke I'm not criticizing zkb zkp is good gkb is better for scalability rather than privacy but t e is good for privacy that is why I've made up a comparison for this nyte so we have made up a solution but rather than rather than relying on tees for integrity we are relying on t e is privacy so that vulnerability exploit thing for T that doesn't affect you because we are not relying on that for integrity but we are relying on that for privacy okay isolated execution environment that is where this privacy comes okay and next how we are achieving this uh using Tes this this line basically is this this placeholder you guys can do this yes so how is this possible so we are we have got a bunch of T's like Intel sgx like I said so we are actually working on a solution using Intel sdx that has basically a secure Enclave that allow user allows you to do all this secure secure uh computation okay and it's highly compatible with evm so basically you can run your smart contracts in that without much effort okay easily you can do that and it also includes the roll-up functionality so whatever transaction you do that basically gets rolled up and how this is done okay yes if you want to figure out actually what this magic is okay and if you are still confused how this works then T based rollups work in this manner so I'll just I'll just I guess you guys can't see that I'll just just a second It's Not Invisible that's the only resolution okay that's okay that's okay so uh on the left corner you have the code repository on the right side on the top you have Auditors then the governance process then the basically the the network the T based Network and then the code validation happens here and there is something called as attestation so what what yes so what you have to basically do is if you want to use a tee then basically you have to attest it only if you attest it then that works okay so any any random uh T's can't come and use can't be a part of this network yes I'm just this quickly why I'll quickly just wind up okay this is the high level design I'll I can share this with you if you want so yeah so uh one of this I'm a part of this project so we are actually building this solution called as obscuro so we are making privacy accessible to everybody on ethereum while scalability and privacy cost and all this is insured okay so without losing uh your scalability chances or giving more money or user friendliness you can get privacy and confidentiality of all your data and if you wish to know more about us then you can just just scan this QR code and read our white paper or light paper and get to know more about this project and you can start building so we are right now on a non-persistent test net but we'll be out on our test net very soon so now we can build privacy Focus dab smart contracts without much thing so thank you thank you for uh being attentive and giving me this opportunity thanks type A Team also [Applause] thank you jupin um is there anyone have questioned okay I got a question so um I think tee is fantastic but I was wondering how is the processation rate for the tea how is the processing rate how yeah how processing rate right processing rates rate uh how many transactions could you be processed per second uh so it's it basically depends upon our network but right now what we are building in our solution we are aiming 40 000 transactions per second because it's based on hardware and it doesn't rely on a lot of cryptographic complex computation it's much faster yeah it's a hardware solution but I still needs a storage so you need to go back and write and read back and forth so yeah so I'm not sure how is the bottleneck is so far so I've shared the high level design so you can see how it's made so fast and optimized that you can go right on the execution environment do the execution and get back and give the output and that's why we are able to achieve that 40 000 transactions per second that's that's a number we're ambitious about we are working on that that's not the current number we have live but we are working towards that but that's the ambition and we have some theoretical reasons for that okay thank you thank you for your talk yes thank you I believe I think that this is a very new topic for all of you so you can just go and scan and get to know more and if you want to reach out to me you can reach out to me on Twitter on Xerox jba that's it thank you
Automatic transcript — names and jargon may be misspelled.