SF Scala: Fabrice Drouin, Scaling Bitcoin with Scala
Recording: SF Scala: Fabrice Drouin, Scaling Bitcoin with Scala
[Music] all right good evening so my name is Fabrice voix I work for a sac a small start-up company funded in three years ago and we work on Bitcoin and more specifically on the Lightning Network which is a scaling solution for for Bitcoin so we have three projects it's a lightning node I will explain what it's about later mobile application and tools and libraries that you can use to make using lightning and Bitcoin a bit easier so I'll start with explaining what bitcoin is so how many of you own bitcoins okay Bitcoin basically let's let's Bitcoin if you if you want to have a an image of what bitcoin is about bitcoin is digital cash so whatever you can do with cash you can do with Bitcoin that's the the model you you have and it's the holy grail of digital cash because people have been trying to buy to build digital cash without fifty third parties without central banks for a long time for nearly 30 years and somehow someone or a group of people named Satoshi Nakamoto managed to combine multiple tools and techniques and create for the first time just less digital cash cash that you can transfer without having to rely on thirty third parties it's it's it was the first time so--but bitcoin is decentralized it doesn't have central authorities it's a peer-to-peer network it is trustless that's very important in Bitcoin you don't need to trust anyone you can verify everything yourself and it's based on cryptographic primitives which is why it is called a crypto currency so in a way you have an old centralized model on the left with the sensor and when you get closer to the sensor you have more and more verification and Trust and and things you need to comply with Bitcoin is very different there is no Center it's a network of nodes connected together but is there is no central point of failure there is no central authority it is it is a very different very different model that is based on a global consensus all bigger nodes agree on what the blockchain is and it's it's a really hard problem to get global consensus and it create limitations especially when it comes to the scalability of VidCon and that's what we're working on so how to become a Bitcoin expert in three easy steps the blockchain the UT Excel and the script does anyone know what UT EXO means except for Chris of course ok the blockchain is is the first step it's the step that most people are familiar with Bitcoin transactions are grouped into blocks blocks are linked together so a block contains the ID of the previous block and there's a proof-of-work in Bitcoin that is very simple the hash of a block needs to be smaller than the target value so this is an actual hash and do you know what a hash function is okay so the results of a hash function is supposed to be basically random numbers and this doesn't look random at all it starts with a lot of zeros that's the proof of work so to create a hash that starts with that many zeros you need a lot video lots of computing power and that's the key to the security of Bitcoin if you want to create a block you need to do a lot of computations if you want to change the doctrine if you want to say okay this I want to replace this block with another one that gives me more money you need to rewrite the blockchain you need to fight to rewrite boxing by finding blocks that will hash to the given target and that's extremely difficult today we we consider that it is nearly impossible to rewrite more than six blocks so if if you're there basically you're safe what what is there is nothing good is never going to be changed again this is a fork in the pit conduction so this is a valid chain this also is a valid chain so this happens once in a while for example miners could start from the same block and two miners could find a new block at the same time so how do you decide which one is the good one it's fairly easy you choose the chain with the most proof of work so it's deterministic so in this case this one is the chain with the most proof of work and that's the valley chain and there's an incentive for miners to follow the most valid chain because mining is a race that starts from crash every time a new block is produced so suppose we're there a miner finds this block another one finds this block to keep on following the chain that in that is not the longest one is losing money it's a bad idea that you will be able to catch up if you don't everything that is lost so the incentive for miners is to always follow the longest chain and this is why Bitcoin works so what you have is a peer-to-peer network of nodes and they all send and receive transactions and blocks and they all have to agree on what what the blockchain is it's a global consensus problem and it's it's really hard that's why there's one implementation of picanha but we can cause like 99.99 percent of all noise because if you're running software that is that produces different results from what big encoders you will fork off the network and it's it's really bad so it's a bit strange when you when you discover a Bitcoin but there are no specs there is code and you have to do exactly what the code does and if it has bugs you need to replicate those bugs another thing that is really important to understand Bitcoin is the transaction model well how do you define the coins in bitcoins what are the coins in bitcoins the coins are the outputs of transactions that have not been spent yet it's it's very easy so big constructions of inputs and outputs the inputs spend a previous output and they create new outputs so we call this the ute ute EXO model eat EXO stands for unspent transaction output so for each block in abduction so there there's a given new TXO set a new block comes in with transactions that will spend some of the outputs and create new output so it will change the set of VTX cells that are spendable that's how the Bitcoin blockchain works so what is really important the states that you need to to keep is the sets of spendable transaction outputs and it's very easy to check if detection is valid you can only spend money that is in the you TXO set so this model is a bit different from the commonly used balance by the way you have accounts with fixed IDs and you can send or spend money from an account this is difference you TXO exist only once they are created they are spent and they're gone forever you will never have twice the same you TXO so what a wallet what a Bitcoin wallet does is keep tracks of the unspent ETH so that you can spend if you have a private key you can spend the you takes over that send money to that private key and that's is your money that's how Bitcoin works you don't have a concept of accounts and balances you have a concept of trajection outputs that you can spend this looks a bit strange at first but it's not that hard to understand and it's what the difference is between Bitcoin and other cryptocurrencies that I've chosen an accounts model it's really easy to implement from a system point of view and that's one of the characteristics of Bitcoin compared to other currencies a lot of things in Bitcoin were made to make implementing the system easy which means that sometimes implementing clients is a bit harder than it is for other currencies but from a system point of view it is very easy the UT Excel is because the the the biggest problem for Bitcoin is to solve the double span problem that is the the key to creating digital cash how you do chip ID you check that I am NOT saying money to you and the same money to Chris that's the huge problem that was not solved before Bitcoin unless you resulted to using central controlling authority that could say okay at with all the transactions yeah and say okay you can't spend this one because I already saw it how do you deal with double spending on a peer-to-peer network and so the UT XO is is part of the blockchain solution to this problem you have a set of coins you can spend and a transaction to be varied ask to spend something from the sets of spendable you TXO if it's not there either it doesn't exist yet or has been spent already but it's not valid and the third thing that was mentioned by Chris before is the script Bitcoin as a really basic scripting language it's a stock manipulation language so you have a stack you can push values to the stack retrieve values from the stack do simple computations and that's how Bitcoin works for example if on the stack the first two elements are 1 & 2 and your operators is add it will pop the first two values from the stack add them and push back the sum of the two values are used 3 in our case it is extremely simple and it's very easy to analyze from a static point of view that's one of the strengths of the Bitcoin script even reading scripts gives you a pretty good idea of what it is doing and there are no tricks no subtle bugs yet you could have if you had more elaborate scripting languages we the loops and and things like this Bitcoin strip is basic but it is actually a good thing not a bad thing and sorry the way it works is transactions have inputs and outputs inputs of what we call a signature script and outputs of what we call public key scripts and to check that the transaction is valid you start with an empty stack you execute the signature script of your input so you get you get a stack with values on it you execute the public key scripts of the output that you are trying to spend and the final stock should be one element that is one if it's anything else then the traduction is not valid so it's very simple you run you run two scripts you should have a stuck with one value that's one it's an interesting property because one of the things people are looking at right now our zero knowledge proves zero knowledge proof is how how do you prove that you know something without disclosing what it is exactly that you know and there are people working on systems where you could prove that the execution of scripts gives you a single value that is true but you don't say exactly what the script are so you the value is in the script which could be which you may not want to disclose for privacy reasons will not be disclosed to everyone but you can prove anywhere that there's a kitchen of the script is very that gives you a single value so that's as well things that people are working on so these are examples that we saw earlier so I'm going to go quickly over them as publicly script the most widely used a script in Bitcoin you have more more advanced or session scripts and enlightening we have much more complex scripts we're not gonna to show them but some more involved squid but basically it's all the same principle you have simple operators like hash functions signature verification functions you push values and you do things with them so it's a very very simple language it's a no-brainer and it's one of the strengths of Bitcoin not a weakness so there's a u limitation with the public box ends it's not only Bitcoin it's all the other public functions its scalability the the design is everyone sees everything everyone sees all transactions on the Bitcoin network what it means is for Bitcoin you get seven selections per second for the whole world that's not that much it also means that a payments is considered final once it's been confirmed six times once the deduction like dilutes the payments has been followed by six blocks five blocks sorry having payments that take one hour to be processed is a problem in for many use cases there's another problem with Bitcoin you can't do micro payments anymore there are transaction fees a few cents now which means it is not practical to send a five cents big construction so for for some use cases Bitcoin is is not usable right now but the biggest problem is is throughput seventh elections per second is is is really not much so if if we want bitcoins to succeed as digital cash we need to solve this so you could have bigger blocks you could have bitcoins right now is limited to one megabyte per block so you could be bigger you could have shorter interval between blocks Bitcoin is one block every ten minutes it could be five minutes it could be one minute it has side effects but this is not how you get thousands of transactions per second so we need to find something else and that something else is is a lightning Network it's lightning is a peer-to-peer network of payment channels it is based on the bit conduction it speaks the Bitcoin follicle but it has a different model and it's enables cheap instant payments it enables micro payments and it doesn't have a throughput limitation basically the throughput on lightning is unlimited and it is still trustless maybe a bit less than Bitcoin because I explained later but it is still a traceless system and it's layer 2 application because it is based on the Bitcoin blockchain but it's it's above it and it has different properties different trade-offs but it's true to the Bitcoin spirit it is it is still trustus so it was proposed no it's a layer above Bitcoin but it lightning does not exist cannot exist without Bitcoin it relies completely on beacon for everything so it was proposed four years ago someone proposed payment channels for Bitcoin but there are lots of limitations and the biggest limitation is you had to open a channel with everyone you wanted to send money to so if you wanted to buy from Starbucks and Microsoft and blah blah blah you have to open one channel with every one of them it was not practical and two years ago Joseph boon and targed Raja proposed the Lightning Network which is an extension of payment channels with conditional payments that is you pay someone if only if they pay someone else this property gives you a network of payment channels when you can pay anyone you can find a route and that's the one of the keys to lightning it was improved and it evolved into a community that has been working on specifications for a year now the specifications are almost ready so there are three major companies working on on lightning that's block stream lighting labs which is based in the financial district just just a few minutes away and there's us so the specifications are almost ready there are three implementations Oh almost ready and interoperable so you can choose any one of them and they all speak the same protocol and hopefully there will be the first test with real money within the next few weeks so it is it is getting ready and it will be deployed I think by the end of this year and beginning of next year so it will start small with small payments but it will be deployed in real life very soon so there are that's the bolts are the the basis of lightning technologies so you can check out the specs and and see how it works so it's it covers everything and the idea of lightning is that's you creates Bitcoin transactions that are valid but you don't publish them and when you pay when you want to pay someone you change all these transactions splits the money that's spent but you don't publish them so for example when you creates Alice and Bob create a payment channel and in this case Alice is funding the channel so Alice will publish a big con transaction for 10 bitcoins that is that can expense only if Alice and Bob sign the spending transaction it's like a joint accounts you can spend but both parties have to sign so this one gets published to the big conduction and artisan Bob they will have what we call a commitment reduction it spans from the funding transaction but it is not published when you start Alice's funding so Alice has a commitment deduction that gives a 10 Bitcoin and nothing to Bob and Bob has the same he has a commit transaction that gives a least 10 Bitcoin and nothing for him because there's enough money and basically when Ally's pays Bob they just change are the money in that fun introduction is split so if Alice wants to send three bitcoins to Bob they will change the commits takes and now it gives three bitcoins to Alice and seven to Bob and they will update these commits a expands the funding takes but it will they won't publish it so this you can do a million times you can do it back and forth you can change the balance is it never leaves the channel it never touches the blockchain so there is no global consensus and there is no scalability issue anymore and when Alice and Bob are happy or every week or every month they will close the channel publish the states of their commitments as action and it will go back to the Bitcoin blockchain so from the bit from the blockchain sponsor we want to be you have to traductions the first one and the last one and everything that happens in between is just between Alice and Bob it doesn't touch the block the block chain so this is a payment channel between Alice and Bob there is there's a very simple payment model in enlightening its what it's called hash time harsh time lot time locked contract so I will give you bitcoins if you give me the preimage of HD you all know what a pre-image is okay so you have a value you hash it you have a results that first value is the preimage for your results and hash functions are impossible to invert you need to try all possible inputs to get an output so if I if I give you a value why there is no way you can find the X that can be hashed to Y without trying every possible value so it's it's not possible to invert so the the payment model in Bitcoin is I will pay you if you give me the preimage for a given value and so that's why we call it hash contracts you you pay against the free mage for a given hash and it's stunlock because suppose a Bob stops responding it goes away it does whatever you need to get your money back so after a delay if you haven't got a new pre-image you get your money back so the Lightning payment model I will give you money against the preimage but after a given Tom if we have not given me the preimage I can get my money back so a payments enlightening is an advance payment hash and a delay and the trick that makes lightning really awesome is conditional payments multi-hop payments you-you-you can pay through someone that's what makes it really interesting because you don't need to open payment channels to everyone you want to pay as as far as I mean if you can find a route to someone you can pay them so suppose Alice wants to buy something from Carol like it sits on a website she hardly sees a really nice image of a cat and she wants to buy it to bitcoins it's a it's a very expensive with a major cut so on the website called it will will display a payment request it could be a QR code it could be anything and it says send me a payments for two bitcoins and Alice we send out payments but through Bob basically Alice will say okay Bob I will give you two bitcoins if and only if you give Carol two bitcoins that's how it works basically Alice would send a payment to Bob using this h value she got from Carol and Bob will forward the payment to Carol with the same H value in the same amount and now what happens is when Carol gives the preimage to Bob but we'll give it to Alice and transfer is done on both sides so what happens he is now two bitcoins have moved on this channel from Alice to Bob and two bitcoins have moved on this channel from Bob to Carol so from Alice's point of view she's paid to bitcoins from Bob Bob's point of view he's received two bitcoins from Alice and is given two bitcoins to Carol and from calvess point of view she received two beacons from count so it's that's how it payments work unlikely you transfer money from one inbound payment channel to another bound payment channels so from from Bob sportively doesn't change anything but carol got paid and alice paid and it is still trust less because of the constructions that are used in lightning networks at all times Alice Bob and Carol are valid commitment reductions that can be published in the blockchain and they don't need to trust each other it's either you could I say that the fact that your commitment deductions is always valid means that you don't trust your counterparty and so it's a it's a very specific payment system because there is no custody Bob you transmit money but you don't control the money that is transmitted I don't know if you see what I mean but you it's very different from the traditional systems were basically money transmitters they have the money and you ask them to transfer it but it is their responsibility and they can do whatever they want with it if it's different Bob does not control the amount or it cannot change the pre images or basic either he realized the payments or it doesn't but it cannot steal the payments so it's it's a trustless model that is different from traditional payment processing systems because she she could if she had a payment channel with Carol but the thing is it's not practical if you if there are thousands of merchants you don't want to open channels with every one of them if on a network of payment channels you only need to have a few open channels maybe three or four and it's enough to pay anyone on the network yes yes except that's you don't need to transport he doesn't get paid if Bob on this side Bob is paying on this side is receiving money so it doesn't make sense for Bob not to transfer the preimage because if he doesn't he doesn't get e he pays on this side and it doesn't get paid on this side so there's no incentive for Bob to not relate the payments and from Carol's point of view what Carol wants is is to get paid she doesn't care whether it comes from Bob or a lease or whatever so that you see what I mean [Music] maybe but there's one thing that is specific to lightning that doesn't exist with mining for example is there is no barrier to entry maybe you could mine at home you will never find a block ever you'll be dead before you find the first block lightning is different it's it's it's permissionless network so anyone can run a liking node so if you don't want to go through Bob because Bob is doing things that you don't like there's nothing that prevents you from going through someone else because anyone can write a beacon a liking node effectively I don't know if it answers your question but it is it is a permissionless payment system with no barrier to entry no no it's no mining if you don't have millions and millions it's not gonna work this you could run like a node on a small computer at home you could create a small network of payment channels in your city or university or whatever and it will be used so it's a very different model from mining yes you basically this is maybe okay I'll talk about the routine because I think it answers your question lightning uses Onion Routing a bit like so what it means is the sender chooses the path on the network to the destination so what it does is you create a message for the destination that you encrypt and you add a layer for this node that is encrypted and so on and so on and so on and so on and when you receive a message you decrypt it you peel off the layer that is for you it tells you where to send where to send it next and that's what it does but when you're it in the middle of a payment you don't know where it comes from or where it's going or you know it this one knows a it came from here it goes there it doesn't know the sender or the destination I don't know if it answers your question but Bob not willing to send money to Karl but basically when you are there you don't know who's paying who so there's a good you could because to bootstrap the network we use a gossip system where everybody has a complete map of all channels so you could design not to rely payment payments to no you could not sorry no no here you could decide not to use a given channel because you don't like it but there there's not much you can do you don't know where it's going so if you don't like the red the destination there there is no way you can censor the payment unless you control more than one node on the route which is always possible it's also one of the attacks on on its own as well if you control and you know it exit nodes and nodes in the middle yes there are things you can do and it will be the same with lightning yes you see this one this one and that's it you don't know the sender destination the payment hash is the same which is a bit of a problem it's something that will be changed with the father for the next version so you could use the payment hash to correlate payments but you don't know that the routes when you're relaying payments so lightning is not a side chain it is not independent from Bitcoin it is a layer above Bitcoin that eases the same transactions the same follicle same scripts with a different model that makes it basically unlimited from a throughput point of view with also new limitations Bitcoin well the good things about Bitcoin is you can receive money without doing anything if I was to display a QR code with my Bitcoin address you couldn't send me money and I don't have to do anything I don't have to I don't even have to run a computer with a Bitcoin node lightning you need to be online to send money and you also need to be online to receive money that's one of the big differences between lightning and Bitcoin you need to monitor the blockchain so I didn't go into the details but to prevent sorry okay suppose we're there Alice three bitcoins and Bob are seven bitcoins and Alice thinks okay I like this one better it gave me ten Bitcoin I'm going to publish this one you need to prevent this so we have a revocation mechanism based on penalty transactions basically if you publish an old commitment seduction you lose all the money in it but for this to work you need to monitor the blockchain you need to see that somebody is spending the funding seduction and you need to steal the outputs so it's a constraint it means you need to monitor the blockchain or you need to have someone do it for you so if you're reading a node on the system that is not online very often like a mobile phone you have a problem so the easy way out is to say okay I don't receive money all I do is is send money so you don't care about someone publishing an old transaction because it will give you money if you want to receive money on the system that is not online for a long for a long time like a mobile phone you need to outsource blockchain monitoring there are pretty clever IDs on this you can it can be done in a trustless manner but it's one of the constraints of lightning that doesn't exist with Bitcoin you need to monitor the production if you want to receive money so now let's talk about what we do with Scala and why we think it's a good fit for lighting so we have several projects we have a Bitcoin library that is a bit similar to what Chris is doing it includes everything you need to pass the blockchain and creates instructions but it's mostly focused on creating transactions we use it on our liking nodes so what we do with it is create and spend transactions so it's it really what we focus on creating selections we have a lighting node so it's basically like a it's similar to the Bitcoin core node but it's used to create and manage lighting channels so it's a there's a headless mode and a JavaFX GUI and we have a mobile application that is not open source yet but will be very very soon and it includes the wallets and you can use it to send and receive payments so you can download it on Google Play but it's only usable right now on test net so it's not real money and this is an explorer that will show you the network of payment channels this will be released very soon so why did we choose Scala so we are building lighting nodes so we are building service what we need is performance we need to monitor what we're doing we need logging facilities we we need networking libraries because we are connecting to other nodes we need something we can deploy easily and we need to handle concurrency we don't care about startup time the size of the runtime is not really a problem because we have long-running service and for this the JVM is a vertical choice also we use state machines everywhere to model what we're doing but basically a lightning channel is modeled as a state machine and there are very good tools in Scala for modeling state machines and we also need crypto primitives and big con primitives and we'd like to have it's a very nice we like to something we can run on on phones and not just desktop or servers so why did you choose scanner because of the runtime because of the language and because of the tools and libraries you get with Scala the the biggest selling points in my opinion for Scala for this type of project is the runtime the JVM is an amazing run some it's underrated it's but it's it's it's really really good it's battle-tested it's used on on millions of server everywhere for every type of applications there are really good were some tools for the JVM you can monitor what's happening you can debug you can deploy it's it's it's it's really good and you have very good development tools so that the jvn runtime for for well this type of application is a we believe a very good choice the language what is the most important feature for a programming language we believe its readability as in the ability to convey what is the intent behind the code and it's always subjective because it depends a lot on what you're doing if you're doing algorithms or if you're doing crypto you will have a different opinion on what makes code readable and if you're doing GUI or JavaScript or database access or workflow processing but you don't want something reads too verbose because you get lost you don't want something that is too clever to terse because of the purse in Tromso I don't know if you remember pearl but in the 90s were supposed to be the next big thing everyone was writing Perl scripts for everything and we were writing them a few weeks later because they couldn't remember how they worked and I'm not kidding I met C's ops who just went on rewriting the same script over and over again because it was impossible to read if you're longer you still low level it will be hard to quickly prototype new IDs again it depends upon what you're doing so you is not generic and if it's a high level it might be hard to switch from prototype to production so again it depends on what you're doing but we believe that Scala is a fairly good compromise for this you can express things in a few lines of code and you can still be efficient and you can turn prototypes into production without having to rewrite most of it so it form our experience it's it's it's a very good choice what I mean is it's fairly easy in my opinion C writes meaningful code in Scala the basic language features like case classes pattern matching amuse ability and the collection library makes it really easy to write things that convey the intent behind the code easily immutability for example it could be done in alien in any language but it's helps you get away from the side effects problems that you have in other libraries there are libraries Bitcoin J is I think such an example you have side-effects everywhere it's really hard to understand what's going on because you can't look at something and understand what it does without looking at something else at the same time immutability forces you to work differently and it's a good thing and the tools are very good basically whatever you need there's a Java library for it and it's used by lots of people it's tested in and it works and you don't ever have to rewrite low-level stuff you have libraries for graphs crypto Network all types of formats it this is blue nice because it helps you to prototype new ideas very quickly without having to write low level things that you are missing and it's it's a very good point for it's not specifically skylights through for Java also but it's it's it really helps there are very good development tools very good debuggers there are mature build tools ok we use maven I don't know we use is is anyone using maven for SCADA ok not many people we we do we are very very happy with it build systems are boring I don't want to learn a new one so I know this one and it's it suits me there are good testing frameworks it's easy to integrate with with Travis and it's very easy to deploy on Amazon for example a lot so that the tooling that comes with Scala in our opinion very good for what we're doing akka is who knows who is using akka okay so akka is is an active library for Scala so the actor is a concurrency model where everything goes through message passing it's a very very nice library because it's really easy to reason with the actual model that's one of the almost one of its it lures you into building prototypes with message passing and it hides the complexity that you have to deal with letter like back pressure and persistence and and complex workflow it's it's very very easy to put a type and reason with the axel model some people say it's almost a good enough reason to switch to Scala I don't know if it's true or not for some types of problem acha is it is very nice but it's not a silver bullets and there are problems really hard and that cannot be handed at the framework level back pressure is one of these example by pressure is you produce two on this side you produce too much data for this eye to process this is not something that a framework will handle for you you need to decide what to do either you discard some of the request there you qu tell the guy who's producing data too but you see you you need to choose but this is an application choice it can't be a flamer choice so it's it's hard to handle when you're building system that are connected to other systems persistence and this disconnection we connection are really hard to handle and again this is something that is application specific so the framework will not decide for you what is the right choice so this is something that is hard to implement but it would be hard to implement with any tool that that you would choose one of our gripes with with SCADA right now is Android because I already stuck as Java 7 which means we can't use Scala 212 we stuck at 211 we can't use the latest version of akka and there are more and more libraries are switching to gyrate and that we cannot use and this is a language problem it's not is it sorry it's not a language problem it's a tooling problem so Kotlin will not save us because cutting will not solve the library problem if the tools and libraries that you're using are not compatible with Android cutting is not going to help and this is something we're seeing more and more I think it will it will eventually solve itself because having a development system that is far behind that becomes specific would be a problem for everyone so I think eventually it will catch up but right now it is a problem we would like to have the same codebase on servers and phones and it's it's a limitation the community around Scala Scala is not as popular as we expected it to be a few years ago I've been using Scala for a long time almost 10 years now and in two thousand eight and nine there were lots of expectations I don't think they've been met I don't know what you think but it is it is not the next big thing so it's not that golang is extremely hip rust is is very popular in a cryptocurrency community because of the lowly low level features and security features Scala not not that much and I think with only two guys working on Bitcoin and and Scala right now not not many people but it's not that bad because we found that Scala acts as a filter we don't get many contributions we not don't get many people interested in what we do because of Scala but they're always very good contributions always very interesting there's one guy in Ukraine that is doing an amazing job on our open source project and I'm not sure we'd be better off with a more popular language and more people and maybe maybe lower quality contributions so it it's a small community but so far it's not been a problem it's not something we we worry about anyway I don't know if it's the same with you but Scala developers are I don't know they I would say they have maybe more complete skill set than people you find in other communities I'm not going to be but it's it's not that bad and so that's it do you have any any questions yes for the Lightning Network is it possible to have a situation where one user is into another or there is an impact of what you said yes in that case you can't use lightning you need to fall back to the big conduction these types of places where you can you talk basically that the Lightning Channel it's a one huge arc a step machine the transport layer it's it's also an a casting machine acha works very well especially when you're when you're when you begin a new project or new prototype it's very very easy to pull it up with akka and it's a problem because the the back pressure issues you you don't get them until you're far along and it may be it's it's a bit too late to switch to something else but basically everything we do in our lighting nodes is is is is an actor the channels the period of the channels encryption we use it a lot is an issue you know you have a different orientation because languages in dividing up there is in no because the problem with Bitcoin is it's a global consensus there are thousands of nodes and they all have to agree on exactly the same thing it's not the problem we have enlightening it's a peer-to-peer network but payments are rooted interactions between a channel has no impact on the other channel it's more like a traditional kind cyber communication so it is very possible two aspects and it's very possible to have different implementations because they won't impact the whole network so today we have respect that is I think fairly readable and we are three implementations in golang in C and Scala and though there might be others but it's not a problem at all because we don't have a global consensus problem so you guys announced that discriminations yes I did not be interoperable yes so in what sense basically everything the the wire format the Bitcoin transaction format how you handle this connection with connection it's like you you will be able to to route payments through nodes using any one of these three tsun4 implementations and you won't even see it it's it's interoperability at every level of the the protocol yes there is its work in progress but Christian Dhaka is a testing framework in Python it's it's it's a relatively new thing but it will grow and and we will add test vectors for us and people who also want to join and build their own implementation we have some test vectors right now yet we are still test vectors for encryption for Bitcoin transactions for the payment request address systems we have and we learn more so it's it is beginning but yes we do have something avoid Buxton compile time and probably question two years are you having buzz yes we we do use the type system we don't do things that are too advanced because we focus on we really don't want to have two different branches for servers and Android that's a biggest worry right now there's with a small team we already have two different branches we already have problems because things that work on servers don't work on phones and sometimes you don't see it right away and so we we haven't got we haven't used very advanced tools that are not compatible with Android yet but yes we do rely on the type system my haven't evolved a lot before at all but we'll say incentive football because you can you can get paid to relay payments basically if you rely payment you take a small feat would be very small like a tenth of a percent but nodes can get paid to relay payments that's the incentive [Music] yes but it's like it's a lie near incentive it's not either you find something or you've wasted everything you've done every time you rely payment you get a these tiny amounts of money but it's every time we mentioned with on the driving that yes configuration basically it's because to start with we'll have a broadcast system for for channel announcements every time you create the channel it will be announced to everyone and so everyone will have a complete map of the network that's how you choose so we know it will be a limitation it won't scale behind beyond maybe $50,000 or $100,000 it's very simple to implement and it gives you an easy way to compute routes and there are things you can do like you you don't have to announce leave notes because if if you can't be like payments there's this pointless to to add your channel to the routing map so when I create a payment request I could include in payment request lift a list of nodes that you can use to reach me and this will reduce the constraints on the routing system but it's one of the areas were we we know we'd have to find something better to scale but it's first we have to boot throughout the system and if we get something that works very well with dozens of thousands of nodes will be happy like risers web browser extensions install the customs are prefilled kinda like an almost like a flower yourself yeah it's a it's a it's a it's a pen tissue it's a potential use case yes we are not directly working on it right now but yes it is a use case for lighting okay okay thank you very much [Applause] [Music]