Back to videos

More on Smart Contracts and Some Housekeeping

Monday, September 6, 202129:4775,574 viewsWatch on YouTube

Full Transcript

hi everyone this is Charles hoskinson broadcasting live from warm sunny Colorado always warm Always Sunny sometimes Colorado today is September 6 2021 and today we're going to talk about smart contracts yay smart contracts so anyway by popular demand we're accelerating some blog posts and other things just so that we can put to bed some things that have been said this space has never ceased to amaze me we have a test that and something gets deployed people see that one thing that's deployed and then assume because that thing is not doing what they wanted to do that somehow the entirety of all of our laborers and designs for the last four years are broken that's just how this industry works and that's how people think and how fast bad news spreads or or inaccurate information spreads and it's just demoralizing as hell sometimes the utxo model is not something we invented it came from Satoshi and Bitcoin has been using it for 12 years successfully and there's been a gargantuan amount of research with that model from block stream with Simplicity and their Jets and what they're doing with their liquid side chain to the bitml project to what's been going on Lightning community and discussions there to obviously us and what we've done with extended utxo and what Ergo has done with extended utxo there are some extraordinarily good properties with utxl and those properties allow you to write proofs very very beautiful proofs quickly and accurately and verify certain things about your smart contract and so I wanted to make this video real quickly just to show you a few things that are floating around and let me go ahead and just grab two more real quickly but I downloaded a paper earlier today and I just want to talk about the complexity of smart contracts so usually what happens in an academic domain for something new and exciting they read a paper and it's usually a survey paper a comprehensive survey or also known as an sok paper systematization of knowledge okay so I got that one right there let me grab another one contracts okay yeah there we go all right so let me go ahead and share my screen and I'll show you guys a few things here add up down here's green wow okay quit slack so we don't get interrupted by messages all right so first off we are writing documentation about plutus applications and if you go to plutus.read the docs.io they're they're writing lots of things and so they've just started a how-to guide on how to write scalable plutus applications and it talks about a bunch of different concepts and talks about this concept of utxo congestion if you're coming from the account space World there are things you have to do in a utxo model to ensure that your app doesn't fall victim to congestion and we discussed some best practices like minimize the number of transactions that are trying to spend the same script output certain people didn't do that to couple the spending script outputs from producing script outputs certain people didn't do that and use a minting policy scripts and tokens and then what we're going to do is work with some of the partners and actually beef up the examples section so bookmark this and over time more and more will be added to it now it's really funny that a lot of people in the ethereum space seem to be just brutalizing us and say well utxo can't scale well utxo and accounts are interoperable with each other how do we know that well we wrote a paper about it back in 2018 it's called chimeric ledgers translating unifying utxo based and account based cryptocurrencies and we actually have designs where you can run both accounts in utxo on the same Ledger and we already implemented that with Catalyst actually the rust implementation of cardano has a fully compliant chimeric ledger so you can run accounts if you want to they have some properties that make them a bit more difficult to Shard and scale utxo is actually a significantly more scalable model so it's just bollocks when people say that this model is somehow more limited and if you want to understand this paper there's a lovely video made by Sebastian from dcspark talking about chimeric ledgers and how the paper works it's about 34 minutes long and there are Community projects for example this was proposed for nervos but we're all in conversations with mune about doing an account view for cardano for the extended utxo and they have this lovely paper that they wrote a v o u m for nervos account view on utxo and kind of explain how it would work and starting a proof of concept so those things are being built you don't need an account view for concurrency with extended utxl there's a nice little blog post that Sunday swap row called concurrency State and cardano and they talk about this entire problem and as daps get deployed on the mainnet and test net people are going to learn about parallelism and there's numerous papers about this how however there's one really cool paper that stands head and shoulders so this is a comprehensive survey paper it's an sok paper that came out of China and basically what they did is they reviewed over 150 Papers written about smart contracts and they put their learnings together in 51 pages and this covers everything from the design of smart contracts to off-change Solutions so you can see all the design tools design patterns you see look at all these things private contract execution off-chain channels extensions to core functionality if you want to know about smart contracts and what is the state of the art and the problems that smart contracts are facing this is the paper to read it's an amazing paper it's very well written and very well put together and it just hits you with everything for example when they talk about design paradigms lotteries and loaning contracts and off-chain competition storage auction e-government they give you a whole bunch of references of where to go where things have been tried and they kind of give you a sense of what's been deployed on bitcoin and ethereum now what's the point well the point is if you scroll all the way down it's 51-page Behemoth that tries to look at everything that's been done in industry so everybody's mentioned in here all the way down all the way down private Consortium okay patterns review where is it yeah here we go in conclusion according to our survey problems such as privacy leakage execution efficiency and contract complexity have restricted the application scenarios of smart contracts we conclude challenges for smart contracts should be universally adopted into five aspects one frequency frequently occurring vulnerabilities this has lost literally billions of dollars throughout the history of the space two incomplete design paradigms so guess what no one's solved that yet three inefficient analysis tools four low processing rate and limited contract complexity and five lack of privacy okay so when we designed extended utxo in plutus we knew these things because we did a similar survey internally and we looked at all the different systems that were floating around and we asked ourselves how do we build a foundational system that has certain properties about the system that allow us to deal with frequent vulnerabilities that we see again and again the have canonical design paradigm times which are reasonable make sure that we have great analysis tools and that we have a model that allows for high processing rate and also dealing with contract complexity especially off chain and of course increasing privacy over time so it turns out that the extended utxo model is the output of that okay it was built for concurrency it was built for interoperability it was built for analysis especially with plutus why because plutus comes from the Haskell World which is one of the most beautiful languages when you want to deal with formal methods and formal verification it's no coincidence that a lot of the people that are in that industry they don't program in C plus plus they program in Haskell or ocamel or another language there because there's so much more you can do when the programs are written with that style Okay so over time three months six months nine months people are going to learn more about how this model works and build tools and abstractions and templates and design patterns for this model and right when you launch the model is not the time where everything gets flipped on because for the last few years everybody's been drinking from the accounts cup and now they're having to translate over to a different way of thinking those who can't translate over you build abstractions to allow them to stay in the old model okay and then when you talk about the power of parallel execution here's an example of a great paper it's called Ace asynchronized and concurrent contract execute a concurrent execution of complex smart contracts from eth Zurich which is the Harvard of Switzerland great All-Star team that wrote it and they've been doing some very interesting work long and short is that they came up with a way to allow the off-chain processing of all kinds of contracts massively accelerate them using a trust model of M of n signators for off-chain processing well here's the beautiful part about papers like this models like this which is what we're exploring with Hydra and other such things we have over 3 000 stake pools to operate as accelerators so what's nice about this whole plutus model is that it allows you to very clearly box off what you want to run off chain and what you want to run on chain and if you actually take the time to read this systematic paper you find out that you need both because there's just simply too much State data and other such things that if you're running everything on chain it's going to horrendously bloat and slow down the system computation on chain is horrendously expensive and no matter what people tell you or their favorite oh we've solved all these problems what they're really doing is that they're off loading some of that to some Central actors somewhere okay that's just the reality because that's the problem with replicated computation so you have to move from replicated to distributed and you can do that in a Federated sense you can do that with a side chain you can do that with clever cryptographic systems like Roll-Ups you can do that with State channels you can do that with novel new ideas like Ace for example when we designed extended utxl and when we designed oroborus and when we designed the entire plutus model we knew about these things and we built the entire system specifically for these types of things and we're not making things up we looked at where Bitcoin started 12 years ago and we saw the evolution of that system and we looked at the theory behind these types of things and it's deeply rooted in 40 Years of history and formal methods and 40 Years of history in the functional programming space so there's all kinds of paradigms that can be used to create concurrency and scale like functional reactive programming or other such things okay but these are not paradigms that a JavaScript programmer is fully aware of so what you do is over the next three six nine months you have a core of very smart people yeah who basically learn and teach and as they do that things like this grow okay so you get all kinds of cool stuff and of course we'll keep dropping little factoids like this is a Blog that's coming out today no surprises transaction validation on cardano Cardinals extended utxo model enables the deterministic nature a plutuscript execution by the way determinism is something mentioned in this paper as a huge lingering problem of the ethereum ecosystem and something that people have to spend a lot of time effort and money to solve we get that for free look at that okay so we built this model so that over time people can learn now what happens is as the spiral continues to grow every checkpoint every hfc event we add more capabilities so that things like this turn on things like this turn on and then what happens is those abstractions those templates those patterns those reusability they become models that other people can use and the implementation complexity of applications goes down cardano's a new model and it's built with a lot of very carefully thought out design goals in mind and we didn't just build all these things by accident we built these things with a clear direction of interoperability a clear direction of segregation of the off chain and on-chain components a clear understanding of predictable cost of execution keeping as much local as possible as opposed to need of a global state these art design decisions that are made and I'm sorry you're just having this dunning-kruger across our entire industry of these people running around saying well we saw one thing and it doesn't work or doesn't seem to work and therefore everything you've done is wrong guys that's not how the world works and that's not how development works this is a very complex thing and there's a reason why you have to think so deeply about this because think about the nature of these systems Millions to billions of users concurrently accessing it a trust model where every one of those users is trying to look for an advantage and break the system only one has to figure out how to break it for the entire system to break you have to share a common resource amongst lots of people and you have to balance permanent things that are being stored forever with ephemeral temporary things that are used as intermediate things during an event and representations of that history get stored and saved put all these pieces together into one system is one of the greatest challenges in engineering and the extended utxo model and what we've done with plutus I think is one of the most significant steps in that particular direction and if you don't think that that is your model then when we add evm and yellow to Cardinal then you can stay in that ecosystem or try out new ecosystems and this is not something five years into the future that's something that's going to happen next year after the initial roll out of plutus and we we get those three six nine months of burn-in and all those things done okay so that's where we're at and that's the reality and then when you look at Hydra papers like Ace boat exceedingly well for the model of Hydra this idea that you can go from a replicated system where resources are extremely rare and finite and are basically only at the the the the worst case Assumption of the processing power of your users to just distributed assumption where more users equals more resources and capability that's a truly scalable system this line of research is solidifying and there's tons of approaches that can be taken and what we've done with cardano and the orabaris model is we've created a situation where the set of people who can do these executions is growing as the value of the system grows right now it's two to three thousand and then in the future it'll be five to ten thousand and they're upgrading their systems all the time so that is one of the largest Collective computers that you could imagine to do a lot of this stuff off chain and not require a consumption of on-chain resources and they say well that's not fully decentralized let's speak very clear here Nothing in life is fully decentralized nothing not even Bitcoin there is a set of actors it could be a thousand it can be a million it could be 10 million you are decentralized to that model and what you need to be able to do is decide the level of decentralization the computation requires the smart contract requires do you need a million eyeballs on it is it okay to have five is it okay to have 10 sets of eyeballs 20 sets of eyeballs that is something that's scalable and that's the point of having services that are on chain off chain and they come together so our view is that all computation long term on chain should be proof verification and should be checking work as opposed to doing the work that's the only way you can build a global scalable system Excel utxo Works exceedingly well for this model if you have proofs and by the way solving a script is a proof predicates it checks against the validation logic and verifies it's correct ludus is literally constructed for this task when you want to talk about concurrency true concurrency is achieved when you have hundreds of different computers doing different parts of the same problem domain and then they aggregate the work together and provide a proof of it concurrency is never achieved on a replicated system okay that's why ethereum is not concurrent and super [ __ ] expensive and you certainly can do things and the best practice guide like for example spreading out the utxo and other things and those design patterns will be propagated here in other places and in tutorials and in the next generation of the plutus Pioneers program we'll certainly include more lectures on these things as the Corpus of knowledge improves and that's certainly a powerful thing and there's all kinds of things we can do to accelerate The Ledger and eventually you can even put theoretical constructs like concurrent State machines and other such things and you can get a great degree of concurrency on chain but relative to the size of all possible calculations and computations of the things that people are going to want to do or building a system where in mind there's going to be nation states there's going to be Banks central banks there's going to be exchanges there's going to be all kinds of things collectively creating billions to trillions of transactions every single day many of which you don't care about and have nothing to do with your particular business domain it makes zero sense to mandate that every single one of those transactions economic activity intermediate States and data below must be put into one shared space for every single person to see and deal with and by the way because privacy is required you're going to have to put those in encrypted forms so in many cases you can't compress them okay so you just get tons of noise that sits on the chain if you want to preserve inclusive accountability what you need to do is create a coherent model of how proofs can be produced that the things that are happening in all these different domains are accurate and correct and don't violate the principles of the system that's an example of mithril for chain validation and Hydra has all kinds of proofs for these types of things okay that's the point and then you the application developer and you the application user get to decide your trust model that you have the more value at risk the higher the burden of trust needs to be and that's a spectrum you can play with that's how we design the system if you want maximal trust you pay the minimal fee if you want minimal trust you pay the maximal fee relative to the load of the system and you can easily do that okay so this is a very complicated thing it's a again extraordinary to me that it's been reduced down to well you can't do what ethereum does when literally we're a superset of ethereum we will have the capacity for both models inside the system and a side chain running a hundred to a thousand times cheaper an ethereum virtual machine yet somehow we're inferior to ethereum it just makes no [ __ ] sense it's it's beyond crazy town it's just like these people are doing drugs in a dumpster or something like that I don't have time for this so blog posts are coming today and we'll and tomorrow and throughout the week and obviously the Launches on the 12th for the first generation of things and then there'll be lots of people building things and a great dialogue with the community we're all going to learn together with this dialogue and all kinds of cool design patterns will be found now let's talk about change management that's some of the other housekeeping that we have so as people build things there's going to be all kinds of suggestions about augmenting and extending the extended utxo model to include new capabilities like read-only utxo and so forth well the power of cardano is we have the hard Fork combinator which means that we can change the legend rules change the design of the system add more capabilities to the system with a degree of regularity that most cryptocurrencies don't have and it's a very painless change as you'll see on the 12th and so that feedback loop is especially important to us because very rapidly the extended utxo model will be enhanced and the more application developers the more people building things the more ideas that come those things will be take into consideration and gradually enhanced so there's an open question of how do we get from where we're at today to a fully formed CIP process where the community is voting on that I would highly encourage you guys to attend this Summit September 25th 26th we have a whole track for governance we have four tracks in the conference one about utility one about impact one about adoption and then the final track is about governance and there's in that track a big discussion of two major Concepts one is a bottom-up concept and the other is a top-down concept the bottom-up concept is called Catalyst and you eat sleep and know and breathe it and I think there's probably going to be more than 100 or 200 people looking for Catalyst funds presenting their ideas there and a discussion of all the achievements Catalyst has had throughout the year and last year the other the top down is this concept of a DCF a Consortium decentralized Consortium funding and so we're going to get very deep into that concept and provide a lot of clarity on things that we've thought but I think a synthesis of these two mechanisms one of wisdom of the crowd the other the domain expertise those two things together I think are going to encapsulate how Voltaire is going to to work next year because we're rolling out by showing Voltaire next year and those are the final parts of the original agenda to get cardano where it needed to go now a big part of that is getting the blueprints of cardano into cardano itself so right now we have formal specifications and anybody can find them and see them if you go formal specifications GitHub cardano there we go the other right here the very first result carnota Ledger specs okay so they're open to the entire world 6 000 commits they're actively being added and you have all kinds of things design documents for Shelley Allegra Mary Alonso the actual specifications and they're very involved specifications so let's open up one of them and you can take a look so this is what's shipping on the 12th Alonso the extended utxo the form of specification and the cddl okay look at this document it is 41 pages long see all the different people the dates on it and so forth and it goes into exhaustive detail with lots of mathematical Pros about the design of the system okay well this is implementation agnostic if you understand how to read these these diagrams then what you actually would be able to do is implement this in any language you wanted C plus plus python you can implement this in JavaScript if you wanted to we implement it Haskell because it's the closest to the math and so we can get higher certainty that there's no ambiguity in the implementation these designs we're going to build a bridge over the next few years to get them into the DNA of cardano itself so if you have a copy of the blockchain in addition to having the transaction history and all the use and utility at some juncture the chain will have its own DNA and so anybody who has a copy of that actually has the blueprints of cardano on it and then once you have that the same voting systems that can be used to vote for a catalyst proposal can be voted to authorize Version Control and the ability to update the specifications and then in the long Horizon many years formal methods can be applied for the concept of a certified client so proofs go on The Wire that the clients that you're interacting with are actually adhering to the specifications within so it creates an immune system that the cells don't have invariant DNA in the system so we'll talk about this at the at the Cardinal Summit and the many Summits to come okay so I hope this conveys to people the enormity of thought that's gone into this project this is not a fly-by-night thing this is as I keep saying an adult professional project you don't go and write 40 page documents that that are filled with mathematical prose and extremely intricate thoughts and keep to it for years and years and years and years if your intention is just to say okay bye everybody no we thought really carefully about the things that are mentioned in papers like this paper about the nature of smart contracts how people are going to use the system how abstract Concepts like choice and identity and metadata need to be integrated in how is compliance going to be automated in a certain respect and bake right into people's design patterns and flows so that they can interact with regulated actors and how do you do that while preserving principles where if people want to stay private they have the ability to do so it's the decision of the user that that's been the challenge and it's been a lot of work to get to where we're at what's so exciting about the launch of Alonso is this is the time where we get to see thousands of developers interact with us and rapidly evolve and iterate and what will happen is that you'll see specs every one of these hfc events is going to have a new specification and so this this list right here is going to grow and grow and grow and eventually that will be completely contained within the chain itself as the DNA of the chains you can see the evolutionary history of the system and totally controlled by the Democratic constructions of the system balanced by by domain expertise that's authorized through some sort of Representative process so I hope that gives you guys some clarity and I hope it gives you guys some sense of comfort about how we've we've put all this together and it is what it is if you don't it that's okay there's plenty of other options and choices if you do it well hopefully hopefully it works out for you it looks like somebody's joined this live stream Satoshi Nakamoto there we go forgot to require all guests to authenticate the live stream all right thank you guys so much for listening and the conference is going to be great I'll see you guys in six days for the hfc event thank you to all the developers been working tirelessly some other housekeeping we're going to keep chipping away at the plutus Pioneers program next iteration will come along with the prison pioneers and a little bit of maturity with the plutus application back end and we're going to build out those style guides and those concurrency guides and access control and all these other things so we'll have a more comprehensive set of lectures probably in October is when I think that'll come or November it just depends on how quickly Lars can move and we'll definitely work with the community and we'll try to get a lot of guest lectures from the eight development companies that were brought in to build and test and have fun with cardano as alongside Community projects like Occam and Sunday and so forth so that'll just keep growing and the ecosystem will keep growing I and the conference is digital you guys can attend it's I think summit.cardano.

Found an error in the transcript?

Help improve this transcript by reporting an error.