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

Loading player…

EthereumJS Javascript Ecosystem/Sharding by Holger Drewes, Ethereum Meetup Vienna, October 2018

DevconWed, Oct 9, 2019, 12:00 AM

Talk by Holger from EthereumJS at Ethereum Meetup Vienna with an overview on the current Ethereum JavaScript ecosystem and an outlook on what new tools are being developed and how things might change on the way towards a future sharded Ethereum 2.0.

Transcript

yeah hi everyone I'm I'm working with in this room desk project this is a which is a JavaScript project of the ethereal foundation and today I would like to talk about the JavaScript ecosystem yes I see it because centric but I will try to look a bit beyond the serum radius and also look at other libraries which I think also for having me I'm actually living in Vienna and attended lots of crowds meetups and it was actually one of the reasons why I actually did so deep into you that I always made such great presentation presentation so thank you for that I also during my preparation at some point I put an asterisk on this ecosystem thing or title and actually any to the title that I would like to talk about this in the light of a future Charlotte cerium because they thought this would be maybe a bit more future proof and bit more interesting so I would put everything in a comparison how is the JavaScript ecosystem now and how could it looked like or how is it already developed within a charted context and what is already there and what will be there in the future so what is the theorem they asked maybe a quick question who knows it soon yes okay to pure than I thought actually ok yes it's kind of historically evolved to be community contributions and now it's and maybe doing base level infrastructure components in JavaScript so what is not is web 3js but we maybe do stuff like we have a machine implementation in our appeal library for data serialization because in the one repository called organization which is for project management stuff so if you've got ideas what we could do better or a few got you've got suggestions you can go there and just finally issue and I just revive this a bit because it can change some stuff we are digital channel for our communication which is if you've got questions on the library's so I will look at for centric blockchain specific topics on virtual machine the consensus layer architecture clients and developer tools and I will talk a bit about what's in ECM one of them what is the current state what JavaScript I've missed do we have and also yeah what what are the characteristics for theorem one that Oh structure and then I will move on to charting obvious what it would take for charting and at some point also it to come up with because there also areas where there is not so much there [Music] if you want from a team called prismatic lips okay so prismatic plexus got a too much fun out of nowhere in New York and they were so good that after a couple of months they got a really dollars I think and now they are doing the main implementation of charting and if you want to to really look at the code you can google so yeah and otherwise if you can wait a couple of weeks more until you want to really get deeper into shining you can also wait for the difficult for talks being recorded and published because so some history I'm showing yeah actually I thought about should I talk about shouting history or or other as it's going to be better then I can't talk about starting with not mentioning the history because actually it was just June 2018 like the shouting and the Casper roadmap change completely and then this was a time where a bit of it was in the cortex call and most quarters called number forty and that was kind of decided or published that before there was the structure was it there was a shouting manager country which is contract and [Music] no but there's no so it might be I don't know for you if you hurt and in the some some picture this yeah so there's a main chain at the top which provides the input for forsaking then there is the chain beacon chain and one main topic for the beacon chain is also to provide random numbers and generated and distributed fashion so this also this is a high highly discussed research topic like how to generate numbers and how to generate them from from within a distributed nature and unbiased so that their good friend room numbers which can be taken for for taking from the whale but it had food some some validators which actually do the validation processes because otherwise you can have various types of the text if you just have some pseudo so I don't know numbers which can be guessed before and then with short chains below okay if you don't get everything from this picture took this from which is okay that was some introduction to sure I'm not going in the first topic with which is a virtual machine so what are the current characteristics for the virtual machine and cerium but at the moment we've got a snack based 256-bit virtual machine so this kind of different than the normal design of current computers I was 64-bit with over 100 codes and these are kind of like dedicatedly embedded for for the serum virtual machines and there are of course operation codes like address or balance which are requesting the current or of course for calling into other contracts and many more and and the thing is also there are codes continuing so no inconsiderable with too or I will be left to moral codes like where I've talked about this is ex cottage and create 2/3 so the thing is actually getting more complex over time as well one thing is also they they're precompiled in the current virtual machine which means that you some operations like a cost intensive and you just can't do them in a contract in a solidity contract or something and so forth for something like a hash generation which first up for example here in sha-256 hash which is kind of cerium this would be to cost expensive so that would be too much gas used for that and so this is then implemented natively in the code of the different note implementation like in JavaScript or in an NGO or in in Brust yeah this pre-compile also adds complexity to the whole machine everything you would expect from a computer opcodes for example so you start you start with solidity contract disability contract is compared to the bytecode these by codes represent represent actually the different opcodes plus some bad news in hex written in hexadecimal value and this opcode is kind of forwarded to a virtual machine and then executed if you look at this is actually some part of our JavaScript virtual machine implementation and this is at the end to the machine we're example using the native when we do new for a new city Noble we have to do this 4x cottage and then there are tests external tests which have to pass so that every every client stays in yeah this is our JavaScript virtual machine that's called the studio jaeyun so every Mars all our libraries that kind of tweet yes and visit actually but then dancing comfortable virtual machine or Constantinople is currently progress I hope that we can finish this in the next two three four weeks but I won't promise so this would be good actually because then developers can use this or remix can deploy this so that you can use so we are because we know that already so if you are interested in digging deep into the virtual machine this is one way you could go actually this is much better than reading the the yellow paper I start with the yellow paper and I've just got completely desperate after some time because I couldn't read it yeah so what are having specific needs for a virtual machine there there are no so much to typically but since we are starting afresh with short chains and we now have the freedom of choice and there is no real need for backward compatibility so since the current virtual machine is not so optimal in terms of performance and design complexity we can start fresh here and this is where where it wasn't concerned yeah so most pressure on the shirts they would be bottom as these standard language [Music] which you can see need to be able to instructions execution probably won't be the need for pre-competitive Hawks get much much easier and one of the main benefits is that there's a promise that smart contracts can be developed in traditional languages so you rely on any more than C C++ arrests and we can also use a whole tool chain from webassembly where Sam is a huge effort and there's a whole community around the campus and stuff and we can use all the tools like also the contracts and there's a dedicated it was a team at the Assyrian foundation and interesting so which to do use my contacts right there's some some coat house such a country could look like these are just experiments from there I took randomly from the eve of the repository so don't take this as a code how things would look like there are also there's also some code you can find in the II wasn't repository and github and there's studio you can also go there and some this group is actually an officially supported language there this will hopefully and second dropped items in JavaScript we also got an e th implementation this code is taken from this from this library it's called ETH ojs which is working in implementation which is also good for learning if you just want to look into this either isn't a rough idea what's going on there but it's also slow so because it's JavaScript so if you want to just a bit more performance findings library implementation and just got no - ETH but since I'm not super super magic proof of work experiment with others and there's and if you want to look at your code I - look at this prismatic life coach this prison implementation even if this is [Music] and prismatic lessons pretty pretty new actually they never released their first release on vegan chain last week you can read blog post in this and they they named it very humbly version 0.020 and this is extremely hungry because there's an extreme amount of work already gone in this release but many things are just some things work and some things are just simulated but this is kind of I think the first release we can see shouting in action and then this is kind of a bit similar like when you're starting at G's client on the console and see console output and you can now we can relatively easy steps like it's like half a page of instruction you can install this and then you actually really see a leap in chain client in action and this actually makes all these concepts like cross links or everything which is going on and all the terminology much more it's it's much more grass because if you read your specs and you're you're kind of like often or like that you often lost again and again because you and if you see the output and see actually some interaction in the latest blog post just describe to you what you can start with it ok so now I will talk about the client architecture and how this our client will differ in Charlotte and in an uncharted Assyria oh yes and client is also I will talk about this more later but the client means believe the shard clients in a Charlotte so much so so so you need to store because you're just communicating inside the blockchain and then in between accounts so we can create some years yeah and the networking communication some protocol which is just developed for serum [Music] so and and one thing I'm especially excited about historically running this [Music] so before we just communication between accounts and now we cross shark communication is also on the research topic so how do train detection come from one sharp to the other and how is this communication taking place the main question is there are we as synchronously are we doing a synchronously and synchronously [Music] in the networking communication to each other ready to actually transport a packet any clarification the application so yeah yeah guess code where events event framework and you're on the left yes definitely PTP limitation on the right the Jas let me repeat implementation I won't explain this code here just at the end here and yeah in the future if you're interested in [Music] contributors connecting to assume there are some yes actually he wasn't changes the work from fifty to sixty four-bit it's important to state whether whether follow the same ABI for contract data passing already find one more appropriate with website so on the question of what would have to change there on the function on the side you can ask is the question connected with chart with the unified functionality to connect Network they also infrastructure challenges so imagine an inferior in here is actually a service where you can connect through an API to if you note without having to run your own node which is very useful purposes and yeah so they are really new infrastructure challenges on that um there's a question once what language are will be used actually to talk to know what what API at the moment we've got this defined json-rpc API to talk to a node and likely this will also change in a Charlotte world so will be some specific functionality which also needs some specific language to talk to ecosystem and the standardization of stuff and lastly there's a topic of contracts computation from various languages not just solidity will solidity you can be comfortable it was and yeah edit resistant u1q and the answer actually was maybe so yeah this will bring probably there will be some cross compilation stuff so you won't have to be afraid that language this is just a brain-dead idea to use these languages too generic yeah then there's a change back with contracts a very very good trick and I'm really excited to see what what this will bring for the future [Applause] [Music] I'm trying to [Music] so I just [Music] because [Music] I just want you so Club it it's gonna be three minutes maybe but it is cream

Automatic transcript — names and jargon may be misspelled.