New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Running Meta Blockchains to Scale DApps on Ethereum by Benjamin Bollen

ETHBerlinWed, Oct 9, 2019, 12:00 AM

https://ethberlin.com https://decentralala.com/ https://goerli.net

Transcript

hi everyone it's good to be here again I'm very much in love the panel before spanked chain is amazing I'm here to talk to you about different chains meta blocked chains so a year ago we started open st we looked at the space saw the rise of a theorem and I was working in it for a couple of years already and so we judged that the value will come really from bringing people online so we set ourselves the message and aim to bring a billion new users to aetherium and we're going to do that by tokenizing mainstream applications but the requirements for that are that we need scalable programmable money and it also needs to be easy for millions of users to use and to adopt today and just earlier this week we actually moved version zero nine two of the protocol to maintenance but what I'll be talking today about is for the first time open a steam mosaic so we consider scaling to consist of three parts we want a scale for users to adopt the technology we're on a scale for developers to build against it with token engineering as a focus but it also needs to scale at the transactions per second that we can process on it theorem and so some of the alternatives a lot of people will know plasma but it's application specific and you run into data availability problem payment channels don't satisfy our solution because you can't develop smart contracts against them and then a lot of really good work has gone into Jasper sharding plus Casper Raul talked earlier today about ATM version 2.0 that is amazing work but it's future work it also has high six moving a theorem from version one to version two and so what we want to contribute today is mosaic there's a concept of token sharding which is layer two scaling ad on the existing aetherium and so also what I personally hope is that the work we're doing I strongly contribute and feedback on to and in both ways learning and and testing ground for a theorem version 2.0 so in the next few minutes I will try to explain to you what mosaic and a meta blockchain is and so I'll give you the concepts now and then I'll try to make them clear going forward so mosaic is a consensus protocol in order to run a meta blockchain on top of a term each meta blockchain runs in parallel in the state space executed in parallel and it injects that into a theorem and all of these meta block chains are secured by a theorem proof of work and with an open staked validator set on top of it theorem proof of work and it's important that all transactions are asynchronously finalized and also committed back onto a theorem and then lastly and this is actually a very interesting point too to refer to the earlier talk mosaic has a message passing protocol between a theorem and the meta blockchains so that we can actually talk between the probabilistic finalization of a theorem proof of work and the economic finality that runs the meta block chains and so the problem we're trying to solve is bringing millions and eventually billions of new users onto a theorem and the obvious answer is block chains do not scale but the apps have the same problem if we want millions of users to run on apps we need to make sure that it theorem skills and so actually the answer is quite clear the number of transactions finalized does scale linearly with the number of nodes if we can short the total space across the number of nodes and also if you can offset the overhead and cured by more nodes relative to to the gain you're making right and so the solution that we propose is to focus on a synchronicity to make sure that there are no time constraints between the meta block chain and a theorem proof of work and that's where we're to focus for this talk and so we derived the security of a theorem proof of work asynchronously to finalize and secure transactions on exhilarate chains and to give you a short sense of why this makes sense assume that a theorem runs at ten transactions per second and you would have a hundred of these axillary systems each fine running hundred transactions per second then you have 10,000 transactions and in a very simple model if there are 100 validators for a hundred exhilarate systems now you have 10,000 validators that need to commit to each theorem so that's 10,000 transactions I would take you 10 seconds I'm fully occupied sorry thousand seconds I'm fully occupied a theorem but you have also processed 10 million transactions I'm in 99.9% efficient but we can do a lot more a lot better because as I said the your your your benefit will scale linearly with the number of notes but also your costs will scale unless you can actually not require that you need to commit back to aetherium and so as an example if you would only commit back once a day you have 800 million transactions finalized you're only using 1.2 percent of aetherium and so on the less frequent you have to go back to a theorem the better for the system so let's do that let's move all transactions off of a theorem onto exhilarate chains but hold on side chains they've been around for a year what is what's new here right and so to make the point the meta blockchain is fully defined where the consensus engine in the core contract on aetherium it each meta blockchain has an open stake validator set it has Byzantine fault tolerant consensus rules that allow you and this is the interesting part to allow you to move the block formation of your meta blockchain off of a theorem onto an axillary system and then very importantly we have a gateway protocol that allows you to marry the probabilistic finalization of a theorem proof of work with the economic finalization on the auxilary system and all value is always kept on a theorem so that you can always recover so that's what we call token sharding it's an opt-in system where with ERC 20 tokens you can move some of your tokens into the axillary system and back out and what the gateway protocol absorbs or consumes is the state root of the opposing system and we do the same for OSC if you stake OST and move it into the axillary system then we actually turn it into the base token of that auxiliary system which you used to pay for for the gas price for executing your transactions and so what we get is a full native etherium interface you can write your normal smart contracts they are executed on chain but it is now scaleable and so that is what we have today on maintenance but the important point is we Oracle eyes this between the two chains and what the work of mosaic is that were presenting here is how to decentralize and that state root transfer and and secure the exhilarate chain with a theorem proof of work a very brief word because it is important on how the gateway protocol works so if you want to move some tokens it's a message passing system so you declare it on one side and you can only confirm it with a miracle proof against the state route of your origin system onto the exhilarate system and you would logically have to do that again to progress both messages on both sides and then it is logically sound so you can stake tokens on one side and mint them on the other side it's very expensive and long process because you're waiting for the state routes to absorb your your state transfer and so we can speed that up a lot by introducing a hash lock on both sides so once it is declared and confirmed on both sides you can progress it directly by revealing the secret and then orly also there is a bounty and a fee into this process so any message can always be completed by any other node because there's a reward structure for both sides to complete the message passing so with that said another quick introduction of Casper so that shared research I was by by vitalik and Griffith sorry butrint and Griffin I guess end of last year and so the important point that was put forward there is that in Byzantine fault-tolerant consensus we can actually reach consensus on what is a justified and a finalized checkpoint as I'll explain in a second on already proposed block so we take away where we can normally think of as the finalization procedure from the blue layer one validators and move that to a layer two validator set and so they do that by casting vote messages that identify a source in a target and their respective Heights and then you can as you see in a drawing you can be for each supermajority link where's 2/3 majority of the validators actually has cast this this source and target message you can build a justified chain and and also finalize the check points and importantly for each finalize checkpoint you know that you cannot revert the history unless they would publish contradictory votes and for those contradictory votes you can very easily slash their stake and so we achieve a layer two blockchain properties of safety and and liveliness which we will use in a second so what are metal blocks remember that a block is a mechanism of moving the state of one system from Sigma to a new state Sigma prime for proof-of-work you do that by finding the nuns that seals the block for proof of stake you can do that with a majority vote and so we define a new type of block namely a meta block is composed out of three parts it has a kernel a transition part an su and so a kernel because it's important this R has the height and the parent as you would expect for a normal block it also will specify the change to the validator set and interestingly I'll touch on this later there's a voted upon gas price that is valid for that whole block then the other part is the transition part and it specifies a dynasty number and the dynasty number for you know on the justified chain the ping chain you spank chain ping chain you saw earlier each time a checkpoint is finalized the dynasty number increases so you can think of it as a height but it increases by 1 every time you finalize a checkpoint and it also keeps track of the transaction route all the transaction effectively verifying all the transact well a local route of the full transaction list and the total amount of gas used and then our seal like a normal proof of stake Byzantine fault-tolerant system has a 2/3 majority of the weighted votes attached to it but how do we construct it now and by construction we'll also show the properties that I started out with and so we can do this recursively assume land the block h1 h1 has been committed then the kernel is already known in the smart contract the height the parent is obvious we have who we have a list of the new validators and we have voted on the gas price and in parallel and this is important it happens independently the same validators can be voting on the auxiliary system as if it was just a system on itself and produce a justified chain by having 2/3 majority links on the French checkpoints we can also track how much gas is used what the total transaction route is in the smart contract itself but then here comes the fun part now every finalized checkpoint on the auxiliary system has a two-thirds majority of the validators so you can actually propose a new block on Origin on on a Tyrian minute and there can be competing proposals but they're now no longer Forks of each other they're just proposals to commit back to a theorem at different heights on the justified chain on different dynasty numbers and then again because we're leveraging it here a minute we get automatically the property that the first proposal that confirms the two-thirds majority of the vote is the new meta block that is sealed and the only thing we have to do for that is extend the slashing conditions with a very simple trivial third slashing condition namely that you cannot commit contradictory transition objects and the interesting part of kaspar that we leverage here is that the slashing conditions are entirely defined on themselves if I see two votes it doesn't matter where I'm evaluating that they're there they're well defined by the vote objects themselves and that means that we can enforce the slashing conditions on it area minute and we can have the steak on it here a minute about the votes that have happened on the auxiliary system but if we have sticks to punish the validators we also need carrots and so we want to have build on on the existing systems that we know work and so the gas market works so users pay for the transactions they execute to what we call the proposers of the exhilaration right they they're the normal validators of that chain they they don't need to know about much else they produce the blocks and they received the normal gas price from the use but we additionally require them to pre deposit for pre-funding the meta blocks because now for all the votes that the mosaic validators cast we can have them be rewarded on the exhilarating and it gives us a very nice consequence that the validators have to vote both on the exhilarate chain and commit to a theorem in order to get to their reward so they have to be a full participant in the system additionally but we're getting bit in the weeds we have a gas target that forces the validators to commit back to a term I want to go into details but I can't so ask me questions later and also Valladares can join or log out so it's a dynamic validator set as you would want so why why do we build this right the first reason is now this gateway protocol can consume the state route finalized by the validators but the interesting part is that users and also contracts can now pass messages ERC 20 tokens specifically without any bridge or validator set confirming their specific transfer onto and off of the exhilarate system and importantly it's now also possible to just atomically swap them once they exist on the exhilaration you don't have to go through the expensive process you can just atomically swap very fast between and move across these systems and it gives us a way to scale the apps by an opt-in mechanism of moving into these exhilarate systems and across them but what happens when it all goes wrong and this is this is an interesting slide because this is why so so there's a lot of similarities between ATM 2.

