Boba Network 🛠Realizing the Full Potential of Web3 - Alan Chiu
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Alan Chiu of Boba Network for a workshop titled "Realizing the Full Potential of Web3." Hybrid Compute helps developers interact with the outside world from within solidity smart contracts. All data returned from external APIs, such as random numbers and real-time financial data, are deposited into a public data-storage contract on Ethereum Mainnet. This extra data allows replicas, verifiers, and fraud detectors to reproduce and validate the Boba L2 blockchain, block by block. Join us October 7th-9th, and kick off Devcon Week with thousands of developers and creatives just like you. We're picking up where ETHMexico left off, bringing in dozens of top teams and speakers to help you take your ideas to the next level. Get hype to win $300k+ in prizes, build next-gen primitives, and catch talks from luminaries like Vitalik Buterin. --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com #ethereum #web3 #blockchain #eth
Transcript
foreign [Music] [Applause] good morning thanks for coming to this Workshop about realizing the full potential of what three eight it's really about how why do people build a network and what touring how to compute which is only available on mobile will help developers build more engaging more interesting work compelling work create applications so let's that's go back in time a little bit right to the original creation of ethereum and a fundamental premise of ethereum is that while Bitcoin which is a ledger is good if you can actually program it it's even better on computers right because and our hypothesis is that let's take it one step further a more connected computer will lead to a more creative and Powerful decentralized system just to give you an analogy right um we all have a thumb and imagine create mobile apps without the cloud right you're limited to what you can do on the device itself and that's it is you can still build apps that run on the phone but it's not nearly as interesting right and that's what we do here so you know we started with Bitcoin Bitcoin script minimal stack-based programming language is really designed it's very transactional oriented it's not very complete and then ethereum came along break through Innovation right however is love as we all know and there's a good reason for that um here it wasn't designed to maximize to optimize for raw computer performance it's designed to be a decentralized system right with with thousands of uncoordinated and also if it somehow accounts you can come to agreement on something and and that's really hard and in order to achieve that there has to be a lot of limitations imposed on the kinds of computations that you can do that we can do and for example we can only do integer operations reason is if you allow full endpoint operations what if two computers are running on like different to use and they come back arrive at slightly different answers they won't be they won't be able to come to consensus and and so so that's why ethereum is is slow and and the computational complexity is very limited right we can only do very basic computations you can't even take the square root of a number and get a reasonably precise answer but then l2's leotus came along and while the original motivation for creating layer twos is to address the most obvious challenges of ethereum which is speed and throughput and and cost right there's actually an additional major advantages and that's enabling more complex Communications and that might seem a little bit complicated intuitive people don't think of later twos as the little index and benefit right those two things a little faster cheaper all this awesome let's just do a transaction to their teams well the key difference what is a leadership a relation really is is we're decomposing this monolithic layer to ethereum that combines execution settlement and data availability all into one layer we're taking the execution layer separating that into into its own layer and we'll call it W2 and the key difference between layer 2 and layer 1 is that the layer 2 doesn't run its own consensus quality right the whole point is that we rely on layer one for consensus so we need to do all the separating these two now certainly because of that we don't need to worry about what it takes to ensure thousands or tens thousands of computers will arrive at the same answer because leaders are only responsible for execution and what does that mean right it means we don't need to impose the same kinds of constraints on the kinds of computations you can do as you would need to under layer one and that changes everything so on layer twos there's only a single sequencer that produces a block this it executes the transactions and therefore we thought well maybe we could use use this to tell advantage to development's Advantage to interact with the outside world to call external apis and after a Year's worth of work we're able to open email some instructions by modifying gas so we can we we have a customized version of get running on mobile network it's called LGT entering LTT Geth with atomic support for generating random numbers and making any external API quality that you start supplies that you trust and it's super simple to use very easy these are one line calls what you see on the screen is a pseudocode but like look at the first example Turing get random that's all you need to do to get a random number on the second second example you're going to specify the the RBC endpoint that you're going to call to let's say you get the current volt for BTC USD pair boom like one call when you're done yeah how does it work right so let's look behind the scenes a little bit so our LTT Gap is the one that that actually makes the external API call on behalf of your smart contract right so it will intercept certain calls that have touring costs embedded in them and they call the option API or rant to generate a random number and when the results come back our guests would replace the original car data with modified car data that includes the responses that come back from the blockchain home and this is important because we need to ensure that these transactions can be verified afterwards by the front Cruisers we need to make sure that whatever we've done is fully compatible with the rest of the of the optimistic role of architecture and so we'll rightful to the original transaction and the modified car data that includes the option API responses into ethereum layer 1. and from that point on everything is treated just as if they were a normal guest transaction and the key is only the sequencer would call the API so no one else because if you let other independent nodes can't say anything you might not get the same results back right so it's important that only the sequencer makes the calls and then once the layer 2 block is written back on layer one and verifiers and the replicas will use the the stored responses from the API call from the blog to do their job so here's a diagram that outlines how how that works the word so so step one LTT Gap will understand the office would uh but you will bring an obviously call to the gas and and I guess you'll be like okay this is a touring car it is it calls the the airport that you have specified ways for the response to come back uh if the responses will come back so in timeout I would set the timeout currently at 1200 milliseconds right so in so when you're when you're writing around this you want to have a graceful fallback default value in case they make sure your API doesn't come back because it's too long all right so the response Comes Back Our Guest would replace the original call data with uh updated input that includes the response that comes back from the launching column block and and and submits that to um to layer one and then new block has indexed uh replicated this word to verify this work everything else just works it's taking us a while to to roll this up on on mainnet because there's a lot of work they need to do to have an underhood um these are some of the changes that we we need to make and uh so we we modify EDM goal um and and modify the ethereum with a lot of performance to include the responses from the of chain apis and all of the data from blockchain API is not written back to zero zero one so as a result we put a limit on the size of the response string that comes back yes otherwise these calls would become really expensive and they will also added the ability for gef to replay these compute requests based on the data that's written to this area we also modified measure internal data types and finalizing the sample and other parts of because you get a minor worker goal we also need to modify all the services that pass data right from later to layer one and desolator one how you can check later on data into the layer 2 gaps and and then we tested it and tested and tested finally roll out touring on rank2b at during East Denver and then a month later we made it live on maintenance and by now developers have started building on mobile using touring and the use of example use cases for example you can build detox protocols based on blockchain assets right such as real estate uh or some sort of bonds denominated in Fiat and traffic world you can now start flowing these Fiat world real world Assets in into into different world um there's a team on building a boba creating an nft planning protocol that uses an off-chain machine learning based evaluation model the place you know it's about to put evaluation on these nfts so that they can figure out how much to land against these collaterals right imagine doing trying to do that all on chain it's just an impossible thing to expect such a slow but now you can get a testable for us um you might also want to decide to incentivize your community members to uh to do certain things on social media for example right so we tweet or and you can use Turing to make to call Twitter to verify that to see if someone has ever been tweet or something and after their verification you can then automatically release your air Thompson Rewards right and that since it's all happening on Layer Two these transactions are much cheaper much more affordable than than um there are also an uh down memberships right that would thousands that want to connect their members identity with the blockchain real world identities now to to some of the work we needed this might seems like a little weird but if you think about how web3 is growing and looking in more and more mainstream organizations into the movement um he's not realizing there will be actually more and more demand to integrate what's happening on chain but what's happening with what already exists about chain for example there are College alumni associations out there thinking about how you can create nfts that represent memberships in our alumni Association and and identify them as verified members is a metaphors that they've created so in that case they're not really trying to create nfts that can be flipped or traded they're trying to to use entities to represent an identity that exists in the real world that needs to be verified or you don't want someone to to fake themselves you know as your as your uh you know as a hardware really so tutoring also enables that you can create entities that could be connected to the school's official alumni directly and verify the real world identity of that metaverse character uh you can also create Twitter activity based to an accountant we've created this we've created a boba fountain on a breaking B um and you can also use our Atomic random number generator and bottom line is if if we're able to to connect this decentralized computer with the rest of the world with other network computers you can now create a lot more interesting and just here in this case we're just scratching the services some of these ideas actually came from developers that started trying out tour it so we've got a detailed write-up uh at this length deadly slash yeah Turing the capital T it's really easy to use but it's just one line called and what really sets us apart at all that here is we're enabling developers to build smarter applications on ethereum we're not just scaling it in a traditional sense or making it faster and cheaper we are augmenting a theory by enabling you to build applications that can include a l algorithms that have that are much more complex than what you can execute on ethereum level itself all right so that that's a highly confused story uh it's live on mingnet I really encourage you to uh try it and and see what you can build with it a lot of developers are finding that this completely changes how they think about what they can build it really expands into design space available to you and um yeah I can't wait to see what comes out of this weekend's hackathon thank you [Applause] questions yes uh just got a quick question about Solutions I've got a quick question about I don't know if it's working but um security um so you said that there was a time limit on requests coming back and having abandoned response as well do you think it's possible that um someone might want to overload the network with requests that might take too long and that might slow down block times or transactions because of that is that something that's possible um it is possible which if I would put a time limit on it um of course we've got no controller how quickly the external API comes back and um yeah so it's a top uh solver the second timeout um fortunately I mean you get a control which apis you call and our hypothesis here is that the developers are only going to call but you don't need to call APS or trust so these are either going to be your own rpcn points if you're let's say in that energy learning model right you're running your own option evaluation model it's your own obviously endpoint you if it doesn't come back when it's too slow you have full control over how you want to fix that and in the case of calling Twitter or whatever that that is a more um much more established and trusted API so that's an issue now it is possible for a um let's say in a various developer that really intentionally wanted to to deploy a 500 and call some random impact is just never comes back that um that is possible and and um but unfortunately we control we do them for gas in this case where we're at The Trusted party that operates a single single sequencer so if that's the case when you're building that out that sounds good um what other sort of functions do you see potentially in place in the future as well it's got a random number of API do you see stuff like maybe to a knowledge proofs as well um possibly ways of having arbitrary sort of um code get run separately and then have it improved later down the line that this has been run and it's valid as well is that something you think about because you break that question again sure um so so are you thinking about other sort of like arbitrary sort of functions that maybe developers want to create as well and having those arbitrary functions run on the network um and then maybe have like a proof function something like you know zkp um where you can prove that those functions have been run correctly uh the output is correct as well is that something that is you think about with my boat as well potentially yeah definitely that's something that we're looking into okay uh quick question as you have said because of the API tutoring feature right there can only be one sequencer uh the problem that I see is if the sequencer gets attacked it goes Rogue uh goes offline right this would destroy the whole Road up correct yeah that's a more General chance with well today's weather in general right not specific to to mobile touring um so we are we're we've already begun our work on Distributing a sequencer to address this availability issue right and in terms of rogue sequencers uh all of the roles are going to have a deal with this challenge as soon as we start letting other parties run these sequences now we are not of course going to operate at World Series ourselves because there will be showing themselves in the third we have enough skin in the game to not do that so the idea would be to extend the same um to ensure that other sequencer operators who have been not seen in the game who's taking other mechanisms that if they do go broke there'll be severe punishments forget about this uh this API feature makes it harder right so if you're if you have equivalent like optimism operation for example to decentralize the sequencer is easier without the API feature right um because how would you come to consensus yeah so we won't we won't be running our own consensus political amounts of sequencers will be rotating the role of making touring costs so any one time there's only one yeah it's still been multiple instances okay another really quick question um you pointed out the example of the Twitter API right so I imagine you have a smart contract you do the actual API call inside the smart contract right you have to put the Twitter API key somewhere right and if it's in the smart contract anyone can see that how do you handle this stuff we do handle it because we have already implemented our faucets that are on rate can be that requires a user to go through captcha and implemented thanks yeah thank you or any other questions yes come you look cool very nice today enough sleep I did thank you will be managed through the hackathon so you get enough sleep you're okay you're excited for the rest of the hackathon super excited thank you that's the spirit thank you all right well thank you for coming to this Workshop please uh go to bitly get touring check out devdas really look forward to seeing you build amazing things on touring and on board thank you
Automatic transcript — names and jargon may be misspelled.