DAPPCON 2019: Scaling Ethereum at Layer 0 - Aleksander Kuzmanovic (BioXrout Labs)

DappCon 2019 · August 2019 · 23:23

Aleksandar Kuzmanovic, co-founder of bloXroute Labs, discusses scaling Ethereum at Layer 0 at DappCon 2019. He covers how a global network of relay nodes can speed block and transaction propagation, arguing that network-layer bottlenecks limit throughput as much as the consensus and smart contract execution layers above them.

Speakers

Topics

From DappCon 2019, hosted by Dappcon Berlin.

Transcript

first thing first I'm I'm not a cryptographer I know about blockchains but I'm not a blockchain person hundred percent I'm a computer networking person okay I teach computer networks at Northwestern University so the good question here is why the hell am i here and why should you listen to me and so I hope that by the end of this talk I can convince you that you didn't waste your time and basically that this is what intent to convince you by the end of this in the next 20 minutes firstly I claim that we can scale a theorem today not tomorrow not in five months not in one year you can download our software

today and we are capable of pushing in Tyrion's dps rate to much bigger rates than where they are now ok I understand that you may be hearing about this kind type of statements for years from different people learning about different technologies but my claim is you can do it right now and as we speak actually a test is going on where we are actually doing what I'm telling that so the key purpose of my talk here is to tell you what is that we're doing and so you have some basic understanding and to kind of be able to download and use their software so that you can do you can utilize this I think one more Cabot this is that our our solution works equally well for proof of work or proof

of stake any in all other things that people are doing at layer 2 layer 1 in any other solutions that people are some of which we've heard I was listening to some of the talks on eat 2.0 and stuff like that all of that is going to work we are not competing with anybody we are just trying to help this community which I really have a high opinion of to actually move forward and actually do some real-world things because scalability is important and one of the thing we don't require you to change a single piece of code which i think is a big thing because because that helps you I mean that definitely helps with

adoption so I think III these are quite big promises so let me try to deliver at least at some of them so you'll judge whether I did it or not so before I move on why do we need scalability I mean I hope I don't need to spend a lot of time on on explaining this but I mean without scalability we this nor any other community blockchain committee will be capable of delivering the promise that they have right if you have three like Bitcoin has or idiom currently ten transactions per second I'm sorry that's not gonna work in the real world right because just to like as we know like visa has 5,000 TPS if you just count the

number of cars in US and you assume that each of them will fill a tank once a day just for that you need you need 450 TPS okay and for all these super cool and super new applications that everybody is talking about machine to machine communication smart contracts all of this stuff hey we really do need scalability for vouches and for a theorem in particular because it is one of the leading if not the leading of watching so let me give you let me tell you something that you likely know something some of these things even better than me which is so what are the scalability to scalability solution so I'll start from the top there is layer 2

solutions by people saying hey listen this unchanged scaling is too hard and it's not gonna ever fly so let's let's just forget about that let's try to do off change scaling ok and so there are many many attempts there and I'm not gonna judge on how good or bad they are and what I think and don't think about them I mean that's something that people are working on so long as people believe in those solutions it is pretty good and we are not again competing with any of those if these solutions are successful we are gonna be very happy as well ok then there are the so-called layer 1 solutions which is hey let's make us mother consensus protocol right so aetherium 2.0 is a perfect example and there are many other many other attempts

on many other different in many different protocols so what we are saying is that's a good direction keep doing what you're doing because we all have the same goal but what we are saying is that there is a forgotten layer here and the probe that it's forgotten is because we we couldn't even give it a number when we when we figured out it exists right because layers layer one was already taken right because block chains are are are are dominated by by consensus protocols are so important and hence when we came into play there were no numbers so we gave it layers here what is there 0

layer 0 is a networking source ok it's a networking layer and my claim is that it actually there is a huge it's a goldmine for scalability okay that is unutilized and forgotten by the blockchain communities etherium as well and so what we are into is giving scale to block chains by working on this network so you can ask yourself well ok that's pretty good but so what's wrong with the networking layer so let me give you a few let me explain quickly give you a few slides on what I think and what for what is wrong with a with a blockchain networking layer ok

so typically independently of if you give a proof of work of proof of stake the problem is the following you have somebody mining a block or generating a block or finding a block and then that a particular node needs to send this block to all other to some subset or all other nodes in the system ok this again depends on the consensus protocol but this is this is the generic problem ok and so typically there is some number of peers connected to this origin minor I'm gonna call it a minor and so this particular rock is being sent to all these other miners ok so for security reasons and many and some other reasons

