{"id":"IIMnxRU8RPY","title":"Whiteboard Series with NEAR | Ep: 38 Ethan Frey from CosmWasm","description":"CosmWasm Founder Ethan Frey (  / @cosmwasm  ) and NEAR Developer Nikolay Igotti (  / @nearprotocol  ) discuss CosmWasm,\n\nCosmWasm is a new smart contracting platform built for the cosmos ecosystem. \n\nCosmWasm Key Features:\nTight integration with Cosmos SDK and the Cosmos ecosystem.\nMature tooling for developing and testing smart contracts.\nSecure architecure design to avoid almost all attack vectors present in Ethereum.\nIBC integration planned at the same time with the Cosmos Hub - prepare for the world of multi-chain contracts\n\n\n------ About Whiteboard Series --------\n\nThe Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain.  We deep dive into their story, what they're developing and how it is helping the ecosystem. \n\nFollow the latest from NEAR Protocol on, \n\nWebsite: https://near.org/\nDiscord: https://near.chat\nTwitter:   / nearprotocol  \nGitHub: https://near.ai/github\n\n#WhiteboardSeries #Blockchain #FutureIsNEAR","channel_name":"NEAR Protocol","published_at":"2020-07-31T00:00:00.000Z","thumbnail_url":"https://img.youtube.com/vi/IIMnxRU8RPY/hqdefault.jpg","transcript_text":"uh hello my name is uh nicola gutier i work working here and on the contract runtime and would like to introduce you adam frey i don't if tell us some words about yourself and what you're doing well hi yeah my name is ian fry i'm the founder of cosmosam i am coming from cosmos if you've heard of the cosmos ibc blockchains and worked in that uh 17 18 some other projects around it and in 2019 got really excited about smart contracts so i'm looking at that so uh yeah since uh summer 2019 i started a project called cosmosim which is uh web assembly blossom smart contracts embedded in custom sdk so it's basically um all the tooling uh there's gold blockchains like cosmos basically a construction kit and then we're embedding one some contracts into that um so i actually can answer all the questions about tendermint and sdk as well because i spent time working that age ago but all i'm working now is basically run time of that the bindings to the contract and then the contract itself okay and i think uh there are multiple uh blockchains supporting uh wasm contracts so uh what what would you say is differentiating uh cosmos amount of those um our biggest differentiator is we're not blocking uh i think that so i think that's key people ask yourself blockchain maybe will someday um but we are effectively a platform or a module to integrate other blockings so what cosmos the idea is um these people rejected the theory of maximism maximism everything around ethereum and said rather than having one chain to rule them all um which was totally impossible theory in 2016 17. um let's do a network of blockchains we connect them the same way the internet scales horizontally um so that's where it comes from so what you have is you have a bunch of people building application specific blockchains so they're they're code the problem is writing a code the hard portion for the upgrade is kind of tedious uh you just now put contracts as issues and smart contracts were a cool idea so i added them into these there are currently i think six five logistics blockchains in the constant ecosystem that integrated our module into theirs which means um it runs inside of five or six blockchains currently in testnet um but yeah it's running there i think near took a different approach they looked ethereum and scaled it vertically so you guys actually broke a lot of the barriers of you know uh 20 transactions a second uh by making one chain of can actually scale up to uh you know real world speeds so we've gone horizontally a bunch of smaller chains they have decent throughput and they're connected uh horizontally over ibc into blocking communication okay and is cause one aiming to public blockchain only or you also want to want to connect uh private blockchains like uh like facebook for example libra yeah so this is a big question um right now we're looking at public blockchains because that's what i've seen um we've looked at enterprise market i think there's a huge market there actually um and in some way a business opportunity they can use cause of autumn it's open for them to use apache and if someone wants to i think we're not going that route ourselves because that's a lot of um the private blockchain market requires different expertise it's enterprise sales i can sell the startups to cancel the enterprises i do sell the devs so um we look at that and certainly we're not looking at we're very happy if someone else wants to integrate into those um uh private change they're welcome to please talk to us okay and and so if you want to integrate like a multiple uh uh blockchains uh in in austin asmr i think they they usually have their own like uh runtime for execution of the contracts including a custom set of of host functions so for example in case of in case of web assembly it's it's indeed a portable standard so it's probably okay if you if you uh can execute the contract but how how do you emulate the behavior of the particular uh blockchain you're right uh we kind of don't miss an extraction later um so the funny thing is decay is one thing i really don't like about it which they change they make backwards compatible changes like every six months um but that's a good thing too because we have to use support in different versions so we said quickly on um the same contract that runs in zero thirty seven should run you say eight there's nine forty of the customers okay um which doesn't get minor to major changes so we can't use their native uh native functions directly so we had to make an abstraction layer between that so um what we currently do is we have uh abstraction for uh sending messages to other uh other modules which could be either contract or native modules um we have an abstraction of querying cut other contracts or native modules uh and we have a storage local storage and we have an api which are basically pre-compiles so what you can do is basically offer a fixed set of functionality which you've standardized more or less which is the bank module and staking module a lot of ps change mostly so um and that and when you call into it takes your message from the from the contract converts into the native message format calls in the date of code takes a response and converts into the contract response the same contract could run three different chains uh possibly different versions of different sticky modules as long as they have an interface so we define a common api basically the changes implement um and that's also limited because you can expose extra and we added in recently about a month ago uh because they're trying to integrate into a native chain that had its own uh swap kind of swap type uh an oracle treasury type functionality don't expose it so we added a way of extending it so basically we pass messages opaquely through our runtime so if you want to extend your blockchain your runtime uh you can add handlers for different message types and you have it's a custom message type which is basically just raw raw bytes you can pass on to your block to interpret it and we allow uh custom messages and custom queries which means you basically just use a rust binding import rust library it says give you these extensions and you have the extension apis and it also has a feature flag say okay this contract only works on terra or only which in regen or notre enigma because we're using these custom bindings and then the there blockchain handles those custom bindings um so you can write a portable contract using the standard set which runs on all chains or you can make use of custom custom features for that chain but then you opt into them and your contact is only change specific at that point uh there's a bit of a i know the details on that sometimes it's a bunch of rust uh generics in there um and then yeah still vacation and stuff but yeah it actually works pretty pretty well um to pass it basically from the wasm that cares about the the format of the queries messages and it then it takes everything that bytes passes all the way through our virtual machine into a rush binding the go library into the go blockchain uh through about three different packages into the end users code is not ours and that then actually has a handler for these fights to then uh handle them and so basically you put that on both in your personal app and on the on the contract okay so it means you generally want to uh provide the servers some similar to what we have a in a standard like uh virtual machines like in java for example when you when you can run the same java application on multiple operating systems by by colonizing their uh porting porting layer into into some some least common denominator yeah exactly and you're also allowed using jni to access the custom stuff with java too so um wonderful actually ideally like i will if you know if let's say for change i'll even simplify version of the swap i'll look for the unisop standard and off that in and they could all put this unicorn center to the same you know contract could use unit swap depending not carrying out whose kind of unit swap implementation is um or whether it's a contract native so that's something i'd like to kind of go towards but right now we just standardized the basic ones which is moving tokens and staking okay yeah i guess uh the selection of of the language for writing the contracts in especially in your situation became very very interesting problem so what do you think about that so do you believe that like rust rules them all or there are there should be multiple languages or there should be some other language which is default so what's your opinion on that well i started rust as the tooling i had to learn rust anyway before that the tooling for russell was really awesome and i actually learned russ on this project i made i dabbled it before i'd written like a hobby project but never done a real project in russ until i started working on this in the hackathon actually uh coding it um luckily with another rest app um but yeah so if i was cool i'm really going to love rust i think it's an awesome language but it's not for everyone that has a learning curve so i think maybe everyone will eventually get there but i don't understand everyone go there tomorrow right and um i hear a lot of people wishing to have so um cosmos sdk ecosystem a lot of people program go and they want go uh other people talk about javascript no javascript no or they want kotlin yeah um i'm actually we were very inspired so we saw parody first their stuff while russell saw near protocol like i don't know last august or september and uh and saudi had assembly strip working and like as a first class citizen no and i was like that's awesome uh so i've tried a little about this stuff you know and it's a very nice nice set we got time i was very very impressed with all the work you guys doing and taking user experience dev experience as like the major point of utility so i'm very inspired with that so we are actually planning to add a similar script at some point at some point and go support as well there's a apparently subset of go called tinygo which compiles the llvm and makes awesome code uh we have prototyped out minimal concept it does do a job uh we'll see how much we can logically put there yeah it's uh it's definitely a plan of ours to add more languages but i think i think generally like very serious distinction between languages lies in the area of uh automated or manual memory management so so if language semantics assumes automated memory in memory management like java kotlin and javascript implementing it on a current wasm runtimes may could be very non-trivial so uh so do you believe that there is a place for languages with automated memory management in a smart contract world well i think you can there's three ways of handling it um the first ways don't care and you say we throw away the contact every time right so during one running of a contract you probably don't claim that much memory back right like it's if you're in a hundred times and you allocate an allocated allocate but in one unless you're really uh doing something weird you probably don't keep allocating 50k free 550k alexa 50k 350k and somehow managed to use 30 megabytes of ram uh by accident because you're just going to keep keep loop uh in a warm contract so if you out if you make a clean fresh instance every time you run the contract and throw it away at the end it doesn't really matter honestly um it's not wasn't wazi which actually keeps long living processes these run in a millisecond or two um they shouldn't use that much memory that's the cheap answer uh the second answer is um theoretically they're adding some sort of support for garbage collection memory manager in there you could compile your contract itself make it huge you actually could have a garbage collector in your contract right like you can do all that keep counting and you have access to all so you could kind of uh yeah you kind of do that in your contract um quite hard or we can wait for blossom to add support for the vm for that level um so i definitely prefer i definitely prefer having uh rust and say okay cleans up the end i know it's great but i think definitely people want useful languages they want to not worry about garbage collection they don't want to write ceo on russ they want to write something easy and uh yeah so i think it's our job building these runtimes and building these to figure out how to do that and whether it is just uh clearing your memory out every time you run a contract or whether it's somehow adding stubs to the garbage question that's uh that's our job yes actually your first answer is very tempting i'd say it's uh like it's in many cases indeed everybody know that gc is not probably the most straightforward technology in software engineering so if you can avoid it by just not doing that it's it's looking deep very uh very much attractive but but what's uh interesting complete like consequences of that of that action is the limitation of the nature what uh what the smart contract is so it's uh it inherently becomes like uh very computationally limited so it cannot have essentially unbounded allocation uh and de-allocation and inside of its evolution so so we essentially put certain compute limits on a computation happening inside inside of a smart contract and do you believe it's a good thing or bad thing well i think it's really good you want to limit everything there so i mean since a smart contract has to run on i don't know 20 to 100 machines in parallel and it blocks everything else but well maybe near doesn't maybe run in parallel that's awesome stuff um but right now we're basically in the sequential model process one transaction next transaction next transaction um and since you do that you have to bound it like uh we cannot have a contract running more than 5-10 milliseconds now really if you have contacts running 10 seconds doing uh doing stuff then you know the whole watching for 10 seconds which is not cool right so uh by the nature of having a sequential blockchain this linear history we basically have to have everything native or smart contracts all code must fit under certain certain limits um i think laws and outside of that context can do a lot more and actually the more i get into it the more i see the potential awesome not just in the web and not just in blockchains but everywhere so wazi for example system interface is like kind of this i see that alternative docker in a way right you can have these sandbox objects which just have a you know a very clear interface of what this calls i can use um those are actually really cool if you're building stuff like that you need to have garbage collection or you need to have um or you need to have automatic memory management like rust for c so i think that's that creates incredibly important and so i see the kind of the binding the the the the conjunction that come together in auction workers i know parody has that term i use something for them option workers uh so basically a blockchain triggers a task to run a wasm task to run it runs in parallel and returns a result after i don't know one block two blocks three blocks so you can do a long-irving task that runs in parallel to the transactions um and actually maybe something a bit more near because here it allows some sort of uh parallelization like that as well um but when you start allowing that parallelization and you no longer have to limit the code running time to 10 milliseconds and when you say okay this can run for one minute that's fine just coaching one for a minute and when it's done it'll submit the result and when all the nodes have finished writing this code you'll submit all the results back and we have them and we guarantee it's correct awesome stuff great stuff so yeah that's exactly what the direction i was heading so like if we talk about the smart contracts in the current form then then i'm like raise two hands to support non-member management and stuff like that but if we actually will think about stuff like smart services and and essentially open web as and smart services as a technology supporting that then it probably means that what we think about like a very short short time span and very primitive logic inside which is applicable to classical smart contracts may not be really appropriate so so the question is uh probably more like uh not even practical but more like strategic in a sense so how do you believe will we need in like in the foreseeable future uh smart services or smart like smart applications which run for relatively long time need relatively significant amount of resources and be able to actually perform theoretically unbound computations it's a very good question very good question i think i look for examples now and i think you know there's things like wearing reddish in the wasabi which says you work right and it's awesome um i think there's two levels and the first level is like you're trying uh support contract platform is probably easy to write uh some code and deploy it right so i think one of the big goals there is to make a barrier of entry developer work to lower that amount the bare is really really low um and we're achieving that i think quite a bit with we're achieving that quite a bit by adding other languages by adding assembly script i think go you know if kotlin is supporting it'll be awesome one day you know i think a few of us from looking at that one as well uh still in productive development um but i think that's great for me to use it but if you say if you want to write real services still you're right i think it's you're basically stuck with roster c to write real long-running services um and stuck with it's not just a bad thing but just raise lower raise the bar of entry and so one really concrete example you can think of is running for example um like clients so if you want to run these in a browser or anywhere else um that's a lot of logic it's a lot of signature validation a lot of uh math shot hashes trees trading trees subtrees it's a lot of crazy stuff and a lot of the code we have is available in rust you know so there is like seven go and some rust on our level i think indoors all rust uh paradise love rust coat as well so this is quite um quite available in the west and you could port that into some smart contracts whether it's running in your browser whether it's running in some smart service uh which is sandbox that's awesome and those pieces i think would have to still be written rust for now in the near future at least and in the future they'll add maybe better garbage collection better language support for other things but i would basically say for one-off smarter things open up to everyone to try it use wasman standard and if you need to use things that are not in the standard already i would just uh stick with the rest for that so i still want to make it a first language it's my first choice of language uh for coding and i i definitely think the majority of developers will probably not be unrest in you know 60 months a year when they see an alternative but yeah i think i definitely want to have more direct contracts so like what was your other language before us i'm just curious my last name is go which is boring actually after a while so okay okay and probably before it was something like c or c plus plus right i started with c uh and you know yeah and uh they were to java like c c but plus there's university well c is like build data structure and safe right everything you see and so like messing around with stuff or back then late 90s um then it was java and then in like the mid 2000s you know i discovered python javascript which was cool for hacking out websites because that was basically the work you're doing then uh in the like you know late not uh early tens and quickly hit the limits once you started building real services on there right like you know 2012 1314 you start like scaling up services rather than just little like websites and you're like this doesn't work anymore so from there i went to go um and yeah i played with rust i played haskell i definitely played them before uh and russell's the one that tracked me most it had like the type system of haskell which i loved uh but not this like uh reading from disc is some weird i o monad that is like non-normal operation you can't consider it like that's really normal like you can't you can't say like you know interacting outside the world is not acceptable like this is such a special case like no no so i think hats is wonderful doing math but like it definitely seemed yeah special okay reading from this should not be a special case so i love rust uh yeah it gave me like all that power i love the type actually my background was also mostly like c and c plus plus and other low-level languages and so for me uh getting used to rust was like a breeze like it's just about the c plus plus in my like in my head it's uh so in in a sense it's it's i think indeed depends on uh uh on a history on trajectory of of the person as a programmer and and so but i guess as for many people the trajectory is actually start so at least the very seriously interacts with web programming where it's typically like a gs or php for server side for them probably uh high level languages would be more natural so that's let's agree okay then so so if if you talk like like about uh promise of course so why do you believe in the fact that relatively uh limited set of primitives i think you meant you mentioned like uh send message received message and local storage and that's about it what why do you believe it's sufficient for writing non-trivial contracts so well i see well basically i think message passing i think his message passing is sufficient to build everything um and in fact we can kind of reduce our entire distribution systems i think it's necessary if you actually if you're actually renting them properly they have reduced synchronous messages passing or like basically rpc calls and have all kinds of errors because i actually believe that messages come back in balance and promises actually resolve sometimes um yeah they believe anyway but if you go to this is you know back to super system design uh async message passing is the fundamental of basically all ship systems um the actor model has also been used uh heavily in building uh large scale systems they're supposed to be loosely coupled um and it looks inspired not just in like what the ethereum do because there's a great example but you can't copy them i think they they paved a beautiful path ethereum but they also did it with a bunch of assumptions they made everything simpler they made their way they made their way as they scale up to larger more complex applications what can we do so being able to pass messages between uh contracts um intonation is way and then the active models is basically uh you have your own state you know where other state you can do everything it came to be a limit and so limit we hit briefly was going to query something so if i want to know my balance do i have to send a message uh to uh query the balance stop my transaction at some later time i store the fact i'm waiting this message another message comes back and so it's just being too hard so um triggering so we actually said okay i made an exception and we're gonna allow queries synchronously um but i think it's fine because which is kind of a break is actually quite everything on one chain before that was basically much more fluid um but i think it's basically what you have you have a bunch of of processes sending messages back and forth and you know they've built huge telecoms on that the actor model that's all it is okay uh but if you think about the blockchains there are typically at least two very important operations which i don't think naturally much to message pacing and one is essentially identity mess management where so that you need to understand under which account or like address or whatever you execute your contract and another one is the guest handling so like uh attach attachment to execution certain computational resource uh cost and those operations are not like the very unusual not like first is normal for computer science but i think second one is somewhat unusual for for the for the computer science for computation to actually attach to it it's computational complexity but generally both of them i think crucial for execution of of smart contracts so how do you how do you handle such a problems in osmo well you're right there's a lot of things so the first part i didn't mention all is actually one thing we exposed we don't suppose callbacks we expose a environment object which has uh the message cider sender uh the contract address it's um the block height the block time i don't know one more thing you think the message that you have if any funds have sent the message if your name token or sent the message as well so a little bit like what is your environment what's your context you're called in it's a read-only variable so the structure can read it um it's not even callbacks just pass it as like data uses data parts it and this is our context so we give of course a context you're running and that's very common concept everywhere i think you know languages um so give us context tell you which who's authorized what user is running this um the other gas handling i should be a patriot contract they should not worry about gas handling they run out of gas they don't have gas and it's up to the collar to worry about that and the run time to worry about that so i don't think contracts should have to worry about gas and they definitely should not have the safety depend on the fact of whether then they can predict a gas limit for dispatching a sub-call and predictably had the gas limit of the sub-call to be high enough to run correctly but not enough to avoid re-entrancing and so a large portion of ethereum contract uh security is based on the fact that you're basically well aware of the current gas and able to mute limits of sub-calls when you dispatch when you send a message to another contract or call under the contract you limit its gas so it can't hurt you which i think is a detail you should not have to worry about the contract developer so the runtime should make sure that the contact can't hurt you basically so you believe it it shall be handled like partially by just read-only variables in in the context and maybe partially by by native for the blockchain parts of the contract is about right or not exactly yeah i mean i think i don't know what context is to go inside there so you could ask more context but like if people decide they need to know uh the app hash the last three blocks in their environment like probably some custom callback for that one right but um and they can query back in the blockchain that's a query thing service query besides asking messages saying messages you have a query which can create anything for your current state it's a read-only thing so um we passed these kind of standard messages which is yeah the block heim type who send it you know who what is my contract who am i right who am i um and they query the inquiry into whatever anything else and she could have a handler saying show me the last three block headers that could be a custom query you add the only option of blockchain i don't know what else is really needed there so when i get to compositions if you think of this composition i got into this and started building logic contracts so we start getting things i have a multi-state contract that wants to call into uh to a government's voting contract that will then dispatch votes into uh decided stake funds no for example right so let's say that it was taking to this contract and so that is owned by someone else um so all these things just started building together recently the last month or so uh you know two three contracts tied together how they do it and that you know what adding up the query thing calling back is really important to add that so you could actually you know find out the state you know uh show me all the validators before i bound to validate it she'll be all the validators and then i can pick one of those and then do a bond validator as my my you know the one of the highest uh best rewards the one i bind to right and so your logic can be there find the best one and immediately just dispatch the message to do that um and that's enough really like i'm still working on a good framework to do it right now i do integration test at the high level at the very high level uh which is kind of you know running the blockchain all together so i'm trying to figure out how to unit test integrations like that uh that's currently well i have ideas that still work in progress so it needs to happen but i haven't found issues like the most i've tried to figure out the current one i'm working on is callbacks so um the way i do it is different i should like to hear near's explanation a bit more here um i we explicitly avoid re-entrances you pick the active model to avoid re-entrancing because well you know sixty percent of all three attacks are re-entrancy and so let's just get rid of interesting so uh you know force people to think a little more percent which means reentrancy basically is um my contract a calls contract b but i stay in memory not on disk right and then counter b calls back in contact a reading is f disk which is different than state memory right so let's say i have 100 tokens okay i lower the memory by 100 raise your balance 100 in memory and then call some other contract sending it to it right this one calls back again says send my hundred tokens again and lower yours and it keeps doing that and everyone sees that and eventually just write my zero for my balance and have now encrypted 10 different balances each by 100 tokens and then just have a zero in my balance so that's very interesting short so it's really tricky and so basically the way to avoid it is save all state before you call out so when they call into you they only see everything you save you'll have a different memory and uh and state uh when someone else passed into you um so we did the active model which forces that basically so before when you were multiplying state you have to persist all your changes and return a message and the message will be dispatched another module and it can just change state so only they can't change state and call into you while you're changing state only one thing can change at a time and you can't have a call of depth um so using that model it works pretty well most things can blindly be it and our handling is if the message failed revert the transaction if exceeded keep the transaction and that works pretty well the failure mode is you usually don't need to know what happened when you dispatch it you know it worked right um the failure mode is right here if contact a in the constructor connect a wants to create a contract b let's say i want to create a token contract the token contract wants to have i'm the mutual the code of contact right so i said the minstrel i create contract b that has a minter right a b but this token a needs to know who the picture is i can draw the whiteboard better probably um and that's that's the kind of callback thing yeah i just want to say that maybe to explain it better you can use whiteboard that's the whole point purpose of uh like having whiteboard and cool so uh let's do this now let's go to here so this is actually i think a very interesting uh one and i'd love to hear here so we have um i'll pick a few colors here uh hopefully not too ugly um and so usually we basically just say uh you know this is um this is some sort of defy contract yeah no swap contractor market contract and um this is some token contract yeah so usually what happens is if the default contract is move money it will just say this is fine it will go this is what you handle properly i guess it will say something like uh send 10 tokens to right and when it does that one um all you need to worry about is either the tokens got sent they did get sent right so i will change my balance to the d5 contract based on whether or not this worked if it doesn't work then i revert my changes you know the i don't close order book if they the order couldn't be claimed then i revert my changes here so i change my orders here sentence tokens and then it works or doesn't work and i revert the whole transaction about that's fine and the whole idea of message passing it works i make my changes optimistically and we're dispatching the messages and if anything fails over the whole transaction uh which is actually the proper error handling in like 98 of cases um and we don't need to add more too much more to it so what i so you know that's that's fine um and now what we look in other cases this is actually um create token contract yeah with minter and let's say this address here is so we create a contract right yeah so create this token contract that mentor and uh that's great but the problem is the d5 contract never knows how to get the mentor address sydney's are the token address there's no address that creates it right students have the address so um this then at some point you say okay now we format is we call you know no we've got a new address here and then somehow okay i just got created okay so this is a a standard call and this is one case where you really do want to have this back and forth rpc style call right it'll be nice um so what we've done is basically callbacks it's a little complex and this case is actually we say not very common it's not uncommon it's not rare but it's not very common um so we're trying to make it more optimal but currently basically what you have to do is you send a message here to the token contract saying make it make a counter contract and a callback saying when you're done instantiating when you finish this contract call back to me and tell me your address so that's basically how we're working on it and trying to make better support in the runtime for this this flow um and so what that is is basically for us the way it looks like if you want to see it is init contract defy contract returns init contract message then token contract so that's a flow in three steps you see that bro yeah so yeah um so we have this three step it could be a promise another way another set up so that's one place we put elements here um but basically it's just a little more like work yeah i just want to say that it's a typical continuation passing style so so instead of like along along with the with the call you pass the control flow so this this is not a callback in a classical sense it's more like a continuation you just ask okay so this is this is what you're going to do next the the course doesn't have to be put in a stack indeed they they can be arbitrary routed so and yeah that's uh that's pretty much what you do yeah so you say tell this address what your name is okay good so i'll tell you i'll just what name is i'm done so yeah i'm going to uh move a second it's time to rain here okay keep talking i'll turn the video for a second oh sure um at least the computation which was going on here is a very typical uh asynchronous computation so exactly see and what what you do here is requires certain computation models so so these calls are not actually caused they're more like in pretty well but maybe not so common to many programmers today i think i know that at least 13th is some form of like uh accordions in kotlin for example is an example of of simple cps international passing style uh callback uh represented in more in more natural way and i guess but i guess for these distributed aspirin systems uh like the blockchain especially with the cosmos um what we have is very it's it's not normal to be synchronous so asynchronous is absolutely uh expected behavior but uh yeah it could also mean uh the like uh in in in a typical in a typical c or python or java program calling is a very cheap operation and i guess that's no longer the case for um for the contracts calling each other so calling uh calling someone else can be expensive it can fail it can it can break for like multiple reasons so so so whenever you program you can always be prepared that this call didn't succeed and this probably has to be expressed in uh in a developed development tools so yeah we want the language to capture that so the point is right now we kind of we still synchronously we do this mainly for guarding reintroducing um in the local model but with ibc you actually have this yeah unbounded message passing so uh basically every contract an ibc basically say i will commit an intent to call this contract on my blockchain that does it really to know that blockchain process of the blockchain result has to happen at blockchain the result the message that when it comes back to us is really back to us that could take 10 seconds it could take three days i don't know um you are guaranteed to eventually get either an error or a um you're basically not cared you're going to get an error or result back from it as long as other blushing progresses so you have a timeout for two days for example and you have to see the other blockchain has passed high x little blasting at his side actually out ever processing a result then we know your result will never get processed so we could just you know call it a failure um so it has this and that message passing is this message passing to return a message to be processed um and then you don't just say well if it fails my transaction rolls back i actually hold an immediate state is one level more complexity so i have a i have maybe uh this message in process i have 10 different different messages in process um and waiting for the results and maybe they get rolled back so like if i want to send money from you to some other thing i say well your account balance is reduced in some temporary state reduced but i have this temporary callback you know state here and if the other one succeeds then great that i actually remove it and if i don't then return it back to your account because it failed so that's another level of complexity which we will be adding uh in the next months uh when you have ibc support is getting uh ready for production um we're still waiting for the underlying ibc support in underlying sdk we're working on that one so we're working that but that's a very that will have to take the same message so we want to build all the tooling around this concept of sending messages around uh and not just you know calling into it because that we need the conceptual understanding there to be able to build multi-chaining um contracts um i'm also very curious how you use promises you kind of have multiple shards and you have promises over that so i'm curious how you abstract that yes i think promises is rather weak form of of cps cps programming so so which paradigms do you actually use in your sdk is it actually futures promises or something maybe something closer to core routines or maybe something closer to i don't know like traditional callbacks so yeah this is pretty wrong return messages so the interface here if you do something like this handle takes environment you know called dependencies environment the message yeah and it returns uh basically a vec of we call it cosmos message more or less that is what we have um if you're following here this means we take the basically depth is our storage access or api access barrier environment is this dimension the block height who's calling it messages over data we call it into it you know this is our thing and return a set we didn't know there's an error as a result actually not this is something result it's actually a little more complex than this but it can error or concede if it sees it returns a list of messages and um and that's all you do so this actor model right turn it and then then the runtime takes messages and dispatches them in the same transaction um and those are also just other ones it keeps running to runs of gas somewhere along the lines or it's finished all the messages on the stack and then it's finished and if everyone's succeeded and they've all processed it then it goes and says commit this transaction successfully if anywhere along the line it runs out of gas or one of them says hey i don't have this message the whole transaction fails so you can build large systems but yeah anything of course anything fail the bigger bigger it is the easiest one thing to fail and then simply ethereum if you call it the contract it runs up gas somewhere um so so i have two related questions for such a uh for such a primitives uh yeah uh how do you expect people to reason about them and how do you expect people to test them for uh like for complex scenarios like for example when only one of the messages fails and and so on so so uh i think the the hardest part about about such a such a vectors uh would be probably a correct handling of all the uh all the possible outcomes both in reasoning art and in testing part you can for some about some systems it's very hard to reason and and sometimes even when you reason write you you cannot test it properly that's still a problem if one thing fails doesn't matter because we say if any failed over the whole transaction so we make basically a snapshot of the database and you're working on a cache a temporary weber temporary database and you know temporary transaction and the whole transaction gets rolled back if any of those messages fail anywhere so you can write that message saying i can make these changes optimistically assuming those messages are going to all succeed because if those messages fail then what i did got rolled back so it happened like i never handled this right so so that's our assumption our critical assumption is if anything fails the whole thing rolls back yeah right but how about composability so imagine you wrote a contract which which has certain like set of outcomes but it is being called as a uh from some other home yes and so as a result even if it like the inner transaction is not failing the whole transaction uh fails so so to make to make uh uh a synchronous system like that composable so that you can actually uh reason about how do how do i call from function a function b and and so function b always work your whole system must be composable so it's not always that this is like a top level call which is performed on on a button click by user it sometimes may happen as a result of some other software call so you're right that's what you tested so right now the test we have is basically we launch the blockchain and run those contracts together um and then work out now is integration test actually even in russ unit tests not even wasm just run those and say like i have these five different contracts i want to string them together in this way right i assign these contacts to the addresses and whether this is a malicious efc-20 token contract on the address or or it's a good contract or whatever else i can assign these addresses and then run the test on it so that's what we're working on right now one thing working to allow this integration test levels to happen easier for testability of it so it's not hard all you basically say is you set up a system with this code and this state assigned to each address so basically an address a contract is a set of bytecode and a set of state the current state so you can initialize them all and set the current state of these ones and then run that um and just have a little a small mock run time uh in russ so it can run in the same test as their code which would then basically take the message we dispatch them handle the errors roll back the whole thing on failure um so i'm working on that one and it's definitely testable um it's a little harder to look at some types to make usually all like nicely abstracted but the concepts are the testable um what i feel it is basically writing it that people remember how to write it this is like a lit it's not natural i guess if you used to call in contracts right if you're used to calling it it's not natural like that's my caller's thing why i have to return a message that does that thing um it's more of a mental i think this is more of a buried entry than a reasoning thing um in the end basically i assume that um all those calls at the end of it basically are just saying you know do this if air fail effectively what you have is uh you just call this message and a question mark operation at the end of it is what you're doing in your end of your end of your code um so it's something's harder to reason about about those these contracts um than calling them uh because yeah the same call stack if you think of the same call stack testing is definitely harder we need to run time for it and that's one thing we're working on um now there's some people built uh actually a funny tool called simulate which is uh uh which will take these contracts and addresses and then you can interactively send messages them and try it out manually um i want to make more unit testable very low level unit testable plus stack traces um but yeah so we have some tools on that right now most of my tests are basically running in the blockchain and running go tests against their goal blockchain with these contractions installed and actually a related question is about debuggability of uh it's i think it's a pain point not only like for for any particular blockchain but i think uh for most or almost all blockchains uh suffer from uh from hardness of of debugging anything in trivial so do you take any special measures here in an area of debatability i try to make everything testable in unit tests so i use rust unit test so like the contacts just found out they can you know compile them as rust and just run them and get full stack case and everything is beautiful um and then you run it in integra you compile it to walls and then you run that in a little runtime and suddenly you get like just vm failed when it panics so a divided by zero error which would be actually give you a panic and in rust will just give you vm fails because if you divide by zero vmware just like kill the vm with the trap and then you don't get a message you don't know why right so the panics and stuff like that inside the the wasm become opaque which is really annoying actually um so i tried a bunch of those and when you see anything like that all you have to do is for me i look for any unwrap statement or anything you can possibly panic and just look for those and half of those um so i like having the rust testability um what the other thing we do for testability is we took json which is a much maligned and actually i personally also malign it uh but universal human readable format so all the messages are in that format and their turn value is too so if you look at the msg here um and handle is basically this is just a serialized json as an object actually parse it here but it's passive the wire is json and this constant message is another object that seals json um so you can easily add in and maybe i should do that as a log level um into the runtime so every time you call a contract it says what the call is and every dispatcher can be there she could log say i called default contact this set of arguments it dispatched create token contract with this of arguments uh get token contract was called this argument and it created called uh uh uh informed created on the d5 contract with this sub arguments and you can print that out uh it's not in binary so it's pretty easy to print and log files so that's one thing we've definitely had um for debuggability and i turned that off a while ago it was definitely early on i was printing a lot of these json documents just straight up and reading them as i was writing stuff um but since it's been stable for a while and tested everything i turned all that off uh but it actually is for this big composition very interesting to turn a log log level back on so people can run the blockchain uh with a high level log level and see all those um all the messages going back and forth between them and recreate what happened mm-hmm okay that's uh that that's that's pretty nice that you have at least this this kind of uh like uh development instruments um on our previous uh wordpress session or we were discussing i'm sorry uh we were discussing their uh uh runtime uh verification as a mechanism of of solving at least partially uh the dependability problems so uh do you believe in any form of formulification in your in your system or maybe you already do have some additional checkers which uh simplify the development of smart contracts i mean formulation is beautiful i love it and i think right now it um i saw someone talk to people doing that and it's really cool stuff actually it wasn't directly uh but having a json parser in there or a borscht box or any parser basically blows up the whole whole thing right so for passing uh eight byte uh human 64 um over a call and we can knock that out but if you're passing large sales obviously parsing them the verification includes a serializable parser so i think it would make sense to take if you have actually um non some math you could take the math the actual logic inside of it and formally verify some subset of that logic um again in rust not wasn't because compiled wasn't would include all the sterilization stuff on top of it and the hooks and the memory management all that stuff um so it seemed pretty hard to formally verify the actual wasm the rust itself is interesting um and i would definitely uh love to see if you could pull out like just the functional parts you're doing and formally verify all of those um and maybe that's doable um i'm not sure unless i've tried doing formal verification stuff was basically the liquid haskell interest which is a very different uh system than rust um and that's cool the paint types is cool i think it definitely can do a lot of stuff and i found some interesting bugs you can prove mathematical theorems a lot of this stuff however i feel is smart contracts often more business logic than math so i can prove a d tree that maintains certain variants but proving what are the variants of unison contract what are the invariants of it what must never fail i'm not sure it will go up and down the price will go up and down the amount of money reserve will change is there an invariant you can mathematically say this and very much always held true for every subcontract um and then we can guarantee that if the state is in this state and this transition happens you'll always remain in a state um and those invariants will always be true so i think you need to find this mathematically and i think for many uh smart content for developing you don't really come from the mathematical proofs you're not coming from a mathematical object you're coming from some business domain and you're trying to turn business logic into a contract which is fine that's that's basically what we're doing most of the stuff is building apps and business logic into contracts and for that formalification for me seems overkill it makes sense if you have a rocket that's going to a moon and there's very clear mathematical proof of what you need to do everywhere it makes sense if you have a binary tree or you have a database possibly which has a very strong controls of what it should do it should commit in this order it should never fail this thing if transactions you know shouldn't have too parallel or the same data without causing some some roll back somewhere um the lock should maintain so you can have a set of invariants that must hold true for your database uh any possible discorruption state you should either uh be able to repair the corruption or be able to detect it's corrupted it will not blindly right so and you know there's things like that like a quick test in rus which does some cool checks like that to fuzz your stuff right which i think is actually an interesting way of doing some large testing which i think will cover a lot of what people want to do with formal verification right so um i think that'll be cool i'd love to have quick check tied into like these basically um systems of contracts okay yeah so i guess we have very interesting discussion we tried to limit ourselves to usually something approximately like like one hour to not uh not make people too much bored sorry so i guess uh i'd love to say thank thanks you for coming thanks thanks for uh very very interesting intro for sharing your experience with the multi-chain so thanks a lot thank you for having me here to talk yeah","transcript_synced_at":"2026-11-04T04:24:51.362Z","segments":[{"start_seconds":4,"text":"uh hello my name is uh nicola gutier i work working here and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=4s"},{"start_seconds":11,"text":"on the contract runtime and would like to introduce you adam frey i don't if","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=11s"},{"start_seconds":18,"text":"tell us some words about yourself and what you're doing well hi yeah my name is ian fry i'm the founder of cosmosam i am coming from cosmos if you've heard","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=18s"},{"start_seconds":27,"text":"of the cosmos ibc blockchains and worked in that uh 17 18 some other projects around it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=27s"},{"start_seconds":36,"text":"and in 2019 got really excited about smart contracts so i'm looking at that so uh yeah since uh summer 2019 i","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=36s"},{"start_seconds":43,"text":"started a project called cosmosim which is uh web assembly blossom smart contracts embedded in custom sdk so it's basically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=43s"},{"start_seconds":52,"text":"um all the tooling uh there's gold blockchains like cosmos basically a construction kit and then we're embedding one some contracts into that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=52s"},{"start_seconds":60,"text":"um so i actually can answer all the questions about tendermint and sdk as well because i spent time working that age ago but all i'm working now is basically run time","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=60s"},{"start_seconds":68,"text":"of that the bindings to the contract and then the contract itself okay and i think uh there are multiple","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=68s"},{"start_seconds":76,"text":"uh blockchains supporting uh wasm contracts so uh what what would you say is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=76s"},{"start_seconds":85,"text":"differentiating uh cosmos amount of those um our biggest differentiator is we're not blocking","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=85s"},{"start_seconds":92,"text":"uh i think that so i think that's key people ask yourself blockchain maybe will someday um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=92s"},{"start_seconds":99,"text":"but we are effectively a platform or a module to integrate other blockings","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=99s"},{"start_seconds":106,"text":"so what cosmos the idea is um these people rejected the theory of maximism maximism everything around ethereum","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=106s"},{"start_seconds":113,"text":"and said rather than having one chain to rule them all um which was totally impossible theory in 2016 17.","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=113s"},{"start_seconds":120,"text":"um let's do a network of blockchains we connect them the same way the internet scales horizontally um so that's where it comes from so what","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=120s"},{"start_seconds":128,"text":"you have is you have a bunch of people building application specific blockchains so they're they're code the problem is writing a code the hard portion for the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=128s"},{"start_seconds":136,"text":"upgrade is kind of tedious uh you just now put contracts as issues and smart contracts were a cool idea so i added them into these there are currently i think six five","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=136s"},{"start_seconds":145,"text":"logistics blockchains in the constant ecosystem that integrated our module into theirs which means um it runs inside of five or six","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=145s"},{"start_seconds":153,"text":"blockchains currently in testnet um but yeah it's running there i think near took a different approach they","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=153s"},{"start_seconds":161,"text":"looked ethereum and scaled it vertically so you guys actually broke a lot of the barriers of you know uh 20 transactions a second uh by making one chain of can actually","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=161s"},{"start_seconds":169,"text":"scale up to uh you know real world speeds so we've gone horizontally a bunch of smaller chains they have decent throughput","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=169s"},{"start_seconds":176,"text":"and they're connected uh horizontally over ibc into blocking communication okay and is cause one aiming to public","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=176s"},{"start_seconds":185,"text":"blockchain only or you also want to want to connect uh private blockchains like uh like facebook for example libra","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=185s"},{"start_seconds":195,"text":"yeah so this is a big question um right now we're looking at public blockchains because that's what i've seen um we've looked at enterprise market i think there's a huge market there","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=195s"},{"start_seconds":204,"text":"actually um and in some way a business opportunity they can use cause of autumn it's open for them to use apache","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=204s"},{"start_seconds":211,"text":"and if someone wants to i think we're not going that route ourselves because that's a lot of um the private blockchain market requires","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=211s"},{"start_seconds":220,"text":"different expertise it's enterprise sales i can sell the startups to cancel the enterprises i do sell the devs","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=220s"},{"start_seconds":228,"text":"so um we look at that and certainly we're not looking at we're very happy if someone else wants to integrate into those um uh private change they're welcome to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=228s"},{"start_seconds":238,"text":"please talk to us okay and and so if you want to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=238s"},{"start_seconds":246,"text":"integrate like a multiple uh uh blockchains uh in in austin asmr i think they they usually have their own","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=246s"},{"start_seconds":255,"text":"like uh runtime for execution of the contracts including a custom set of of host","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=255s"},{"start_seconds":263,"text":"functions so for example in case of in case of web assembly it's it's indeed a portable standard so it's probably","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=263s"},{"start_seconds":270,"text":"okay if you if you uh can execute the contract but how how do you emulate the behavior of the particular uh blockchain","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=270s"},{"start_seconds":280,"text":"you're right uh we kind of don't miss an extraction later um so the funny thing is decay is one thing i really don't like about it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=280s"},{"start_seconds":287,"text":"which they change they make backwards compatible changes like every six months um but that's a good thing too because we have to use support in different","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=287s"},{"start_seconds":295,"text":"versions so we said quickly on um the same contract that runs in zero thirty seven should run you say eight there's nine forty of the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=295s"},{"start_seconds":303,"text":"customers okay um which doesn't get minor to major changes so we can't use their native uh native functions directly","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=303s"},{"start_seconds":311,"text":"so we had to make an abstraction layer between that so um what we currently do is we have uh abstraction for","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=311s"},{"start_seconds":318,"text":"uh sending messages to other uh other modules which could be either contract or native modules um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=318s"},{"start_seconds":325,"text":"we have an abstraction of querying cut other contracts or native modules uh and we have a storage local storage and we have an api which are basically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=325s"},{"start_seconds":334,"text":"pre-compiles so what you can do is basically offer a fixed set of functionality which","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=334s"},{"start_seconds":344,"text":"you've standardized more or less which is the bank module and staking module a lot of ps change mostly so um and that and when you call into it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=344s"},{"start_seconds":353,"text":"takes your message from the from the contract converts into the native message format calls in the date of code takes a response and converts into the contract response the same contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=353s"},{"start_seconds":362,"text":"could run three different chains uh possibly different versions of different sticky modules as long as they have an interface so we define a common api basically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=362s"},{"start_seconds":370,"text":"the changes implement um and that's also limited because you can expose extra and we added in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=370s"},{"start_seconds":377,"text":"recently about a month ago uh because they're trying to integrate into a native chain that had its own uh swap kind of swap type uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=377s"},{"start_seconds":386,"text":"an oracle treasury type functionality don't expose it so we added a way of extending it so basically we pass messages opaquely","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=386s"},{"start_seconds":394,"text":"through our runtime so if you want to extend your blockchain your runtime uh you can add handlers for different message types","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=394s"},{"start_seconds":401,"text":"and you have it's a custom message type which is basically just raw raw bytes you can pass on to your block to interpret it and we allow","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=401s"},{"start_seconds":408,"text":"uh custom messages and custom queries which means you basically just use a rust binding import rust library it says","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=408s"},{"start_seconds":415,"text":"give you these extensions and you have the extension apis and it also has a feature flag say okay this contract only works on terra or only which in regen or notre enigma","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=415s"},{"start_seconds":424,"text":"because we're using these custom bindings and then the there blockchain handles those custom bindings um so you can write a portable contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=424s"},{"start_seconds":433,"text":"using the standard set which runs on all chains or you can make use of custom custom features for that chain but then","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=433s"},{"start_seconds":442,"text":"you opt into them and your contact is only change specific at that point uh there's a bit of a i know the details","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=442s"},{"start_seconds":449,"text":"on that sometimes it's a bunch of rust uh generics in there um and then yeah still vacation and stuff but yeah it actually works pretty pretty well um to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=449s"},{"start_seconds":458,"text":"pass it basically from the wasm that cares about the the format of the queries messages and it then it takes everything that bytes passes all the way through our","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=458s"},{"start_seconds":466,"text":"virtual machine into a rush binding the go library into the go blockchain uh through about","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=466s"},{"start_seconds":473,"text":"three different packages into the end users code is not ours and that then actually has a handler for these fights","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=473s"},{"start_seconds":480,"text":"to then uh handle them and so basically you put that on both in your personal app and on the on the contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=480s"},{"start_seconds":488,"text":"okay so it means you generally want to uh provide the servers some similar to what","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=488s"},{"start_seconds":496,"text":"we have a in a standard like uh virtual machines like in java for example when you when you can run the same java","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=496s"},{"start_seconds":504,"text":"application on multiple operating systems by by colonizing their uh porting porting layer","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=504s"},{"start_seconds":513,"text":"into into some some least common denominator yeah exactly and you're also allowed using jni to access the custom","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=513s"},{"start_seconds":522,"text":"stuff with java too so um wonderful actually ideally like i will if you know if let's say for change i'll even simplify","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=522s"},{"start_seconds":529,"text":"version of the swap i'll look for the unisop standard and off that in and they could all put this unicorn center to the same you know contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=529s"},{"start_seconds":537,"text":"could use unit swap depending not carrying out whose kind of unit swap implementation is um or whether it's a contract native so that's something i'd like to kind of go","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=537s"},{"start_seconds":545,"text":"towards but right now we just standardized the basic ones which is moving tokens and staking","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=545s"},{"start_seconds":552,"text":"okay yeah i guess uh the selection of of the language for writing the contracts in especially in your situation became","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=552s"},{"start_seconds":560,"text":"very very interesting problem so what do you think about that so do you believe that like rust rules them","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=560s"},{"start_seconds":568,"text":"all or there are there should be multiple languages or there should be some other language which is default so what's your opinion on that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=568s"},{"start_seconds":576,"text":"well i started rust as the tooling i had to learn rust anyway before that the tooling for russell was really awesome and i actually learned russ on","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=576s"},{"start_seconds":583,"text":"this project i made i dabbled it before i'd written like a hobby project but never done a real project in russ until i started working on this in the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=583s"},{"start_seconds":591,"text":"hackathon actually uh coding it um luckily with another rest app um but yeah so if i was cool i'm really","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=591s"},{"start_seconds":599,"text":"going to love rust i think it's an awesome language but it's not for everyone that has a learning curve so i think maybe everyone will eventually get there but i don't understand everyone go there tomorrow","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=599s"},{"start_seconds":607,"text":"right and um i hear a lot of people wishing to have so um cosmos sdk ecosystem a lot of people","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=607s"},{"start_seconds":614,"text":"program go and they want go uh other people talk about javascript no javascript no or they want kotlin yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=614s"},{"start_seconds":624,"text":"um i'm actually we were very inspired so we saw parody first their stuff while russell saw near protocol like","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=624s"},{"start_seconds":631,"text":"i don't know last august or september and uh and saudi had assembly strip working and like as a first class citizen","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=631s"},{"start_seconds":638,"text":"no and i was like that's awesome uh so i've tried a little about this stuff you know and it's a very nice nice set we got time i was very very impressed","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=638s"},{"start_seconds":647,"text":"with all the work you guys doing and taking user experience dev experience as like the major point of utility so i'm very inspired with that so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=647s"},{"start_seconds":655,"text":"we are actually planning to add a similar script at some point at some point and go support as well there's a apparently subset of go called tinygo","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=655s"},{"start_seconds":664,"text":"which compiles the llvm and makes awesome code uh we have prototyped out minimal concept it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=664s"},{"start_seconds":670,"text":"does do a job uh we'll see how much we can logically put there yeah it's uh it's definitely a plan of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=670s"},{"start_seconds":677,"text":"ours to add more languages but i think i think generally like very","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=677s"},{"start_seconds":685,"text":"serious distinction between languages lies in the area of uh automated or manual memory management","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=685s"},{"start_seconds":695,"text":"so so if language semantics assumes automated memory in memory management like java","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=695s"},{"start_seconds":702,"text":"kotlin and javascript implementing it on a current wasm","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=702s"},{"start_seconds":709,"text":"runtimes may could be very non-trivial so uh so do you believe that there is a","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=709s"},{"start_seconds":718,"text":"place for languages with automated memory management in a smart contract world well i think you can there's three ways of handling it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=718s"},{"start_seconds":726,"text":"um the first ways don't care and you say we throw away the contact every time right so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=726s"},{"start_seconds":734,"text":"during one running of a contract you probably don't claim that much memory back right like it's if you're in a hundred times and you allocate an allocated allocate","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=734s"},{"start_seconds":741,"text":"but in one unless you're really uh doing something weird you probably don't keep allocating 50k free 550k alexa 50k 350k","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=741s"},{"start_seconds":749,"text":"and somehow managed to use 30 megabytes of ram uh by accident because you're just going to keep keep loop uh in a warm contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=749s"},{"start_seconds":757,"text":"so if you out if you make a clean fresh instance every time you run the contract and throw it away at the end it doesn't really matter honestly","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=757s"},{"start_seconds":764,"text":"um it's not wasn't wazi which actually keeps long living processes these run in a millisecond or two um they shouldn't use that much memory","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=764s"},{"start_seconds":773,"text":"that's the cheap answer uh the second answer is um theoretically they're adding","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=773s"},{"start_seconds":780,"text":"some sort of support for garbage collection memory manager in there you could compile your contract itself make it huge you actually could have a garbage collector in your contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=780s"},{"start_seconds":788,"text":"right like you can do all that keep counting and you have access to all so you could kind of uh yeah you kind of do that in your","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=788s"},{"start_seconds":796,"text":"contract um quite hard or we can wait for blossom to add support for the vm for that level um so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=796s"},{"start_seconds":805,"text":"i definitely prefer i definitely prefer having uh rust and say okay cleans up the end i know it's great but i think definitely people want useful languages they want to not worry","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=805s"},{"start_seconds":814,"text":"about garbage collection they don't want to write ceo on russ they want to write something easy and uh yeah so i think it's our job","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=814s"},{"start_seconds":821,"text":"building these runtimes and building these to figure out how to do that and whether it is just uh clearing your memory out every time you","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=821s"},{"start_seconds":829,"text":"run a contract or whether it's somehow adding stubs to the garbage question that's uh that's our job","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=829s"},{"start_seconds":838,"text":"yes actually your first answer is very tempting i'd say it's uh like it's in many cases indeed","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=838s"},{"start_seconds":846,"text":"everybody know that gc is not probably the most straightforward technology in software engineering so if you can avoid it by","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=846s"},{"start_seconds":855,"text":"just not doing that it's it's looking deep very uh very much attractive but but what's","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=855s"},{"start_seconds":864,"text":"uh interesting complete like consequences of that of that action is the limitation of the nature what","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=864s"},{"start_seconds":872,"text":"uh what the smart contract is so it's uh it inherently becomes like uh very","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=872s"},{"start_seconds":881,"text":"computationally limited so it cannot have essentially unbounded allocation","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=881s"},{"start_seconds":888,"text":"uh and de-allocation and inside of its evolution so so we essentially put certain compute","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=888s"},{"start_seconds":895,"text":"limits on a computation happening inside inside of a smart contract and do you believe it's a good thing or bad thing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=895s"},{"start_seconds":903,"text":"well i think it's really good you want to limit everything there so i mean since a smart contract has to run on i don't know 20 to 100 machines in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=903s"},{"start_seconds":912,"text":"parallel and it blocks everything else but well maybe near doesn't maybe run in parallel that's awesome stuff um but right now we're basically in the sequential model process one transaction","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=912s"},{"start_seconds":920,"text":"next transaction next transaction um and since you do that you have to bound it like uh we cannot have a contract running more than","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=920s"},{"start_seconds":927,"text":"5-10 milliseconds now really if you have contacts running 10 seconds doing uh doing stuff then you know the whole watching for 10 seconds","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=927s"},{"start_seconds":935,"text":"which is not cool right so uh by the nature of having a sequential blockchain this linear history we basically have to have","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=935s"},{"start_seconds":944,"text":"everything native or smart contracts all code must fit under certain certain limits um i think laws and outside of that context","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=944s"},{"start_seconds":953,"text":"can do a lot more and actually the more i get into it the more i see the potential awesome not just in the web and not just in blockchains but everywhere so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=953s"},{"start_seconds":960,"text":"wazi for example system interface is like kind of this i see that alternative docker in a way right you can have these sandbox objects which just have a you know a","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=960s"},{"start_seconds":969,"text":"very clear interface of what this calls i can use um those are actually really cool if you're building stuff like that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=969s"},{"start_seconds":976,"text":"you need to have garbage collection or you need to have um or you need to have automatic memory management","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=976s"},{"start_seconds":982,"text":"like rust for c so i think that's that creates incredibly important and so i see the kind of the binding","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=982s"},{"start_seconds":990,"text":"the the the the conjunction that come together in auction workers i know parody has that term i use something for them option workers","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=990s"},{"start_seconds":997,"text":"uh so basically a blockchain triggers a task to run a wasm task to run it runs in parallel and returns a result after i don't know","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=997s"},{"start_seconds":1004,"text":"one block two blocks three blocks so you can do a long-irving task that runs in parallel to the transactions um and actually maybe something a bit","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1004s"},{"start_seconds":1012,"text":"more near because here it allows some sort of uh parallelization like that as well um but when you start allowing that parallelization and you no longer have","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1012s"},{"start_seconds":1019,"text":"to limit the code running time to 10 milliseconds and when you say okay this can run for one minute that's fine just coaching one for a minute and when","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1019s"},{"start_seconds":1028,"text":"it's done it'll submit the result and when all the nodes have finished writing this code you'll submit all the results back and we have them and we guarantee it's correct","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1028s"},{"start_seconds":1035,"text":"awesome stuff great stuff so yeah that's exactly what the direction i was heading so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1035s"},{"start_seconds":1042,"text":"like if we talk about the smart contracts in the current form then then i'm like raise two hands to support","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1042s"},{"start_seconds":1050,"text":"non-member management and stuff like that but if we actually will think about stuff like smart services and and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1050s"},{"start_seconds":1057,"text":"essentially open web as and smart services as a technology supporting that then it probably means that what we","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1057s"},{"start_seconds":1067,"text":"think about like a very short short time span and very primitive logic inside which is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1067s"},{"start_seconds":1074,"text":"applicable to classical smart contracts may not be really appropriate so so the question is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1074s"},{"start_seconds":1082,"text":"uh probably more like uh not even practical but more like strategic in a sense so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1082s"},{"start_seconds":1089,"text":"how do you believe will we need in like in the foreseeable future uh smart","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1089s"},{"start_seconds":1097,"text":"services or smart like smart applications which run for relatively long time need relatively","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1097s"},{"start_seconds":1105,"text":"significant amount of resources and be able to actually","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1105s"},{"start_seconds":1112,"text":"perform theoretically unbound computations it's a very good question very good","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1112s"},{"start_seconds":1122,"text":"question i think i look for examples now and i think you know there's things like wearing reddish in the wasabi which says you work right and it's awesome","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1122s"},{"start_seconds":1130,"text":"um i think there's two levels and the first level is like you're trying uh support contract platform is probably easy to write","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1130s"},{"start_seconds":1138,"text":"uh some code and deploy it right so i think one of the big goals there is to make a barrier of entry","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1138s"},{"start_seconds":1145,"text":"developer work to lower that amount the bare is really really low um and we're achieving that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1145s"},{"start_seconds":1153,"text":"i think quite a bit with we're achieving that quite a bit by adding other languages","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1153s"},{"start_seconds":1160,"text":"by adding assembly script i think go you know if kotlin is supporting it'll be awesome one day you know i think a few of us from looking at that one as well","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1160s"},{"start_seconds":1168,"text":"uh still in productive development um but i think that's great for me to use it but if you say if you want to write real services still you're right i think","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1168s"},{"start_seconds":1176,"text":"it's you're basically stuck with roster c to write real long-running services um and stuck with it's not just a bad thing but just raise lower raise the bar of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1176s"},{"start_seconds":1184,"text":"entry and so one really concrete example you can think of is running for example um like clients so if you want to run these","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1184s"},{"start_seconds":1194,"text":"in a browser or anywhere else um that's a lot of logic it's a lot of signature validation a lot of uh math shot hashes trees","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1194s"},{"start_seconds":1202,"text":"trading trees subtrees it's a lot of crazy stuff and a lot of the code we have is available in rust you know so there is like seven go and some rust on our","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1202s"},{"start_seconds":1210,"text":"level i think indoors all rust uh paradise love rust coat as well so this is quite um quite available in the west and you","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1210s"},{"start_seconds":1219,"text":"could port that into some smart contracts whether it's running in your browser whether it's running in some smart service uh which is sandbox that's awesome and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1219s"},{"start_seconds":1227,"text":"those pieces i think would have to still be written rust for now in the near future at least and in the future they'll add maybe","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1227s"},{"start_seconds":1235,"text":"better garbage collection better language support for other things but i would basically say for one-off smarter things open up to everyone to try it use wasman standard","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1235s"},{"start_seconds":1244,"text":"and if you need to use things that are not in the standard already i would just uh stick with the rest for that so i still want to make it a first language it's my first choice of language","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1244s"},{"start_seconds":1252,"text":"uh for coding and i i definitely think the majority of developers will probably not be unrest in you know 60 months a year when they see an alternative","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1252s"},{"start_seconds":1261,"text":"but yeah i think i definitely want to have more direct contracts so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1261s"},{"start_seconds":1267,"text":"like what was your other language before us i'm just curious my last name is go which is boring actually after a while","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1267s"},{"start_seconds":1276,"text":"so okay okay and probably before it was something like c or c plus plus right i started with c uh and you know yeah and uh they were to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1276s"},{"start_seconds":1285,"text":"java like c c but plus there's university well c is like build data structure and safe right everything you see and so like messing around with stuff or back then","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1285s"},{"start_seconds":1293,"text":"late 90s um then it was java and then in like the mid 2000s you know i discovered","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1293s"},{"start_seconds":1300,"text":"python javascript which was cool for hacking out websites because that was basically the work you're doing then uh in the like you know late not uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1300s"},{"start_seconds":1309,"text":"early tens and quickly hit the limits once you started building real services on there right like you know 2012 1314 you start like","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1309s"},{"start_seconds":1316,"text":"scaling up services rather than just little like websites and you're like this doesn't work anymore so from there i went to go um and yeah i played with rust i played","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1316s"},{"start_seconds":1325,"text":"haskell i definitely played them before uh and russell's the one that tracked me most it had like the type system of haskell which i loved","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1325s"},{"start_seconds":1332,"text":"uh but not this like uh reading from disc is some weird i o monad that is like non-normal operation you can't consider","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1332s"},{"start_seconds":1339,"text":"it like that's really normal like you can't you can't say like you know interacting outside the world is not acceptable like this is such a special case like no no","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1339s"},{"start_seconds":1348,"text":"so i think hats is wonderful doing math but like it definitely seemed yeah special okay reading from this should not be a special case so i love","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1348s"},{"start_seconds":1355,"text":"rust uh yeah it gave me like all that power i love the type actually my background was also mostly like c","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1355s"},{"start_seconds":1364,"text":"and c plus plus and other low-level languages and so for me uh getting used to rust was like a breeze","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1364s"},{"start_seconds":1371,"text":"like it's just about the c plus plus in my like in my head it's uh so in in a sense it's","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1371s"},{"start_seconds":1378,"text":"it's i think indeed depends on uh uh on a history on trajectory of of the person as a programmer","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1378s"},{"start_seconds":1385,"text":"and and so but i guess as for many people the trajectory is actually start so at least the very seriously","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1385s"},{"start_seconds":1392,"text":"interacts with web programming where it's typically like a gs or php for server side","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1392s"},{"start_seconds":1400,"text":"for them probably uh high level languages would be more natural so that's","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1400s"},{"start_seconds":1407,"text":"let's agree okay then so so if if you talk like like about uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1407s"},{"start_seconds":1416,"text":"promise of course so why do you believe in the fact that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1416s"},{"start_seconds":1423,"text":"relatively uh limited set of primitives i think you meant you mentioned like uh send message received message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1423s"},{"start_seconds":1432,"text":"and local storage and that's about it what why do you believe it's sufficient for writing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1432s"},{"start_seconds":1439,"text":"non-trivial contracts so well i see well basically i think","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1439s"},{"start_seconds":1447,"text":"message passing i think his message passing is sufficient to build everything um and in fact we can kind of reduce our entire distribution systems","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1447s"},{"start_seconds":1455,"text":"i think it's necessary if you actually if you're actually renting them properly they have reduced synchronous messages passing or like basically rpc calls and have all kinds of errors because i","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1455s"},{"start_seconds":1464,"text":"actually believe that messages come back in balance and promises actually resolve sometimes um yeah they believe anyway","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1464s"},{"start_seconds":1472,"text":"but if you go to this is you know back to super system design uh async message passing is the fundamental of basically all ship systems um the actor model has also been used uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1472s"},{"start_seconds":1482,"text":"heavily in building uh large scale systems they're supposed to be loosely coupled um and it looks inspired","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1482s"},{"start_seconds":1489,"text":"not just in like what the ethereum do because there's a great example but you can't copy them i think they they paved a beautiful path ethereum","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1489s"},{"start_seconds":1496,"text":"but they also did it with a bunch of assumptions they made everything simpler they made their way they made their way as they scale up to larger more complex applications what can we do","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1496s"},{"start_seconds":1504,"text":"so being able to pass messages between uh contracts um intonation is way and then the active models is basically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1504s"},{"start_seconds":1512,"text":"uh you have your own state you know where other state you can do everything it came to be a limit and so limit we hit briefly was going to query something","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1512s"},{"start_seconds":1519,"text":"so if i want to know my balance do i have to send a message uh to uh query the balance stop my transaction at some later time i store the fact i'm","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1519s"},{"start_seconds":1528,"text":"waiting this message another message comes back and so it's just being too hard so um triggering so we actually said okay i made an exception and we're gonna","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1528s"},{"start_seconds":1536,"text":"allow queries synchronously um but i think it's fine because which is kind of a break is actually quite everything on one","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1536s"},{"start_seconds":1544,"text":"chain before that was basically much more fluid um but i think it's basically what you have you have a bunch of of processes sending messages back and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1544s"},{"start_seconds":1553,"text":"forth and you know they've built huge telecoms on that the actor model that's all it is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1553s"},{"start_seconds":1562,"text":"okay uh but if you think about the blockchains there are typically at least two very important","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1562s"},{"start_seconds":1570,"text":"operations which i don't think naturally much to message pacing and one is essentially identity mess","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1570s"},{"start_seconds":1577,"text":"management where so that you need to understand under which account or like address or whatever you execute your contract and another","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1577s"},{"start_seconds":1586,"text":"one is the guest handling so like uh attach attachment to execution certain computational","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1586s"},{"start_seconds":1595,"text":"resource uh cost and those operations are not like the very unusual","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1595s"},{"start_seconds":1603,"text":"not like first is normal for computer science but i think second one is somewhat unusual for for the for the computer science for computation to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1603s"},{"start_seconds":1611,"text":"actually attach to it it's computational complexity but generally both of them i think crucial for","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1611s"},{"start_seconds":1618,"text":"execution of of smart contracts so how do you how do you handle such a problems in osmo","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1618s"},{"start_seconds":1626,"text":"well you're right there's a lot of things so the first part i didn't mention all is actually one thing we exposed we don't suppose callbacks we expose a environment object","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1626s"},{"start_seconds":1634,"text":"which has uh the message cider sender uh the contract address it's um the block height the block time","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1634s"},{"start_seconds":1643,"text":"i don't know one more thing you think the message that you have if any funds have sent the message if your name token or sent the message as well so a little bit like what is your environment what's your context you're","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1643s"},{"start_seconds":1651,"text":"called in it's a read-only variable so the structure can read it um it's not even callbacks just pass it as like data uses data parts it and this is our","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1651s"},{"start_seconds":1659,"text":"context so we give of course a context you're running and that's very common concept everywhere i think you know languages um so give us context","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1659s"},{"start_seconds":1668,"text":"tell you which who's authorized what user is running this um the other gas handling i should be a patriot contract they should not worry","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1668s"},{"start_seconds":1676,"text":"about gas handling they run out of gas they don't have gas and it's up to the collar to worry about that and the run time to worry about that so i don't think contracts should have to worry about gas","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1676s"},{"start_seconds":1684,"text":"and they definitely should not have the safety depend on the fact of whether then they can predict a gas limit for dispatching a sub-call and predictably had the gas limit of the sub-call to be high enough to run","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1684s"},{"start_seconds":1692,"text":"correctly but not enough to avoid re-entrancing and so a large portion of ethereum contract uh security is based on the fact that you're basically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1692s"},{"start_seconds":1701,"text":"well aware of the current gas and able to mute limits of sub-calls when you dispatch when you send a message to another contract or call under the contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1701s"},{"start_seconds":1708,"text":"you limit its gas so it can't hurt you which i think is a detail you should not have to worry about the contract developer so the runtime should make sure that the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1708s"},{"start_seconds":1717,"text":"contact can't hurt you basically so you believe it it shall be handled like partially by just read-only","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1717s"},{"start_seconds":1727,"text":"variables in in the context and maybe partially by by native for the blockchain parts of the contract is about right or","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1727s"},{"start_seconds":1735,"text":"not exactly yeah i mean i think i don't know what context is to go inside there so you could ask more context but like","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1735s"},{"start_seconds":1744,"text":"if people decide they need to know uh the app hash the last three blocks in their environment like probably some custom callback for that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1744s"},{"start_seconds":1752,"text":"one right but um and they can query back in the blockchain that's a query thing service query besides asking messages saying messages","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1752s"},{"start_seconds":1759,"text":"you have a query which can create anything for your current state it's a read-only thing so um we passed these kind of standard","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1759s"},{"start_seconds":1768,"text":"messages which is yeah the block heim type who send it you know who what is my contract who am i right who am i","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1768s"},{"start_seconds":1774,"text":"um and they query the inquiry into whatever anything else and she could have a handler saying show me the last three block headers","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1774s"},{"start_seconds":1782,"text":"that could be a custom query you add the only option of blockchain i don't know what else is really needed there so when i get to compositions if you think","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1782s"},{"start_seconds":1790,"text":"of this composition i got into this and started building logic contracts so we start getting things i have a multi-state contract that wants to call into uh to a government's voting contract that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1790s"},{"start_seconds":1798,"text":"will then dispatch votes into uh decided stake funds no for example right so let's say that it was taking to this contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1798s"},{"start_seconds":1807,"text":"and so that is owned by someone else um so all these things just started building together recently the last month or so uh you know two three contracts tied","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1807s"},{"start_seconds":1815,"text":"together how they do it and that you know what adding up the query thing calling back is really important to add that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1815s"},{"start_seconds":1823,"text":"so you could actually you know find out the state you know uh show me all the validators before i bound to validate it she'll be all the validators and then i can pick one of those and then do a bond validator as","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1823s"},{"start_seconds":1832,"text":"my my you know the one of the highest uh best rewards the one i bind to right and so your logic can be there find the best one and immediately just dispatch","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1832s"},{"start_seconds":1840,"text":"the message to do that um and that's enough really like i'm still working on a good framework to do it right now i do integration test at the high level","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1840s"},{"start_seconds":1849,"text":"at the very high level uh which is kind of you know running the blockchain all together so i'm trying to figure out how to unit test integrations like that uh that's currently well i","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1849s"},{"start_seconds":1857,"text":"have ideas that still work in progress so it needs to happen but i haven't found issues like the most i've tried to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1857s"},{"start_seconds":1866,"text":"figure out the current one i'm working on is callbacks so um the way i do it is different i should like to hear near's explanation a bit more here","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1866s"},{"start_seconds":1874,"text":"um i we explicitly avoid re-entrances you pick the active model to avoid re-entrancing because well you know sixty percent of all three attacks are re-entrancy","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1874s"},{"start_seconds":1882,"text":"and so let's just get rid of interesting so uh you know force people to think a little more percent which means reentrancy basically is um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1882s"},{"start_seconds":1891,"text":"my contract a calls contract b but i stay in memory not on disk right and then counter b calls back in contact a reading is f disk which is different","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1891s"},{"start_seconds":1898,"text":"than state memory right so let's say i have 100 tokens okay i lower the memory by 100 raise your balance 100 in memory and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1898s"},{"start_seconds":1907,"text":"then call some other contract sending it to it right this one calls back again says send my hundred tokens again and lower yours and it keeps doing that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1907s"},{"start_seconds":1915,"text":"and everyone sees that and eventually just write my zero for my balance and have now encrypted 10 different balances each by 100 tokens and then just have a zero in my balance","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1915s"},{"start_seconds":1923,"text":"so that's very interesting short so it's really tricky and so basically the way to avoid it is save all state before you call out so when they call into you they only see","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1923s"},{"start_seconds":1931,"text":"everything you save you'll have a different memory and uh and state uh when someone else passed into you um so we did the active model which forces","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1931s"},{"start_seconds":1939,"text":"that basically so before when you were multiplying state you have to persist all your changes and return a message and the message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1939s"},{"start_seconds":1947,"text":"will be dispatched another module and it can just change state so only they can't change state and call into you while you're changing state only one thing can change","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1947s"},{"start_seconds":1955,"text":"at a time and you can't have a call of depth um so using that model it works pretty well most things can blindly be it and our handling is if the message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1955s"},{"start_seconds":1964,"text":"failed revert the transaction if exceeded keep the transaction and that works pretty well the failure mode is you usually don't need to know","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1964s"},{"start_seconds":1972,"text":"what happened when you dispatch it you know it worked right um the failure mode is right here if contact a in the constructor connect","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1972s"},{"start_seconds":1981,"text":"a wants to create a contract b let's say i want to create a token contract the token contract wants to have i'm the mutual the code of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1981s"},{"start_seconds":1988,"text":"contact right so i said the minstrel i create contract b that has a minter right a b but this token a needs to know who the picture is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1988s"},{"start_seconds":1996,"text":"i can draw the whiteboard better probably um and that's that's the kind of callback thing yeah i just want to say that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=1996s"},{"start_seconds":2004,"text":"maybe to explain it better you can use whiteboard that's the whole point purpose of uh like having whiteboard","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2004s"},{"start_seconds":2011,"text":"and cool so uh let's do this now let's go to here so this is actually i think a very interesting uh one and i'd love to hear","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2011s"},{"start_seconds":2018,"text":"here so we have um i'll pick a few colors here uh hopefully not too ugly um and so usually","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2018s"},{"start_seconds":2027,"text":"we basically just say uh you know this is um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2027s"},{"start_seconds":2036,"text":"this is some sort of defy contract yeah no swap contractor market contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2036s"},{"start_seconds":2044,"text":"and um this is some token contract yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2044s"},{"start_seconds":2055,"text":"so usually what happens is if the default contract is move money it will just say this is fine it will go this is what you handle properly","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2055s"},{"start_seconds":2065,"text":"i guess it will say something like uh send 10 tokens","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2065s"},{"start_seconds":2072,"text":"to right and when it does that one um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2072s"},{"start_seconds":2079,"text":"all you need to worry about is either the tokens got sent they did get sent right so i will change my balance to the d5 contract based on whether or not this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2079s"},{"start_seconds":2087,"text":"worked if it doesn't work then i revert my changes you know the i don't close order book if they the order couldn't be claimed then i revert my changes here so i change my","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2087s"},{"start_seconds":2095,"text":"orders here sentence tokens and then it works or doesn't work and i revert the whole transaction about that's fine and the whole idea of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2095s"},{"start_seconds":2103,"text":"message passing it works i make my changes optimistically and we're dispatching the messages and if anything fails over the whole transaction","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2103s"},{"start_seconds":2110,"text":"uh which is actually the proper error handling in like 98 of cases um and we don't need to add more too much more to it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2110s"},{"start_seconds":2118,"text":"so what i so you know that's that's fine um and now what we look in other cases this is actually","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2118s"},{"start_seconds":2128,"text":"um create token contract yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2128s"},{"start_seconds":2141,"text":"with minter and let's say this address here is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2141s"},{"start_seconds":2149,"text":"so we create a contract right yeah so create this token contract that mentor and uh that's great but the problem is the d5 contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2149s"},{"start_seconds":2157,"text":"never knows how to get the mentor address sydney's are the token address there's no address that creates it right students have the address so um this then at some point","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2157s"},{"start_seconds":2167,"text":"you say okay now we format is we call you know no we've got a new address here and then","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2167s"},{"start_seconds":2174,"text":"somehow okay i just got","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2174s"},{"start_seconds":2184,"text":"created","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2184s"},{"start_seconds":2200,"text":"okay so this is a a standard call and this is one case where you really do want to have this back and forth rpc style","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2200s"},{"start_seconds":2207,"text":"call right it'll be nice um so what we've done is basically callbacks it's a little complex and this case is actually we say not very common","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2207s"},{"start_seconds":2216,"text":"it's not uncommon it's not rare but it's not very common um so we're trying to make it more optimal but currently basically what you have to do is you send a message here","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2216s"},{"start_seconds":2224,"text":"to the token contract saying make it make a counter contract and a callback saying when you're done instantiating when you finish this contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2224s"},{"start_seconds":2232,"text":"call back to me and tell me your address so that's basically how we're working on it and trying to make better support in the runtime for this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2232s"},{"start_seconds":2239,"text":"this flow um and so what that is is basically for us the way it looks like if you want to see it is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2239s"},{"start_seconds":2247,"text":"init contract defy contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2247s"},{"start_seconds":2255,"text":"returns init contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2255s"},{"start_seconds":2260,"text":"message then token contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2260s"},{"start_seconds":2286,"text":"so that's a flow in three steps you see that bro yeah so yeah um so we have this three step it could be a promise","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2286s"},{"start_seconds":2294,"text":"another way another set up so that's one place we put elements here um but basically it's just a little more like work yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2294s"},{"start_seconds":2302,"text":"i just want to say that it's a typical continuation passing style so so instead of like along along with the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2302s"},{"start_seconds":2310,"text":"with the call you pass the control flow so this this is not a callback in a classical sense it's more like a continuation you just ask okay so this is this is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2310s"},{"start_seconds":2318,"text":"what you're going to do next the the course doesn't have to be put in a stack indeed they they can be arbitrary routed so and yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2318s"},{"start_seconds":2327,"text":"that's uh that's pretty much what you do yeah so you say tell this address what your name is okay good so i'll tell you i'll just what","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2327s"},{"start_seconds":2335,"text":"name is i'm done so yeah i'm going to uh move a second it's time to rain here","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2335s"},{"start_seconds":2351,"text":"okay keep talking i'll turn the video for a second oh sure um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2351s"},{"start_seconds":2361,"text":"at least the computation which was going on here is a very typical uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2361s"},{"start_seconds":2368,"text":"asynchronous computation so exactly see and what what you do here is requires certain computation models so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2368s"},{"start_seconds":2376,"text":"so these calls are not actually caused they're more like in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2376s"},{"start_seconds":2389,"text":"pretty well but maybe not so common to many programmers today","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2389s"},{"start_seconds":2396,"text":"i think i know that at least 13th is some form of like uh accordions in kotlin for example","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2396s"},{"start_seconds":2404,"text":"is an example of of simple cps international passing style uh callback","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2404s"},{"start_seconds":2412,"text":"uh represented in more in more natural way and i guess but i guess for these","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2412s"},{"start_seconds":2419,"text":"distributed aspirin systems uh like the blockchain especially","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2419s"},{"start_seconds":2426,"text":"with the cosmos um what we have is very it's it's not normal to be synchronous so asynchronous is","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2426s"},{"start_seconds":2434,"text":"absolutely uh expected behavior but uh yeah it could also mean uh the like uh in in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2434s"},{"start_seconds":2443,"text":"in a typical in a typical c or python or java program calling is a very cheap operation and i guess that's no longer the case for","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2443s"},{"start_seconds":2451,"text":"um for the contracts calling each other so calling uh calling someone else","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2451s"},{"start_seconds":2458,"text":"can be expensive it can fail it can it can break for like multiple reasons so so so whenever you program you can","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2458s"},{"start_seconds":2466,"text":"always be prepared that this call didn't succeed and this probably has to be expressed in uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2466s"},{"start_seconds":2474,"text":"in a developed development tools so yeah we want the language to capture that so the point is right now we kind of we still synchronously we do this mainly","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2474s"},{"start_seconds":2482,"text":"for guarding reintroducing um in the local model but with ibc you actually have this yeah unbounded message passing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2482s"},{"start_seconds":2489,"text":"so uh basically every contract an ibc basically say i will commit an intent to call this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2489s"},{"start_seconds":2496,"text":"contract on my blockchain that does it really to know that blockchain process of the blockchain result has to happen at blockchain the result the message that when it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2496s"},{"start_seconds":2505,"text":"comes back to us is really back to us that could take 10 seconds it could take three days i don't know um you are guaranteed to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2505s"},{"start_seconds":2514,"text":"eventually get either an error or a um you're basically not cared you're going to get an","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2514s"},{"start_seconds":2522,"text":"error or result back from it as long as other blushing progresses so you have a timeout for two days for example and you have to see the other blockchain has passed high x","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2522s"},{"start_seconds":2530,"text":"little blasting at his side actually out ever processing a result then we know your result will never get processed so we could just you know call it a failure","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2530s"},{"start_seconds":2537,"text":"um so it has this and that message passing is this message passing to return a message to be processed um and then you don't just say well if","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2537s"},{"start_seconds":2545,"text":"it fails my transaction rolls back i actually hold an immediate state is one level more complexity so i have a i have maybe uh this message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2545s"},{"start_seconds":2553,"text":"in process i have 10 different different messages in process um and waiting for the results and maybe they get rolled back so like if i want to send money from you to some","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2553s"},{"start_seconds":2561,"text":"other thing i say well your account balance is reduced in some temporary state reduced but i have this temporary callback you know","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2561s"},{"start_seconds":2568,"text":"state here and if the other one succeeds then great that i actually remove it and if i don't then return it back to your account because it failed","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2568s"},{"start_seconds":2576,"text":"so that's another level of complexity which we will be adding uh in the next months uh when you have ibc support is getting uh ready for","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2576s"},{"start_seconds":2583,"text":"production um we're still waiting for the underlying ibc support in underlying sdk we're working on that one so we're working that but","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2583s"},{"start_seconds":2592,"text":"that's a very that will have to take the same message so we want to build all the tooling around this concept of sending messages around uh and not just you know calling","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2592s"},{"start_seconds":2599,"text":"into it because that we need the conceptual understanding there to be able to build multi-chaining um contracts um i'm also very curious how","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2599s"},{"start_seconds":2608,"text":"you use promises you kind of have multiple shards and you have promises over that so i'm curious how you abstract that yes i think promises is rather weak form of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2608s"},{"start_seconds":2616,"text":"of cps cps programming so so which paradigms do you actually use in your sdk","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2616s"},{"start_seconds":2624,"text":"is it actually futures promises or something","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2624s"},{"start_seconds":2629,"text":"maybe something closer to core routines or maybe something closer to i don't know","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2629s"},{"start_seconds":2637,"text":"like traditional callbacks so yeah this is pretty wrong return messages so the interface here if","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2637s"},{"start_seconds":2645,"text":"you do something like this handle takes environment you know called dependencies environment the message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2645s"},{"start_seconds":2652,"text":"yeah and it returns uh basically a vec of we call it cosmos message","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2652s"},{"start_seconds":2660,"text":"more or less that is what we have um if you're following here this means we take the basically depth is our","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2660s"},{"start_seconds":2667,"text":"storage access or api access barrier environment is this dimension the block height who's calling it messages over data we call it into it you know this is our","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2667s"},{"start_seconds":2675,"text":"thing and return a set we didn't know there's an error as a result actually not this is something result it's actually a little more","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2675s"},{"start_seconds":2684,"text":"complex than this but it can error or concede if it sees it returns a list of messages and um and that's all you do so this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2684s"},{"start_seconds":2692,"text":"actor model right turn it and then then the runtime takes messages and dispatches them in the same transaction um and those are also just other ones it","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2692s"},{"start_seconds":2700,"text":"keeps running to runs of gas somewhere along the lines or it's finished all the messages on the stack and then it's finished and if everyone's succeeded and they've all","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2700s"},{"start_seconds":2707,"text":"processed it then it goes and says commit this transaction successfully if anywhere along the line it runs out of gas or one of them says hey i don't have this message the whole","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2707s"},{"start_seconds":2716,"text":"transaction fails so you can build large systems but yeah anything of course anything fail the bigger bigger it is the easiest one thing to fail","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2716s"},{"start_seconds":2724,"text":"and then simply ethereum if you call it the contract it runs up gas somewhere um so so i have two related questions","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2724s"},{"start_seconds":2732,"text":"for such a uh for such a primitives uh yeah uh how do you expect people to reason about them and how do you expect","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2732s"},{"start_seconds":2741,"text":"people to test them for uh like for complex scenarios like for example when only one of the messages fails and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2741s"},{"start_seconds":2750,"text":"and so on so so uh i think the the hardest part about about such a such a vectors uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2750s"},{"start_seconds":2758,"text":"would be probably a correct handling of all the uh all the possible outcomes both in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2758s"},{"start_seconds":2765,"text":"reasoning art and in testing part you can for some about some systems it's very hard to reason and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2765s"},{"start_seconds":2772,"text":"and sometimes even when you reason write you you cannot test it properly that's still a problem if one thing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2772s"},{"start_seconds":2780,"text":"fails doesn't matter because we say if any failed over the whole transaction so we make basically a snapshot of the database and you're working on a cache","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2780s"},{"start_seconds":2787,"text":"a temporary weber temporary database and you know temporary transaction and the whole transaction","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2787s"},{"start_seconds":2794,"text":"gets rolled back if any of those messages fail anywhere so you can write that message saying i can make these changes optimistically","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2794s"},{"start_seconds":2803,"text":"assuming those messages are going to all succeed because if those messages fail then what i did got rolled back so it happened like i never handled this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2803s"},{"start_seconds":2811,"text":"right so so that's our assumption our critical assumption is if anything fails the whole thing rolls back yeah right but how about composability","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2811s"},{"start_seconds":2819,"text":"so imagine you wrote a contract which which has certain like set of outcomes but it is being called as a uh from some","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2819s"},{"start_seconds":2827,"text":"other home yes and so as a result even if it like the inner transaction is not failing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2827s"},{"start_seconds":2835,"text":"the whole transaction uh fails so so to make to make uh uh a synchronous system","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2835s"},{"start_seconds":2842,"text":"like that composable so that you can actually uh reason about how do how do i call from function a function b","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2842s"},{"start_seconds":2851,"text":"and and so function b always work your whole system must be composable so it's not always","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2851s"},{"start_seconds":2858,"text":"that this is like a top level call which is performed on on a button click by user it sometimes may happen as a result of some other","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2858s"},{"start_seconds":2866,"text":"software call so you're right that's what you tested so right now the test we have is basically we launch the blockchain and run those","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2866s"},{"start_seconds":2874,"text":"contracts together um and then work out now is integration test actually even in russ unit tests not even wasm just run those and say like i have these","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2874s"},{"start_seconds":2882,"text":"five different contracts i want to string them together in this way right i assign these contacts to the addresses and whether this is a malicious efc-20","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2882s"},{"start_seconds":2890,"text":"token contract on the address or or it's a good contract or whatever else i can assign these addresses and then run the test on it so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2890s"},{"start_seconds":2898,"text":"that's what we're working on right now one thing working to allow this integration test levels to happen easier for testability of it so it's not hard","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2898s"},{"start_seconds":2907,"text":"all you basically say is you set up a system with this code and this state assigned to each address so basically an address a contract","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2907s"},{"start_seconds":2915,"text":"is a set of bytecode and a set of state the current state so you can initialize them all and set the current state of these ones and then run","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2915s"},{"start_seconds":2923,"text":"that um and just have a little a small mock run time uh in russ so it can run in the same test as their code","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2923s"},{"start_seconds":2931,"text":"which would then basically take the message we dispatch them handle the errors roll back the whole thing on failure um so i'm working on that one and it's definitely testable um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2931s"},{"start_seconds":2940,"text":"it's a little harder to look at some types to make usually all like nicely abstracted but the concepts are the testable um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2940s"},{"start_seconds":2948,"text":"what i feel it is basically writing it that people remember how to write it this is like a lit it's not natural i guess if you used to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2948s"},{"start_seconds":2956,"text":"call in contracts right if you're used to calling it it's not natural like that's my caller's thing why i have to return a message that does that thing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2956s"},{"start_seconds":2962,"text":"um it's more of a mental i think this is more of a buried entry than a reasoning thing um in the end","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2962s"},{"start_seconds":2970,"text":"basically i assume that um all those calls at the end of it basically are just saying you know do this if air fail effectively what you","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2970s"},{"start_seconds":2979,"text":"have is uh you just call this message and a question mark operation at the end of it is what you're doing in your end of your","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2979s"},{"start_seconds":2985,"text":"end of your code um so it's something's harder to reason about about those these contracts","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2985s"},{"start_seconds":2992,"text":"um than calling them uh because yeah the same call stack if you think of the same call stack testing is definitely harder we need to run time","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=2992s"},{"start_seconds":3000,"text":"for it and that's one thing we're working on um now there's some people built uh actually a funny tool called simulate which is uh uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3000s"},{"start_seconds":3008,"text":"which will take these contracts and addresses and then you can interactively send messages them and try it out manually um i want to make more unit testable very low level unit testable","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3008s"},{"start_seconds":3016,"text":"plus stack traces um but yeah so we have some tools on that right now most of my tests are basically running in the blockchain and running go","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3016s"},{"start_seconds":3023,"text":"tests against their goal blockchain with these contractions installed and actually a related question is about debuggability","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3023s"},{"start_seconds":3031,"text":"of uh it's i think it's a pain point not only like for for any particular blockchain but i think uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3031s"},{"start_seconds":3038,"text":"for most or almost all blockchains uh suffer from uh from hardness of of debugging","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3038s"},{"start_seconds":3046,"text":"anything in trivial so do you take any special measures here in an area of debatability i try to make everything testable in","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3046s"},{"start_seconds":3054,"text":"unit tests so i use rust unit test so like the contacts just found out they can you know compile them as rust and just run them and get full stack case and everything is beautiful","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3054s"},{"start_seconds":3062,"text":"um and then you run it in integra you compile it to walls and then you run that in a little runtime and suddenly you get like just vm failed when it panics","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3062s"},{"start_seconds":3070,"text":"so a divided by zero error which would be actually give you a panic and in rust will just give you vm fails because if you divide by zero vmware just like kill the vm with the","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3070s"},{"start_seconds":3078,"text":"trap and then you don't get a message you don't know why right so the panics and stuff like that inside the the wasm become opaque which is really annoying","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3078s"},{"start_seconds":3086,"text":"actually um so i tried a bunch of those and when you see anything like that all you have to do is for me i look for any unwrap statement or anything you can possibly","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3086s"},{"start_seconds":3093,"text":"panic and just look for those and half of those um so i like having the rust testability um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3093s"},{"start_seconds":3101,"text":"what the other thing we do for testability is we took json which is a much maligned and actually i personally also malign it uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3101s"},{"start_seconds":3110,"text":"but universal human readable format so all the messages are in that format and their turn value is too so if you look at the msg here","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3110s"},{"start_seconds":3117,"text":"um and handle is basically this is just a serialized json as an object actually parse it here but it's passive the wire is json","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3117s"},{"start_seconds":3126,"text":"and this constant message is another object that seals json um so you can easily add in and maybe i should do that","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3126s"},{"start_seconds":3133,"text":"as a log level um into the runtime so every time you call a contract it says what the call is and every dispatcher can be there she","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3133s"},{"start_seconds":3142,"text":"could log say i called default contact this set of arguments it dispatched create token contract with this of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3142s"},{"start_seconds":3149,"text":"arguments uh get token contract was called this argument and it created called uh uh uh informed created","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3149s"},{"start_seconds":3157,"text":"on the d5 contract with this sub arguments and you can print that out uh it's not in binary so it's pretty easy to print and log files so that's one thing we've definitely had","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3157s"},{"start_seconds":3165,"text":"um for debuggability and i turned that off a while ago it was definitely early on i was printing a lot of these json documents just straight up and","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3165s"},{"start_seconds":3172,"text":"reading them as i was writing stuff um but since it's been stable for a while and tested everything i turned all that off uh but it actually is for this big","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3172s"},{"start_seconds":3181,"text":"composition very interesting to turn a log log level back on so people can run the blockchain uh with a high level log level and see all those um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3181s"},{"start_seconds":3188,"text":"all the messages going back and forth between them and recreate what happened mm-hmm","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3188s"},{"start_seconds":3196,"text":"okay that's uh that that's that's pretty nice that you have at least this this kind of uh like uh development","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3196s"},{"start_seconds":3204,"text":"instruments um on our previous uh wordpress session or we were discussing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3204s"},{"start_seconds":3212,"text":"i'm sorry uh we were discussing their uh uh runtime uh verification","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3212s"},{"start_seconds":3219,"text":"as a mechanism of of solving at least partially uh the dependability problems so","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3219s"},{"start_seconds":3227,"text":"uh do you believe in any form of formulification in your in your system or","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3227s"},{"start_seconds":3234,"text":"maybe you already do have some additional checkers which uh simplify the development of smart contracts i mean formulation is beautiful i love","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3234s"},{"start_seconds":3243,"text":"it and i think right now it um i saw someone talk to people doing that and it's really cool stuff actually it wasn't directly uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3243s"},{"start_seconds":3250,"text":"but having a json parser in there or a borscht box or any parser basically blows up the whole whole thing right so for passing uh eight byte uh","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3250s"},{"start_seconds":3258,"text":"human 64 um over a call and we can knock that out but if you're passing large sales obviously parsing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3258s"},{"start_seconds":3266,"text":"them the verification includes a serializable parser so i think it would make sense to take if you have actually um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3266s"},{"start_seconds":3275,"text":"non some math you could take the math the actual logic inside of it and formally verify some subset of that logic um again in rust not","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3275s"},{"start_seconds":3282,"text":"wasn't because compiled wasn't would include all the sterilization stuff on top of it and the hooks and the memory management all that stuff um","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3282s"},{"start_seconds":3290,"text":"so it seemed pretty hard to formally verify the actual wasm the rust itself is interesting","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3290s"},{"start_seconds":3296,"text":"um and i would definitely uh love to see if you could pull out like just the functional parts you're doing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3296s"},{"start_seconds":3303,"text":"and formally verify all of those um and maybe that's doable um i'm not sure unless i've tried doing formal verification stuff was basically the liquid haskell interest","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3303s"},{"start_seconds":3312,"text":"which is a very different uh system than rust um and that's cool the paint types is cool i think it definitely can do a lot of stuff and i found some interesting bugs you can","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3312s"},{"start_seconds":3320,"text":"prove mathematical theorems a lot of this stuff however i feel is smart contracts often more business logic","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3320s"},{"start_seconds":3328,"text":"than math so i can prove a d tree that maintains certain variants but proving what are the variants of unison contract what are the invariants","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3328s"},{"start_seconds":3336,"text":"of it what must never fail i'm not sure it will go up and down the price will go up and down the amount of money reserve will change","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3336s"},{"start_seconds":3344,"text":"is there an invariant you can mathematically say this and very much always held true for every subcontract um and then we can guarantee that if the state is in this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3344s"},{"start_seconds":3352,"text":"state and this transition happens you'll always remain in a state um and those invariants will always be true so i think you need to find this","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3352s"},{"start_seconds":3360,"text":"mathematically and i think for many uh smart content for developing you don't really come from the mathematical proofs you're not coming","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3360s"},{"start_seconds":3368,"text":"from a mathematical object you're coming from some business domain and you're trying to turn business logic into a contract which is fine that's that's basically what we're doing","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3368s"},{"start_seconds":3376,"text":"most of the stuff is building apps and business logic into contracts and for that formalification for me seems overkill","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3376s"},{"start_seconds":3383,"text":"it makes sense if you have a rocket that's going to a moon and there's very clear mathematical proof of what you need to do everywhere it makes sense if you have a","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3383s"},{"start_seconds":3392,"text":"binary tree or you have a database possibly which has a very strong controls of what it should do it should commit in this order it should never fail this thing if transactions","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3392s"},{"start_seconds":3401,"text":"you know shouldn't have too parallel or the same data without causing some some roll back somewhere um the lock should maintain so you can have a set of","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3401s"},{"start_seconds":3408,"text":"invariants that must hold true for your database uh any possible discorruption state you should either uh be able to repair the corruption or","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3408s"},{"start_seconds":3417,"text":"be able to detect it's corrupted it will not blindly right so and you know there's things like that like a","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3417s"},{"start_seconds":3425,"text":"quick test in rus which does some cool checks like that to fuzz your stuff right which i think is actually an interesting way of doing some","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3425s"},{"start_seconds":3432,"text":"large testing which i think will cover a lot of what people want to do with formal verification right so um i think that'll be cool i'd","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3432s"},{"start_seconds":3441,"text":"love to have quick check tied into like these basically um systems of contracts okay yeah so i","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3441s"},{"start_seconds":3448,"text":"guess we have very interesting discussion we tried to limit ourselves to","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3448s"},{"start_seconds":3457,"text":"usually something approximately like like one hour to not uh not make people too much","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3457s"},{"start_seconds":3463,"text":"bored sorry so i guess uh i'd love to say thank thanks you for coming thanks thanks for","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3463s"},{"start_seconds":3470,"text":"uh very very interesting intro for sharing your experience with the multi-chain so thanks a lot","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3470s"},{"start_seconds":3479,"text":"thank you for having me here to talk","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3479s"},{"start_seconds":3485,"text":"yeah","url":"https://www.youtube.com/watch?v=IIMnxRU8RPY&t=3485s"}],"youtube_url":"https://youtube.com/watch?v=IIMnxRU8RPY","url":"https://near-pedia.xyz/videos/IIMnxRU8RPY"}