Hybrid Compute Realizing the Full Potential of Web3 Alan Chiu
Ethereum Denver·Sun, Oct 9, 2022, 12:00 AM
Transcript
so i'm alan true founder of boba network boba is a new ethereum layer too it's an optimistic rollup but it's much more than that because we started boba with the mission of making the benefits of crypto and web 3 available to everybody on the planet and today i'm going to be talking about hybrid compute which is an important step towards realizing that vision realizing the full potential of web 3. now for the fundamental premise of ethereum from day one is the belief that while a distributed decentralized ledger is good a computer is better and our hypothesis is if you could get this this decentralized computer to be more connected then we end up creating more creative and more powerful decentralized systems and we're giving these powers to developers to build more amazing dapps for more users looking back a little bit in history there was bitcoin right and then ethereum and ethereum came with a touring complete programming language all good but the problem though is what you can do on an ethereum smart contract is quite limited if you compare the compute performance of ethereum layer one itself to a computer from decades ago and even since ethereum launched it hasn't really changed much and that's okay that wasn't really ethereum's goal its goal wasn't to optimize for raw compute performance but then how do we take advantage of the latest advances in computer science like deep learning and advanced cryptography and a lot of interesting things that require a lot more compute power the fundamental issues we're trying to do all that on the theorem itself is that getting many computers to agree on anything is really hard because not all of them are going to be connected at the same time there's network latency the list of issues goes on and on and so in order to achieve ethereum's goal it has to dramatically simplify and constrain what a developer can do in a smart contract and therefore you can only do integer only operations and and you know you can't do really random number generation uh directly that's that's those are the necessary sacrifices to make ethereum work now there have been a number of possible approaches to break away from these constraints we've listed a number of them here truebit is truly very ambitious in trying to do probabilistic verification game protocol they've been working at this for four or five years now chain link you know they have their way of introducing real world data into smart contracts used by a lot of developers and different attempts at verifiable computation won't go into details here but we included a link in the in the desk so you can read it up afterwards but we came up with a new approach now the rise of layer twos has only just begun and the initial design goals for layer twos on ethereum were to reduce cost and scale performance because ethereum is maxed out well as it turns out there's actually an additional major benefit to l2 which is to help us scale compute as well now all the layer twos today are single sequencer layer twos there's only one instance of a block producer that is a limitation but at the same time it opens up the possibility of allowing smart contracts to interact with outside computers because now we don't need to deal with the challenges of needing to have a lot of computers a lot of different nodes to agree to the same compute results because there's only one instance of a layer two sequencer and now in the future we can it will evolve hybrid compute to support the scenarios of multiple sequencers as long as only one of them is responsible for producing blocks at any one time so what we have built and is available today on our ranking b test net is a modified version of layer 2 gath we call it l2 t-gas t for touring which is our codename for hybrid compute and we're releasing it on our test net with atomic support for random number generator and to and client call functions let's dig deeper into this so l2t geth is a flavor of gas go ethereum for layer twos to enable hybrid computes what this allows you to do as a developer is you can write in your smart contract right call get random and get a random number back in one call in one atomic transaction you couldn't do this before this is totally new you can also even get a quote from a token pair you can do a lot with it you can pipe in real world data through hybrid compute through an aws lambda endpoint for example that is invoked by your smart contract think about the power of that what you run on the rpc endpoint that you control off-chain on aws could be anything you want right it could be as simple as generating a random number will keep it complex as a machine learning trained model let me give you a system overview of how this works you might be wondering alright this all sounds good how does this really work so the way it works is our version of layer 2 geth would intercept certain calls and then we'll call the off chain api which then replaces the original call data with the call with modify call data that includes results that come back from the off chain algorithm and then this gap will write both the original transaction and the modified call data that includes the results coming back from the off-chain process into ethereum layer one so you can do verification you can replay that transaction you can do fraud detection and replication all the same functions that you expect to be able to perform on any l2 transaction and once the l2 block is written verifiers and replicas will use the stored api response data from the block is immutable and graphically this is how the sequence flows an rpc call comes into the gap guest checks is it touring if it is invokes a user designated endpoint so it's not going to call anything random receives a response i won't go through the details of step four um but it's updating the call data with the results that come back and the modified call data is committed to layer one now there are a number of changes that we have made to to geth to make this work net net though the result is the transactions that come back are stored on layer one so you can always replay them and from the caller's perspective of this smart contract that is enhanced by hybrid compute they actually won't notice that anything has happened off-chain it's completely evm compatible and the system is now live today on rinkeby.boba.network you can take it out for a spin see what you can build with it start by simply getting a random number and seeing that appear in one transaction and try to create an nft series with it or get a price quote and it's going to go mainnet soon after eve denver we're still working on some finishing touches including adding a caching system we've also built a number of example uses on for for hybrid compute that we're going to be releasing on our mainnet so these are all just for fun with some utility but the idea is to give all of the developers out there a taste of what you can do with hybrid compute that you couldn't do before with just smart contracts for example we have created a twitter activity-based boba fountain for gateway who has used the wrinklebee faucet to get some wrinkley eath right we've all done that well this is a similar system it's built on hybrid compute that will give you bulba in a similar way and this shows you how smart contracts could actually interact with a web 2 social network we've also built a use case to demonstrate how do you how you could use captcha for spam prevention for smart contracts or random number generator for nfts and it might not sound that big of a deal to be able to get a random number but you'll be surprised how hard that is to do on chain and to be able to get it within one transaction not have to wait for an unknown number of transactions and keep going back to check hey is my random number there this is going to save a lot of headaches for developers and you can also sign up for commercial data sources with bloomberg or any number of data providers that you want to use they don't even have to be quotes on tokens or stock prices could be any sort of data feed they can subscribe to and make that available through an rpc endpoint that you control and pipe that into your smart contract think about the power of that right and and if you were a web 2 developer that's getting to web3 you have data sources that could be coming in from your partners it could be coming in from your own company you can now take advantage of those data sources within a smart contract bridging the worlds of web 2 and web 3. so our hypothesis here is that if you combine the power of a decentralized infrastructure like ethereum and a lot of network computers around the world that's a really powerful combination you can you can get the best of both worlds together and you as a developer you get to decide what you build within a smart contract and what you build and run and actually get off train now there's no free lunch and i do want to point out a number of caveats at least with the current implementation of touring so first of all there are security tradeoffs in our current implementation of a random number generator we as the operator of the single sequencer there are ways in which we can manipulate the random number generator so you need to trust us for now for not screwing around with that but we are building a the next version of that random number generator that is much more secure and you don't need to really trust the sequencer there's currently not a way to verify off-chain inputs just yet and also want to note that we haven't tackled the problem for privacy preserving compute meaning the offshoring endpoints that you call they're going to see your clear text inputs that you send over right so this is different from secure multi-party computation or fully homomorphic encryption that has not been implemented yet as i mentioned before this is now available today on rinkeby we have a detailed write-up is a technical write-up for developers at this bitly link bitly get touring it is very easy to use at the smart contract level really just to start taking advantage of these two features that we built on top of hybrid compute just go touring.
get random or touring dot get current quote super easy to sum it up the fundamental premise of ethereum right is to create a decentralized compute platform and with boba running on top of ethereum we're taking ethereum to the next level and what sets us apart from other scaling solutions is that we're not just making ethereum faster and cheaper we're making it smarter by letting you the developers to run much more sophisticated algorithms on a scalable web scale platform you can run anything that is as sophisticated something as sophistic as you want as your heart desires and have the results come back into your smart contract which itself remains composable with other protocols that continue to live on chain that's the new power you are getting with touring so we're super charging ethereum with scalable compute power what do you want to build today thank you awesome we have time for we have five minutes for questions if anyone has
Automatic transcript — names and jargon may be misspelled.