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

Loading player…

SKALE Elastic Network

ETHGlobalWed, Oct 9, 2019, 12:00 AM

A workshop at ETHNewYork, an ethereum focused hackathon that took place May 8-10, 2019. This workshop featured the team from SKALE, who explained the Elastic Network. ETHNewYork was a hackathon organized by ETHGlobal and a team of hackers, developers and enthusiasts interested in building and creating in the ethereum ecosystem. The ethereum focused hackathon took place for 3 days at New Lab at the Brooklyn Navy Yard. For more information visit https://ethnewyork.com/ and https://ethglobal.co/

Transcript

full-scale limbs and I had up solutions engineering at scale labs and so today we want to chat about deploying smart contracts one to layer 2 and to show you what that looks like as far as ease of getting started this hackathon I think you guys have any questions you can always interrupt because we have a small number of people yeah if you have any questions or anything is not clear right so before just diving into the code and showing you what that looks like the adapt rock-paper-scissors will first start started to talk about the problem and the problem that we face is something that Stan can explain to you right so you guys probably all know what the apps are and everyone loves the apps people program and solidity probably most of developers here at this hackathon program solidity so they program solidity they program remix truffle these are very normal tools that everyone uses so there has been lots of activity in developing tips but what we've seen for the last two or three years as the people developed literally like thousands of the apps but none of these d apps reach enough of exception to be business something of business relevant something like mobile apps but people have billions of users right they don't have any apps like that so there's a significant gap and a problem between this huge success of solidity and the apps and stuff and the actual user exception of this and so we are trying to solve this problem and then this problem the most important thing which everyone kind of knows the scalability and is actually very simple and Posca liabilities let me just give a couple of examples right if you doing a transaction on eth main net you're paying now about 10 cents per transaction and if you're storing some saying you're paying the same 10 cents for three hundred fifty six bytes so it's pretty significant amount of money that you need to pay right and if that's at all as you're all familiar with like as you are running the transactions you're familiar with knowing that you have to wait 40 blocks or ten minutes before something is good or finalized now to think that that's the best we can do in the industry right now is kind of absurd because we're one just want to bring DAPs to feel more like applications today and right now it was just not meeting that threshold so let's figure out like well what are some of the solutions that we currently have today and how is it solving it yeah that's a great question and again to repeat first we need to solve the problem because we need to be able to support billions of users Facebook supports billions of users you know Twitter supports billions of users Google supports billions of users so to be able to match non-centralized applications we need to keep the same type of performance and so people been trying to solve this problem one type of a solution many people try it is just move some computations to a centralized server for instance is a Delta I didn't realize the change doing some of its computations must centralized server many games do this decentralized games hosting websites doing some of the game dynamics but this part is really against the whole idea of blood shield right if you have a significant part of your dieppe running on a centralized server that then you can't really guarantee anymore the decentralization and security and you've seen this many centralized exchanges how easy are they attempt to hack and this hacking comes from them being centralized so this replacing the centralization this centralization doesn't really work another thing which people are working on is decentralized file storage many of you know for instance there is a project named Falcone and for storage is aware it's a very promising technology but it's still two or three years away then there is definitely ETH 2.0 as you know eth 2.0 is much faster transactions there on th 1.0 but again we gonna see it in two or three years from now we are going to see the cth 2.0 which is going to give about 1,000 transactions per second for the entire world pretty much and then finally you have side chain so we are at scale we're working on side chains and for the rest of this talk I'm going to talk about side chains such ends is actually very simple concept it's just another block chain fully it is comfortable and connected today to the main net so Stan being our CTO is very close to the project building a lot of the consensus layer and everything that kind of makes our project work so talking about how that works then what would they expect from scale yeah so that's a very good question so as I said before a side chain is a very simple concept it's just a Plaza block chain so you don't need to learn much its solidity compatible it's remix compatible travel travel compatible you can reuse follow your skills that you learned it looks to you like another zero chain but it's fully owned by you while being run on a decentralized set of computers so it's still a block chain still preserves decentralization and then when you run a DF what you do now suddenly you have two chains instead of one and what you do you try to perform most of your computation on the side chain and then there is still some computation left on the main net and this is related to users depositing money into your system and then withdrawing money and then there is an interaction between the side chain and the main net which we provide actually for you using our scale development framework so you don't really have to think much about it is done automatically for you and in a secure way and then let me give you an example let's say you have a application which is doing games so you would implement most of your game dynamics on the side chain so like like for chess you would do moves and chess rules and check had made all of the stuff you could do on the side chain and then and then what you would do on the main that you would do when when the game completes you would need to pay so the losing party would need to pay today a winning party and then that you would do ultimately on the main net and for this we have a special frame work at scale which connects the main net and a side chain and you can transfer tokens from the side chain to the main net and back and the way it's done under the hood when you transfer either from the main net the side chain what happens you freeze this either on the main net and clothes for it I securely created on the side chain and when you want to exit when you move to move your money to the main net you burn these clothes on the side chain and you get some amount of money the same amount of money and frozen on the main net it's actually very simple concept which is done automatically for you and that's actually very simple and then another important thing is that there is web cj's which is a library probably all of you guys are no that's pretty much the major library people use to direct these block chains so the only difference which happens is that is that the one single copy of web switches you have two copies in your browser one copy points to the main net one Kathy points to the side chain other than that acid in this complication you continue programming a solidity almost as simple as you would do it for the main net the only complication being that you have now have two chains so you have to apply some thinking how do you split the computation and as I said usually you try to move most of your computation to the side chain because computation on the side chain is very cheap and very fast we have sub-second transaction times which people also like because they enable real-time gain the name game dynamics if you have like chess moves or you have some other games you can literally write every move immediately to the blockchain and so this looks pretty well and then you don't have to learn much you just use your use of solidity and truffle and remix alright so as you can hear we've been pretty busy at scale but what that means is we've also taking a look at how to make this easy for you to actually implement something like this so let's get into what this would look like actually creating this putting this into an app that we built so I have this tab caught rock paper scissors I have a deployed the rinkeby so most of you as you're coming to this blockchain event you're thinking you may use rinkeby as your test net when you're testing things out right a lot of times the submissions require to go through there anyway but let me show you with an experience like that looks like Ford app developers so I have meta mass attached to rinkeby I have some rig beat on fake East if I enter in this game this is tied to a smart contract on the bat well back with my application called rock-paper-scissors anyone want to play with me which one okay what's rock all right good move so we're gonna do this through rinkeby and we're gonna wait because that is what we're used to now working with the blockchain so it might take 10 seconds it may take 45 seconds it may take two minutes but if I were a real end-user I would have already closed this game down and went to another website so this is not the experiments we want to create for most of the users that are entered into this space and even now it's not back well we'll continue on and maybe that transaction will come back as we're looking at the documentation but what does this look like bringing a scale into the picture so we built out this def portal that gives you step-by-step instructions on how to get set up now the getting started is pretty much as easy as 1-2-3 prepare your scale chain by requesting it from us migrate your smart contracts if you're using truffle your are be familiar with this and then simply just testing out that transaction so what I'm seeing here is that I only need to replace the private key and the scale chain well the private key everyone our so if you want to get this go into an end point you'll just hood over and to our discord and you'll receive something like this so here when you reply to us we'll give you a scale chain if you need HTTP HTTP WebSocket we have you covered you're not just limited to HTTP here I'm just gonna use this one for simplification of the demo and let's go ahead and go over to my code and see what it would look like adding that end so you see here a very similar format that everyone's familiar with the point rink B so let's go ahead and add scale in all right perfect and then we'll copy this because as I promised is the exact same format as if you were deploying to rink B and that's really it nothing much changes for you when you were trying to deploy to a side chain now more on how to make this more useful for other users we're going to go over that tomorrow today we're just going to talk about implementation so if I go over to my console here and what I'm gonna do is enter a command that most of you are familiar with as well I'm gonna reset and I'm just gonna call that network for scale and let that run now what's gonna happen here is similar to deploying to rink B or anywhere else you're gonna go through the migration scripts it's going to deploy but one of the things you will see that is different from deploying to rinkeby or any other network is that it's going really fast a lot of times it goes contract wait contract wait contract wait here we're almost completely through that on the deployment here so I'm gonna let that run in the backend and let that finish and then what I'm going to do is I'm going to have Hansard a documentation again here because when we provide you with the scale chain we're also provides you with a faucet where you can get your own test eath we don't have to give that to you and we're gonna provide you with a blockchain Explorer which as you can imagine has to be dynamic because every DAPs on scale chain belongs to them and them alone so you're not going to have another debt transactions appearing here so if I go ahead copy this endpoint I'm gonna paste this here and what you'll see is all the transactions that are coming through because I just deployed by the smart contracts we do do something where we are testing liveliness and deploying an empty box so I filter all those out but if you just want to see that the blockchain is working just go ahead and turn that on but I'm gonna go ahead and hide this and let's go back here and test this out with my new scale chain so it looks like the deployment completed I'm gonna come back here and for simplification I'm going to change in a meta mask tomorrow we'll show you how to not use meta mask for this switching it to my scale chain refreshes everything so let's add the ball chain back in there alright now who else wants to play with me this time yes scissors scissors and we didn't get to see if you won but ring B took too long so we'll do it again all right well scalp you notice how we waited forever and we didn't get a reaction here it's almost like real time so this feels like an actual application like we're not dealing with the normal day-to-day operational blockchain and so this is what we're trying to achieve here usability not just for the end users for the minute for the dot developers it goes beyond that there are a lot of features that stand talked about such as that entertain messaging feature if you're dealing with the RC 28 RC 721 we have you covered we're building built-in features and make it easy to deal with those type of tokens but it goes beyond that - if any of you have even thought of spinning up an ipfs node to be able to store something on a blockchain well we tried to make that process even easier by adding in file storage now file storage allows you to simply use an NPM package upload files download them delete them share them with the world or share them with your browser directly here and all of this is made possible directly within the scale chain so you don't have to figure out how to set all this up on the back end by creating your own ideas now all right so we covered a lot any questions about that yes yeah so the validators we're building out the validator network as we speak so it's being built at the same time that we're onboarding early customers and so the whole idea here is that we're going to do a phased approach to own boiling validators but it's completely decentralized so the validators are not scale is not friends of scale necessarily it's going to be pretty much like the world anyone who wants to spin up a node will be able to do that if you want to learn more about validation if right behind you we have Liang sorry to put you on the spot here but he is the one leading the charge or on building out that validator network he's doing a pretty good job at it as far as like getting a lot of people like lined up so that way when we're ready to launch the main net they are - so how much you take that one yeah that's a good question I think first of all what what we learned through this entire are kind of our own experience this blockchain we think that you pretty much with with this main nape and side chains you can create pretty much anything you can take any website now on the regular internet like eBay or Facebook or Twitter and you will be able to do it using either side chain so main network emanation so it's what it looks like is that this entire ecosystem of solidity and remix and truffle all of the things what's going to happen like five years from now ten years from now that the ecosystem is going to evolve but it will stay very much the same we depth like there was this first web browser mosaic and then there was Google Chrome and Internet Explorer and Firefox and everything and we don't have the mosaic anymore and we don't have the JavaScript as it was like in 1993 but it got evolved so we still have JavaScript and what it looks like historically was going to happen what we are waiting on is that this is zero there's so much momentum is there ten years from now it's a pretty much stay the same if I believe I'll never be a revolution will be evolution so it will be still solidity still EVM and still all the stuff but it'll be much more powerful so this idea of side chains is very reasonable now when you have a side chain you're definitely making the trade-off because only zero maintenance erratically you have like infinite number of nodes which provide you this infinite security but at the price of a very high computation cost because you repeat the same computation essentially on a very large number of nodes so necessarily you need to make a trade-off between the number of nodes when you make the computation and the price pretty much because someone needs to pay for this computational capacity but what we so the trade-off is definitely it's a smaller number of nodes but the developer decides when you run your dieppe if you run an exchange maybe you'll pay 400 node side chain if you run a simple social network maybe it will be enough for you to have 20 No so the degree of centralization may be different but what we see though is it's very interesting thing is that that this internal security problem of validators becoming militias or Byzantine it starts to play actually less and less role because what we see is that validators themselves are becoming more of a small businesses and medium-sized businesses and not just people as they used to so there's this reputation and there is much less possibility for things be getting when Sir so what's probably gonna happen 10 years from now you will have like the world where the validators there will be small businesses around the world that probably won't be just people because it will require lots of IT experience to run those validation nodes especially at high speed at high security so the world which is we're gonna see 10 years from now is gonna be the world where you'll see these small businesses like the small fish creating this large fish and that's how the world economy is gonna evolve and then you will have this valid interest which presumably have reputation and long term objectives and you'll be like selecting out our network will be selected randomly validated through a particular side chain and and rotating them and the security problems for the most part we see as coming from outside as coming from outsiders hackers and not validators themselves because validators actually have long-term economic interest in the entire and reputation in the entire system becoming good and it's not only a question about slashing just like if you misbehave I take hundred dollars of your money but is the question about your reputation if you're a doctor right and you make a prescription which is wrong and you have to find one hundred dollars then you'll not only find one hundred dollars but you just throw your reputation professional reputation and your patients will not come to you so we'll probably gonna see very much things very much the same happening in the validator space where being a validator would be like they can beam a doctor you know bill Chivo cherish your reputation because even the best us will come to you and stuff so these people will be pretty much caring about security and then still there will be this trade-off to make small achene Latta chain and there is another important thing which one can help make to protect security is if security is very important you can increase validator deposits for a particular chain and make this validated deposits as a last resort to guarantee payments happening on the sidechain so let's say you run centralized exchange on the sidechain you you can have mathematical possibilities as last resort if you did a double spam but something bad happening on the sidechain you use the money that the validator is deposited to guarantee the user money so essentially shooting sponsibility from users to validators but this is all only limited to the amount of capital that validators put in the psyche sir and there and then users actually pay for this capital because that will increase the the things you pay to the validators because the validators to be like you have to look more capital so so this will be chemically determined I think by the real life and we don't know exactly how it's been gonna play but in the years to come we see lots of very like great things happening lots of people became indigenous validators people trying to do all kinds of networks so with this is this new economy which is very interesting because you have the small fish you know all around the world creating the system which is much more effective economically icing and that's really exciting part of this yeah so so there are several mechanism to to recover funds first of all there is the the possibility to go back with transactions for for a particular day let's say your chain was working yesterday and there was a checkpoint so the chain actually makes a chain makes checkpoints you can make the checkpoints every certain number minutes or hours or whatever usually once a day and it pay you pay for this so you can go back to the previous checkpoint and then you basic basically loose transactions which happened further for the particular day and the way this would probably happen for the side chain is that it was secure if there's a security compromised ussi chain owner would vote that you had the security compromised the foundation we are setting up scale foundation that will be decently designed that set of computer computer experts will have a jet lag and pure experts they will vote that you had a computer as huge compromise and if both the deal owner and this computer security experts would there was a security compromise they will be able to roll back the state of the chain to the previous checkpoint which would be like the previous day so that would be a bad thing but not a catastrophic thing and I think differently we need to make provisions like that because it's impossible to guarantee computer security for an infinite amount of time you know you see a security compromises are happening all the time so the best thing about security is to be proactive and actually honestly predict that sometimes things to go wrong and have some Security Response procedure to fight back alright there's okay deployed in the main that usually what we have to do is also to point out on the side chain and then do some kind of transactions to make sure that everyone has a 1:1 ratio so you won't have to worry about handling that we do that for you and our documentation we actually just have just kind of like a quick example of what that would look like for the methods you would call in our spot contracts one of the main net and on the side chain so from the main that what you would do is call on deposit and what we do is we put that in a safe deposit box for you from there we automatically make clones of that same token or in our side chain for you to be able to use so it's always gonna have a one-to-one correlation for what's on the main net now whenever you want to exit and send it back to I don't know the winner or a new user or the same user from the side chain you would then be able to call an exit script or an exit method so then on trigger that transaction to exit from the side chain and what happens is we just burn the tokens on the side chain and we released the funds on the main that for that user so that process we're building for you because again we're really concerned about usability just trying to make sure that that folders that developers like to a lot of the heavy lifting for this so all right well that ends our session before we go we do have a few on prizes here for the bounty so if you simply just run through that same demo I just did change the endpoint deployed a scale you qualify for one of these prizes so try it out if you want to get a skull on changes come chat with us on scale chat which will put you into our discord or come see us at the booth

Automatic transcript — names and jargon may be misspelled.