it is good for this network to be as big as possible and it is good for this network to be random lacunae because then it's harder to break this networking soul okay so this means that this man can be for example in Europe and another node could be in China and a third one could be in South America that's a good thing from the security point of view from the performance point of view this is a horrible thing why is that because once you send a block from one node to another there is a number of different autonomous different networks governed by different people and hence the performance of these networks is cannot be guaranteed at all this is the Internet okay so what does that mean well somebody looking at Netflix is number in the middle of the on some

network that can affect the performance that you're gonna see when you're sending your blockchain your block from one to another nobody is gonna care and say oh this is a video we had to be careful because this is very important nobody cares about that right so the performance can be pretty horrible another bad news is that typically for the system to be secure and for us to be capable of really having a secure system the network needs to be big right so the question is how do you send information in a big network right so the default is peer-to-peer but the trouble is I told you about the problems that you have on a first link but once you pass this

first link there are many many multiple hops in which these peers kept to send this information to all other peers in the system depending on the consensus protocol and this now creates a large number of places critics in the wrong okay in addition to the networks and to these network links we are now dependent on what other miners are doing right miners may not be just like malicious to mess up with the data they are sending their performance may be just horrible right and the more scalability we need the more performance you're gonna need from these nodes and the worst performance is then whoever mind that block is gonna be dependent on what is happening in the rest of the net okay

and so I think the time is about for me to propose what it what is that we are doing how we're doing differently so that you can you can see the difference so what we are doing is we are building a system we're building a thing called a blockchain distribution launching distribution network is comes from from the word content distribution Ezra but I figured out like hey Syrians we know what they are but this is CDN for block chains so if we can have a city in productions we're gonna call it obedient how does it work let me just give you a few steps so you're gonna understand what is different from what you had in the previous page so in our case what we do is we put on a node we put an open

source code okay that to a miner or to any other node that is that accesses the theory of network looks just as another mind but this is a local walk out here that sits on exactly the same machine okay and then once that miner wants to send a block or transactions to the rest of the world it also sends this or this block or transactions to the to its local field which is a block throughout gateway to our own it okay now what happens then is that once this particular piece of data is handed out

to to the blocks or gateway it connects this gateway connects to our global network okay and it pushes data much more faster and I'm not gonna explain how and why it is capable of doing this much faster 10 to 100 times faster and then it is propagates these things to the Internet okay and so let me try to explain two main two key ideas on how do we achieve a really good performance with blocks route and what is difference am I really am I'm gonna try to give you the keys the first thing that we are doing is we are not blocks route is not just transmitting blocks when the ball

comes in aetherium it's a short block but still you still have to send this quickly because rocks are coming pretty often every 50 seconds or so so you need to transmit that quick a trick that we are using is that we are also pushing transactions ahead of time right because our gateways are connected to the miners are connected to the nodes whenever a node sends a transaction our gateway picks up this transaction sends this transaction to the network to all other nodes in the system and at the same time assigns a very short ID identifier a four byte identifier which is much shorter than what the original transaction size is okay why is this

important this is important because when the block comes which is the moment to speed up the performance of the blockchain system we are capable of significantly reducing the size of that particular block right why is that because assume that for example a transaction is 500 bytes basically in our world this becomes a four byte piece of data that needs to be sent to an end okay so this is the first and very important piece so just here they're capable of reducing the block size by more than 100 times okay the second thing that we are this is intended to impress you some very fancy red dots and

information showing information propagation I hope now that you're impressed I can move forward the second thing is that we are doing is is that we are actually applying some well-known streaming techniques but we are the first to apply this in the blockchain space okay so the thing thing called here is cut through routing this has been applied in network switches for four decades there is nothing significant in this on its own however the big the reason why we can utilize this technique is that because blocks out we are not checking the validity of blocks we are not gonna be the one to say oh this is the right thing this is

we don't have time for that we are trying to optimize for performance okay and given that so basically what we are doing we are doing streaming what this is showing is on the left side there is a minor which has installed our gateway it is sending a block to our server okay remember the size of this block is is much more much shorter than then it would be if it was the raw block because you're using this compression technique but it still takes some time some time to push this block onto the wire okay so this is shown on the y-axis because time is going south here in this particular space now given that our server cannot be at the same location but is a little

bit distant hence it takes a little time for that particular that of that block to reach our server however what that hooded figure is showing is that as soon as a few bits of that block are received by by the middle server which is Vauxhall server what happens is that it starts streaming this data immediately before it has received the rest of the day okay and so what can happen is that in this particular case you can see on the left side the center still didn't didn't finish sending the entire block and the receiver already got a few first few bits of that particular block okay so this is trying to to show I mean this

