Building a Plasma MVP Chain with Cosmos SDK

EDCON 2019 · 12 Apr 2019 · 15:54

Sunny Aggarwal departs from the announced Plasma-MVP topic to discuss the Cosmos approach to application-specific blockchains. He explains sovereignty and interoperability tradeoffs, IBC and interchain standards, then introduces modular Cosmos SDK development, an EVM module and Tendermint consensus. The recording’s original description retains the planned Plasma title.

Speakers

Topics

From EDCON 2019, hosted by EDCON.

Transcript

sup X we have Sonny Agarwal Sonny's a research scientist at cosmos areas coming in look at that walk dancing queen he's gonna talk about building a plasma MVP chain with the Cosmo SDK alright hey everyone so I was originally gonna talk about building a plasma chain using cosmas SDK based off some of the work that some of my friends at a project called fourth state are doing but I realized I could not do that in 20 minutes I tried my best and I couldn't make it work so instead I'm gonna be talking a little bit more generally about pitching this idea of the inter train and then just

some of the general tools that my team has been working on in order to make this vision of an inter train reality and then how you know where theorem fits into this inter train vision so I'll go ahead and start off before we go into anything about blockchains just a quick you know some of you may have heard me do this pitch multiple times but now but like you know how I see the development of human history where we started off with these things like villages and kingdoms and they weren't able to like scale very large mostly you know I think historically economic growth comes from economic connectivity but the problem is you know for the longest time you could only trade with you like close by

neighbors and whatnot until you know empires came along and this was and humans have been building these Empire things for like thousands of years where we basically through mass political integration we were able to achieve mass economic integration but you know at the same time empires come with their own host of problems you know they tax their citizens heavily they you know have a lot of governance issues you know I just don't think they're very socially scalable and so I think the greatest innovation of humanity in the last hundred years was we learned how to do you can large-scale economic integration without necessarily large-scale political integration and so this is

what we have today this world of nation-states and city-states and you know there were a couple of technologies that made this feasible you know one was free trade zones things like containerization so like you know you go to any ship in the like shipping ship in the world or any port they're all designed to deal with this like same container format same dimensions everything and so this allows any port in the world to ship to any other port in the world you have institutions like the UN that are not a government but they're like a discussion forum for people to like you know debate and whatnot the internet obviously I'd probably don't have to make that pitch and so you know I would say that I see the evolution of

blockchain development in a very similar light progress where first we had these like generation 1 chains where you had like you know highly specialized change with each of their own specialized use cases like Bitcoin for payments named Quinn for DNS sia for storage but there was like very little connectivity between these you couldn't use your BTC to buy a DNS name you named Quentin dot bit name you couldn't use your dot bit name to point to a sia address a storage hash for example right when aetherium came along was and Bill built the first blockchain Empire where they basically said look by building everything onto this one chain you could have this like

you know mass connectivity between your applications which is really nice and so you know you get this nice composability of different applications in aetherium and you know you can use your cell your crypto kitty on 0x for some maker die right like that's pretty cool but you know I think same time I think aetherium also does come with some of its drawbacks where you know one there's a technical scalability issue here when you come to these Empire like chains we're like one chain that has many taps on it I think you also hit like social scalability issues we see this today with like a lot of the governance issues and even on the technical roadmap that's like hundreds of open e IPS many of which are like sometimes even contradictory with each other and so you

know trying to like you know the larger a system is it's just becomes harder and harder to take into the account will of like all the different stakeholders and you know so what we propose is this idea called the interchange where we want a number of specialized block chains each with application specific but still have some level of connectivity between them where they can send tokens or data or assets or things between them and so you know and I think the theorem is going towards this right now as well like we see the proliferation of these ideas like you know side chains to a theory even if 2.0 is a version of this as well

where you're splitting out into multiple shards or chains or even like plasma is a different model of this like all these ideas of using side chains may be with different security models but at the end of the day in my opinion they're all just side chains with interesting security models but you know what we propose is instead of having one system where there's a singular hub we prefer systems and works it's like you know not even a single hub you'll have like multi hub systems where you know and the relationship between different chains could be like you know some chains might have like basic side chain like security some chains might have plasma like security some chains might have like more shared security like pooled Security kind of systems and so you know there's and I think there's

gonna be like you know many different hubs in this inter chain ecosystem there's like you know we built one and just launched it recently called the cosmos hub but you know it has different trade-offs than polka-dots relay chain does so it has different trade-offs then theorems like beacon chain will and so I think like all of these different types of hub chains should coexist and basically have these different trade-offs and allow the inter chain to explore the full trade-off space and like the full space of different things you can designs you can do here and so to make this into chain work though the company I work for at Enderman we've built a couple of a bunch of tools actually to make this a reality and make

this help us move towards this inter train world faster but I'm gonna go over a few of them mainly these middle three so the first one is our inter blockchain communication and so what inter blockchain communication is is essentially it's a way of just really you know this is all complex text in order to just say it's basically doing side chains right like side chains is a very old idea a block stream proposed it like over five years ago now and the idea is you can have an on chain like client for another chain and you have a two-way and you know this has been you know people have built this many times like you know the earliest one on aetherium I remember was a BTC relay

where it had a BTC right a Bitcoin like client on the etherium machine and so really what cosmos IBC is really trying to do is we're trying to say let's try to make sure we can generalize this cuz when you talk you know when you do this like two-way sidechain system you have there's a bunch of things you have to figure out one is like you know you have to know how do you understand the header of the other blockchain what is its consensus protocol how do you understand the like line headers there then you know you don't know what kind of accumulator the other blockchain is using maybe it's using a Merkle tree maybe it's using RSA accumulator if you're using a Merkle tree what kind of hashing algorithm is it using so these are all things you have to figure out then also the packet format like you

