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

Loading player…

The Raiden Network

DevconSun, Oct 7, 2018, 12:00 AM

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more. https://archive.devcon.org/archive/watch/3/the-raiden-network Raiden is a payment channel technology for fast, cheap, scalable off- chain token transfers. Introduction for developers planning to prototype applications on top of the Raiden Network testnet as well as μRaiden. Speaker(s): Augusto Hack, Loredana Cirstea Skill level: Intermediate Track: Scalability Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 3 was held in Cancún, Mexico on Nov 1 - 4, 2017 Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

Transcript

[Music] [Applause] okay so hi everyone my name is el gusto I have been working with the Radian project for the past two years and today I'm going to present to you guys what we have done for the past year and what is included in Developer Preview so for those of you that doesn't know our Aidan is Ana scalability solution that we have built for idiom and it can be scaled to a padded million of transactions per second okay so I'm gonna give you a quick agenda of my talk this is going to be split into parts and the first ten minutes I'm going to talk about Radin and the second half for this the last ten minutes we are going to talk about the micro rating so for the raiden we're gonna talk about the Radian api's rating is exposing an HTTP restful api so that you guys can use to build applications on top of it and at the go of my presentation today is to explain to of you how you can use Radian to be build apps and of that regard we're going to talk about how can you join the rail network once you have joined the radio network how can you make transfers and how can you react to transfer that you know it has received so that's agenda so first things first the setup phase so written is an open source project we have it available in github and under the release basic pages we have an app image that any of you guys can use from cell Rayden it's an executable you can just download and start running in your machine right now Rayden only works on Linux we are fixing some issues with Mac OS in a week in the next release you should be able to use Radian on Mac OS q for the moment we don't support Windows and also I want to point out that Braden is not an eighth note Radian is a separate process that communicates within a theory node so to use Braden you will also need an ethereal node running on the machine that you're working on and for that for the Brayton process to communicate with the fear node we you will need to enable JSON RPC because that's the current interface that we use to communicate so once you have this set up then let's decide how to talk about how you've written so the first thing that you want to do once you have read installed is you can actually read in network and the Raiden Network in the in the rating process we have to api's to connect to the network the first one that I'm going to present to you guys it's the endpoint for connections this is an automatic way of setting up channels that rating is going to manage for you guys and in the the goal of this this end point is for you guys to configure Raiden telling how much token Raiden should use to manage and open channels with the network so our goal is to never start using the tokens for that account that's configured with Raiden without user permission and you need to use that endpoint telling us how much funds do you want to use once you have used the endpoint Rana knows which funds you want to use how much of it you're allowing Raiden to use and then reading will manage channels for you on your behalf so that's the automatic channel management you can use it with the port verb in the API one connections endpoint if you don't want to use the automatic management you can open channels by hand that's done by the put a verb in the channels endpoint and that's basically the same thing but you're going to manage the channels on your own you just specify everything that you want you use in the JSON that's going to be sent to the server and the Raiden will use the data that you provide to it to open channels so everything like the token address the amount of funds the target know that you're connecting to it's defined by you so these are the two api's for connecting to the network once you have connected to a network you have channels available to be managed the way that you can manage the channels open with Raiden is by using the patch keyword the patch verb for the HTTP and now you can then patch the current status of your channel and increase the deposit if you want you have more funds to make more transfers or you can change the state of the channel by closing it once you close the channel reading will automatically wait for the settlement period letsa period that we have for dispute resolution and once the dispute is over Raiden will withdraw your tokens from the channel using the proofs that was available by both of the parties in the in the channel so that's everything that we need to know on how to connect to the radio network and once you have connected to trade and networking or have channels opened you can make transfers so to make transfers you can use the post verb with the transfers and end point and that an end point is going to expose you guys hash time lock mediated transfers so hash time locks are a nice abstraction that we can use and that makes for a concealable and expire both transfers so that's the best kind of transitions that we have that expose the nicest error model for people to build applications on top for making transfers there is an important detail that resin is not part of your application Bradon is a server that's running on a computer that you're going to communicate through recipe ice and you need to provide some knowledge or some application specific data to read in so that both of the nodes the one that Spain and the one that's receiving the payment know what the payment is regards you so let's assume that you're building an e-commerce application or something that needs to make a payment for the e-commerce application you can give an identifier to a cart and I use that identifier as part of the transfer so that's the way that the client application can tell the the part the node that's being paid what the payment is about currently we don't allow in the current version of the API which is an arbitrary data that may change in the future that's just the current transport that we have available ok so once you've made transfers that's two parts of the agenda the last thing that you want to do is react to receiving payments for the radio network and that can be done by pulling for events in the radio node we are just providing a simple API for the moment with pulling in the future view we will add maybe a long pulling or a different transport that can push events for you but the way that you can react to payments is by watching for the even transfer received that even is emitted every time that you receive a payment and then you can react to it and that event will have the identifier and the token and the amount of the transfer that you received so that's everything that you need to know about the endpoints available in Braden and with that you can be replications on top of it that payments using the brilliant Network so if you want your tears Raylan we currently are doing a Developer Preview so it's not available in the manor it's only available wraps in a test network and on the robson that test network we have deployed hourly rate in our smart contracts and including the Radian test open and with the Braeden test open we have made available a mint method that are you can use to mentor yourself some test tokens and use that test token to make payments in the test network so once you have used the brain best tokens you get yourself some tokens in the test Network you can connect you some notes and here is a note that you may try to use we have made it it's a programmable node that's just gonna reply the transfers that you make to it with a transfer of the same amount and same token the case the radiant desktop and if you want you can actually test and test network using the automatic connection endpoint we have made available a test network with a hundred reading nodes so when you use the automatic connection management you're probably going to connect to one of our nodes and everything is going to work as expected so these details are I'm not gonna focus too much on them they are all available in the documentation and as an example of an application built on top of reading we have built the web UI so the web UI is one of the UI's that we have available for the Braden project and the web UI is available in our source code that you can just find in the your why folder and that it's built using these endpoints that I have showed you guys so that's everything that I have to show you that's how you need to note to build applications on top of a Braden and if you want more additional details on the format of the JSON files the response and different verbs are different endpoints that we have available you can go to the read and network read the docs and we have much more information there including how to deploy your own tokens and use a different test network if you don't want you use the rocket robson test network so with that I'm just going to live for blue denim that's going to talk about micro micro Raylan [Applause] hello I'm Nora Dunham one of the developers that contributed to micro Radin I'm gonna tell you today what is micro grading for what you can use it and I'll also show you a small live demo of a token fueled robot so what is micro Radin micro Radin is a robust of chain payment channel framework and it's easy to use off-the-shelf it is good for 80% of the use cases that someone can think of when they are thinking of using Radin for their own service or business it is a unidirectional many-to-one implementation which means we don't need to think about routing issues and incentivizing fees for users who have open channels and want to share them with others that this is why we have off key transactions that are fast and free micro Radin is available now on the Kelvin test net and will be available on the main net by the end of November which is by the end of this month so what can you build with micro Radin for human consumption the most straightforward use case is paper use and we already have two demos one with a fortune cookie paywall that is online now and an unpleasent alternate world where you pay for Wikipedia but the most interesting use case is the the machine-to-machine micro payments that you can do so basically if you have an API that you want to monetize you can use micro use micro Rayden from utilities to data storage to scheduled API queries and we already have machine-to-machine demo where we query the price of ether in u.s. dollars each second and you can see the entire lifecycle of our channel from opening to depositing new tokens to closing it and also see the off chain micro payments how are they created and received and now for the live demo I want you to bear with me a little bit so this is Robo and I hope there's a camera yeah Robo has his own aetherium address and he uses micro Raiden to be paid in tokens for his work we already have an account here with Robo this is the JavaScript client and we used no dreads for this dashboard and we can see that we already have an open channel with a deposit of 50 tokens and a channel balance of two tokens which means that we already paid Robo two tokens for his services we have a remote control for him and the buttons for a forward back right left back left and back right are connected to a micro payment endpoint this is the micro Raiden server and we can see that the JavaScript client has signed a balance proof for us and that instantly the micro Raiden server has received that payment and sorry I don't have enough time to show you everything sir and you can see that the balance has increased with every press of the button you can of course do this by timing the robot or measuring the distance but this was I mean we implemented this very very fast in a couple of days so it's not that complicated ok what we can do when we remain or without tokens is go to our account and deposit more and this is an on chain transaction so what you've seen until now are off chain micro payments and to verify this we can go to either scan and see that the transaction will be included in the Box ortley and we can also see the micro raid and server registering the event for depositing new tokens of course when we've finished everything with Robo we can close the channel and again we can verify in ether scan that this is an on chain transaction and the micro radiance server has also received this ok going back to the presentation the code for this for the examples are in the micro Raiden repositories under microwave and microwave and examples and for the robot the token hungry car we will link it in the readme but for now the Jason for setting up the node Reds dashboard is in one of my personal repositories so to recap a bit you can open a channel on chain you can deposit tokens on chain you can close a channel on chain but the essence of micro Radin are the micro payments that are done off chain fast and free between closing between opening and closing a channel I'll try to make it fast a simple explanation of how it works the sender and the receiver both keep copies of the channel data which is receiver and sender etherium addresses the block number at which the channel has been created and the current balance because we've seen that the balance increases so it's the last status and also the receiver has the last balance proof received from the sender what is the last balance proof it's basically a message signed by the sender which contains the current balance the block number and the receivers address the micro payment works like this the sender sends all this data along with his signature to the receiver the receiver provides the resource and also saves this signed balance proof we also support the ERC 223 in work standard along with the ERC 24 opening a channel and depositing tokens because the RC 223 offers us the possibility of consuming less gas because we only do one transaction instead of two for approving and opening a channel I'm going to skip this very fast maybe tell you a little bit about closing a channel and we can do this we can find ourselves in three states one is a cooperative closed which is the best case scenario when the sender where is the receiver for a closing signature and then closes the channel himself by providing his balance signature and the receivers closing signature and everything is well and good if anything goes from we have a challenge period where the channel can be closed by the receiver by providing that last balance proof saved in conclusion my croydon is ready to use it is the go-to solution for frequent fast and free ERC twenty token-based of chain micro payments on the etherium blockchain and don't forget robots also won crypto Thank You Loredana you [Music]

Automatic transcript — names and jargon may be misspelled.