is we're seeing this in reality so this is we're actually making it much faster so here we get another order of magnitude improvement okay so with more than 100 X in the compression in more than ten times quicker propagation of blocks we're capable of pushing things to - more than 1000 times okay and so to summarize there are three important things here number one the data that you're sending in terms of box is much shorter number two instead of having a large number of places where things can go wrong here things are much more simpler right because you have the access block you have the network you have the other nodes receiving it and the third time if you can the third important thing here

is that all nodes are directly connected to all other nodes right you're no longer dependent on whether somebody's is running the right code on their own the etherium node whether their performance is good whether that machine is - wrong so we provide a broadcast there to make it all happen now very important thing what I hoped to have shown here is that you can stream we can significantly improve the performance of block chains using a block chain distribution okay however if you ask yourself like this

shouldn't be a huge surprise why is that because like Akamai is a content distribution network that serve or YouTube YouTube pushes one terabyte of data every single second and nobody blinks tonight everybody is like sure of course it's 21st century networks are good what's what's the big deal right and what I have shown here to you that hey you know what with 10000 or whatever number of etherium nodes we can make it much faster it's not a big surprise that you can do this right so what is the difference between these two worlds the key issue with block chains is that

block chains are this distributive in the centralized system in which no single entity can control what is going on shake okay that's the key that's the key idea behind block chains right so the key problem that we have to solve is that once you put this super cool network in the middle of aetherium is it still possible to claim that that this is a decentralized system because this network can have a lot of power for example if we are able of or if somebody comes to us and tell us to do this and that then this is no longer a block chain Network right so this is this really is the key contribution behind

our work and I'm not speaking as an academic my former PhD student did his PhD on this topic and so basically the key design principle behind blocks route was to design a probably neutral system so that no not even the administrator of the network is capable of censoring data without that being noticed by the community okay so let me give you a very down-to-earth example of what that means that means if anybody comes to us and says hey you guys we understand are pushing this this blockchain data around

the world we have found out that this particular address are some very bad folks doing some very bad things like smuggling guns or whatnot and we realized that if you don't serve that transaction or your network or tell us whenever you see something along these lines going on you please tell us and then we will take care of that okay and this is a possibility that can really happen and and this is what we had in mind when we were designing blocks okay our answer to any such request is going to be is is we would be happy to help you and we equally don't like any of these bad things going on but there's

absolutely nothing we can do to stop this not because we wouldn't want to help you but because the design of the network is such that we are incapable of doing that why is that because all the blocks when they are sent by the gateways are encrypted in our system okay so every block before a gateway sends a block it encrypts the block and the network blindly serves all blocks and only when the blocks are delivered to the endpoints only then are the keys distributed among the the end the gateways and only then is it revealed what was in that particular block right and of course we have other techniques that you're using it I'm not going to I mean I can spend two hours on this alone

but I'm sure you guys are gonna appreciate me moving to much more interesting topics so deployment is another important issue I told you we require no change of code on on any of the endpoints okay so they started already working with a with the big mining pools in aetherium and with many folks interested in making this happen and then basically what we provide is an open open source code which is the gateway code which any of you is going to be able to download from our webpage as soon as September 2019 ok even if you're not a miner or if you're not at

all I mean if you just want to listen to the ethereal Network if you just wanna send transaction tritium if you don't have to be a miner so that you wanna get the gate say any node in the world that wants to listen to the radio network is should be interested in getting our gateway because we are really providing all this information about intersections and blocks to pass through and so and so basically are the cost a good question is so so I mean this network needs to be funded so the question is how does this whole who is paying for the service ok we are not charging miners this is all

completely free to the miners and we are not ever going to charge any users for sending tiny amount of transactions however our business model is that we plan to charge all those heavy hitters all those who are going to send huge amounts of transactions in a particular period of time they are the ones who are going to pay for this however the key idea behind scaling however is that the fees for everybody should go down that's the key purpose behind scalability otherwise we wouldn't care about that right if everybody would have like $50 per transaction to pay we wouldn't care about scalability it's gonna be fine you just pay money and you're fine right

the key idea behind scalability is that the cost of the entire system goes down significantly ok so in a world where we can push things by more than 1,000 time the the own chain writing on on ethereum blockchain becomes you can do thousand times more writes on chain that's the world in which the cost of doing that becomes much much smaller right and so in this world despite the fact that as I said we are going to plan to charge the end users in this world time's up in this world it basically they're the ones who benefit the most because the effective fee is gonna is gonna go down

by 100 I'm gonna leave you with this we are currently doing a large test with you - butyrin community our software is open sourced and you can download it in you can use it and so we're and the great thing is that you can do all of this today ok not in six months not in a year we are here to scale Italian so with that said I'll be happy to take any questions if you have and I hope I didn't no questions no problem thank you so much if anybody wants to ask something I'll be outside and so on thank you thank you so much [Applause]