devp2p
Devcon 1 · November 2015 · 16:40
Alex Leverington presents devp2p, Ethereum's networking protocol. The Devcon 1 talk covers how nodes discover each other, connect and exchange messages, the peer-to-peer layer that carries blocks and transactions between Ethereum clients and underpins the network's resilience.
Speakers
Topics
From Devcon 1, hosted by Ethereum Foundation.
Transcript
okay so networking one of the most common questions when asked about athyrium is how is it different how's it different from bitcoin specifically and i think networking is probably one of the areas where athyrium is significantly different so yeah networking what is the network everyone here is a network they say that the way
that our brains work is the neural network so it only makes sense that we created the internet which is also a network to connect all of us together and we've become very dependent on this our economy functions on networks our cell phones function on networks are corporations function on networks and as engineers we found ways to to define networking and to define its function
and to replicate that and to build on top of that this is a image of various systems used to power the internet I'm sure everyone here has heard of ethernet networking equipment switching equipment IT operations a lot of systems today now run on Ethernet and that used to not always be the case one interesting story about Ethernet though is that get a little bit of feedback is that it used to be a hub broadcast based system and what this
means is that when one device sends out a packet it goes to all of the devices there was no filtering there was no there were no limitations so if you had a system with 10 devices on it you'd be fine if you went to a hundred or a thousand devices it just wouldn't work because the network would try and deliver every message to everyone for every packet so to to resolve that issue they came up with switched networks and today we have switch Ethernet we also have another virtual layer of Ethernet called VPN a sorry V win and that is used to further allow switch networks to
filter and route traffic in a way that is can be optimized for the network that is built for so why is that interesting I think that's interesting because I think today with Bitcoin and athyrium we are at that stage so with with with with Bitcoin and athyrium and any kind of distributed period most distributed peer-to-peer applications their broadcast based so they're they're either broadcast based or they're very exclusive and that they are broadcast base but you have like a swarm of peers and they're all they're all concerned
with a single torrent hash or something as we move forward like as we define the way that the networking of Bitcoin athyrium works we're going to begin addressing scalability and I think that that's going to look similar to switched switch networks IP of course runs on top of Ethernet so this is a kind of layered we have physical and then adjustability and then application and it's kind of a generalized stack layers and etherium is built on a network stack that is very
similar to this so I tell you a little bit about myself real quick I've always been into networking security picked up programming just after high school working at a telecommunications company and became very interested in the way that networks work so today if you were to open your browser if you were to use
her cell phone if you were to run any kind of application it's probably going to connect with TLS and this was a case in 2000 with ssl when i first started getting into networking and and software applications so TLS was previously was SSL and its name came from Microsoft agreeing to use the Netscape technology which is great because that's a demonstration of two really amazing technology companies
coming together to standardize on encryption so last week I talked to one of the one of the individuals that worked on TLS and started to explain how I felt about the protocol and he said yep completely agree so when SSL and TLS was created we did not have some of the strong assertions about cryptography that we have today and we did we didn't have the same computational power then that we had today as well so there's
general agreement that what we have now can be improved getting into atheneum development started chatting with Gavin early last year and started working on the c++ client and just prior to that metallic add released the white paper and talking to Gavin it seemed like we all agreed that etherium could be a great opportunity to improve networking to improve the general state of things with regard to encryption so if we're
going to build out a new network for applications for smart contracts let's see if we can also improve the network there's an interesting talk by Daniel Jay Bernstein where he presents himself as an employee of Verizon and it's great if you can find that it's it's it's a it's good to watch especially if you are in if you're in any kind of if if you work on a system that is built to exchange information and you are the man in the
so if you're a telecommunications provider if you're a bank if you're operate point-of-sale systems anywhere where you have a massive amount of data going through your system it's good to actually step back and realize this and realize that if there's a breach you you're so it's you get a lot of value out of being the man in the middle but if there's a breach now maybe you're liable but not only that maybe as we start building decentralized
applications you may be able to offload that to the network and both be able to provide value and not have the liability so to provide privacy in in in in addition to value so today networking principally is based on at a low level routing information so IP headers have a source and a destination address this is really similar to Bitcoin so bitcoin bitcoin has a signer and then it has the
destination address and a change address and this is very similar to forwarding a packet across the internet except you might split back at half and let's not a call it a packet let's call it a payload and so with with with Bitcoin you've basically got all these payloads being routed through all of these accounts and this is very similar to email except it's secure and there's some value attached to that trip to that transaction athyrium by the way we actually do this a little differently the the way that the signature system works you can look at it similar to
Bitcoin was actually quite different you sign the transaction and the person that wants to verify it they they recover your public key out of the transaction and then verify that that that that's accurate and then take the information that's been signed and then process that so what's significant there is that its application oriented instead of networking so applications have a different challenge and that is discovery if you have a network and your routing information everywhere this is
very useful but especially if you can decentralize all of it right so decentralize all the things and that's useful well actually it turns out it's not if UD centralize all the things and you don't know where all the things are your applications can't use the network so what you have to do when you're building your application is in your application you have to build something that organizes all of the things that you've you've decentralized so this is known as routing there dhts there's a lot of technology they can do this and protocols and what they basically do is they let you determine exactly where the
information is that you need and then get you that information and this is again becoming very different than networking of the past with vitarium with applications you will connect to your peers and be able to advertise what you need or what you're interested in and then the network will bring it to you and this is very useful and we have to be careful though we have to build this slowly and we have to do it right because while it can be really useful and everyone
agrees that that we need to improve here and this general stack of networking and applications everything's talking to each other we have to be careful that we don't mess it up so in order to facilitate application that works we have a network protocol with athyrium for athyrium notes which is encrypted throughout the network and has a separate node discovery system so quick clarification node can be anything right
now we have a system for peers who are the notes to form a network to be able to broadcast transactions and what that gets us today is a stable network for transaction delivery block delivery downloads etc we've recently added framing and we'll be adding flow control soon and what this means is that you can create a sub protocol that runs on the etherium network so let's get that so we're doing that ourselves and the sub
protocols that we're going to run our there's 'if for the blockchain whisper which is and this is which is swarm you can add your protocol here and each one of these protocols is its own set of nodes and what this means at the end of the day is that today everything is a thin client so today everything is HTML and if we wanted to go into gmail and say okay i want to send an email i want to some
Bitcoin to one of my contacts or i want to sign an a you know theriyum contract like executed athyrium contract with one of my contacts I can't really do that like there's not an interface in the browser to say okay execute this function with this application network and a lot of times if you want to actually do that you have to put have a have a plug-in so what we're going to be building with athyrium and exposing for your applications is the ability for your applications do you have networks and have networks of networks which
Bitcoin the etherium blockchain these are these are networks to interface with each other to pass messages to each other and to communicate in a way that this not previously available so and that's it you