know you somewhere in the state of the other blockchain is some packet but like you know what does that packet look like and so these are all things that need to be specified and to do this we've created this repo called the ICS repo interchange standards kind of and these will kind of develop similar to how your C's will develop where they'll kind of be these standards where the community will kind of settle upon them and so you know there'll be different your C's token transfers non fungible sorry different ICS is non fungible asset it's data you know different types of things and so really what we've been focusing on is the purpose what makes IBC specialists we're trying to make it this like very generic thing that's highly abstracted and we have like we have a

working group with like multiple teams you know ten durmand a goreck even prismatic labs who's one of the chief 2.0 turbo client implementers so really trying to make sure this thing this protocol is abstracted well enough such it could be adopted in many different change we and we you know we're willing to work with anyone to join this IB IBC working group in order to make sure we don't over fit IBC to anyone consensus protocol or one framework or whatnot we even have you know I think ripple is even interested in joining and so we're open to letting anyone join this IBC working group cuz we really want to create a properly abstracted a protocol here some more information you can learn

more about IBC okay so the next thing that we have is the cosmos SDK we're so theory um like I said I threw him did two things really it one was the whole interpretability and composability of applications the other thing it did was it just made it way simpler to write application so you know in generation one if you wanted to write a blockchain really your only way of doing it was to fork the Bitcoin code base and kind of like modify it and that's why all the early things were pretty similar to Bitcoin or like they were badly designed like you know named coin should not have been signed as a UK Excel system but it was just because it was a fork or Bitcoin and aetherium came along and allowed it to you know be simpler with

like solidity and stuff and this you know been a lot of development happening in solidity ecosystem to make the development process simpler but you know what we're proposing is this idea of you know we really believe in this idea of application-specific block chains we're you know I love smart contracting systems but I think they should be used for exactly what they sound like which is smart contracts if you're writing like a short term one-time-use thing then like you know you should be using smart contracting or smart contracts for that but if you're building large-scale long-term applications have like a high level of complexity you know we're building decks there's a prediction markets or you know any large-scale thing I really think it should be on its own specialized state machine not

running on this like sure and complete VM and you know there's lots of reasons for this but you know so some of the cool things about the cosmos SDK you know it's written and go so you can use all of the tooling and ID ease and everything that's been built around the goal and eco system which is really nice and it's this modular system has a bunch of cool modules you can pull and like as you develop modules for your application you can upstream them and so other people can like use the same modules you know we have some cool modules called like one of ours is staking you know we have this thing called bonded proof of stake really cool staking design but don't have time to go into it today you

can I if you want I can shoot you some links afterwards for more details so one of the cool modules that we built was an EVM module so one of the cool days what you know one of the things that we wanted to do was to test that to make sure that the cosmos SDK is a properly abstracted framework we wanted to see can we write an etherium client in the cosmos SDK framework and so that's kind of what our model here is with the EVM module and so we started to do that we have modules that allow it to be like you know completely web 3 compatible if you wanted to and so the idea is you can kind out we've been working with Alexi from turbo gas to bring in some of his ideas onto this but the idea here is

that so you know you can write your own you know many people have already started writing applications in solidity and they've already poured a lot of resources into this framework into the EVM framework and so with this nice is like you know you can import this EVM module into your own chain that's sovereign but then you know and slowly over time maybe you can pork some of it out of the EVM and into more native functionality as like standalone SDK modules so yeah and you know there's a lot of people already using the cosmos SDK to build stuff you know one that particularly like to highlight is fourth state labs it's a couple of my friends at blocks and at Berkeley they've used

the cosmos SDK to build a plasma sidechain plasma MVP implementation that connects two main net aetherium and you know they have a cool working implementation that you can go run today if you wanted to so at that repo and then there's a tutorial video where they kind of like walk through the entire process of using the SDK to build their plasma MVP chain and you I don't think the cosmos SDK is the only framework it's just one of many frameworks and I just think that like you know the SDK it's written go I think it provides just like nice middle ground between like you know security and ease of developer access and so but you know we highly encourage people to use the framework that makes the most sense for their use cases learn more finely tender

mint so you know don't want to go too much into the details of tender mint but you know it's a BFT consensus protocol you know I you know a lot of the Kasper research has originated out of some of the tenement BFT work that's been done and you know I think Casper's a really cool consensus protocol but the fact of the matter is tenement core is a consensus engine that exists today and it's like probably the first production-ready production-grade BFD consensus engine we've run it with hundreds of validators 250 validators over the global internet across five different continents with like you know sub sub 5 second block times so you know if you want a proper BFD consensus

engine today tenement core exists for you to go use and so you know the nice thing is you can write your scape machine on top of tenement core in basically any language you want we've had people write it in all of these different languages and you know so some of the projects that happen to be using Endermen core today so you know for example loom is using tenement core for their side chains to aetherium and it's not they're not really using you know the cosmos sdk they built their own sdk called loom sdk but they're still able to use this like production grade BFD engine to power their consensus you know other lot of other projects like Oasis hyper ledger borough is an

implementation of an EVM running pure directly on 10 Derman consensus so you know it's a full it's an existent BFT with VM which is kind of cool yeah so there you can learn more about Enderman BFT and some more about tenement core I'll post all these slides in like the telegram group or something afterwards so you can get all these links and yeah so that's about it come build the interchange with us let's tear down empires and build more sovereign and free more sovereign and free world as well as a more sovereign and free blockchain ecosystem thank you [Applause]