0 and mosaic and where we can learn from it if you want to shard all of it theorem and the whole state space you cannot say this slide but because you're doing token charting and users can move in and out and the original definition of your token is on a Tyria minute you can actually cover for the case where the validators failed to reach consensus because now any last finalized checkpoint can always be brought by anyone to be a committed state on it theorem the validator said can be challenged that the meta blockchain has halted and all the value was always on it theorem itself so whether you come back one week later or one year later or ten years later of the value you had or the state you had on the exhilarate system you can always now present the proof that you had those tokens and release them from the gateway contract and recover them so there's no mass exit problem either and so to summarize we are currently with a hundred twenty developer teams on test net and more than ten of our external partners have moved quite recently now onto maynot for early testing with zero nine three we completed gateway protocol of cross chain messaging and right now our focus is on the open s CGS part so the centralized key management and and the token rules engine so I was on the token panel before and also we will start talking a lot more about music and so by the end of the month we will publish the paper right now we're soliciting feedback from from the community so please if you have comments give them or questions and so we'll keep building out all the whole stack and then early next year we want to go to alpha with mosaic and shortly after two beta to warm up the validator pool bringing more companies and more users online and then also very interesting I want to have smart contract calls between auxilary chains which we currently don't support and then we will put in a time lock by 2020 dad then the validator pool is fully in control of the tokens all sorry the meta blockchains and so thank you very much it's a great opportunity to like present this here for the first time and we'll be rich welcoming your comments Thanks

Automatic transcript — names and jargon may be misspelled.