# Ewasm community hangout #7 [2018/11/15]

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2019-10-09
- Duration: 36:29
- Topics: blockchain, smart contracts, distributed ledger, Science & Technology
- Watch: https://streameth.org/watch/yt-vj6o6UCfyIY
- YouTube: https://www.youtube.com/watch?v=vj6o6UCfyIY

## Description

Agenda: https://github.com/ewasm/pm/issues/22

## Transcript

you okay so this will be just a quick really quick meeting we are going to show a couple of tiny things and first of all how do we organize the test net and what kind of milestones we are going to have had to know when the testers will be updated and then the second part you will try to show how to compile it a go atrium client working with the he wasn't testing it and syncing it with the test then so I will turn on screen sharing let me know if if it works yes I can see your screen alright so it wasn't that the theorem that work is the the main landing page and for the test net it has a really beautiful logo and a couple of different links on the bottom and so the the guide itself goes to our test net repository which explains how to connect to the test net and it will also explain how to deploy contracts and etc and and that's what we're going to have a look at later today and the Explorer itself of course goes to the doctrine Explorer which and is able to show a lot of different things and the studio is just a tiny tool to deploy contracts and the other two should be self-explanatory and just we have a quick look at the Explorer you and it is nothing really you know surprising about the Explorer it is just regular Explorer the only interesting part here could be this contract the central contract which is a system contract and it is doing validation and metering on deployed contracts okay let's see this single contract here I believe this should be a webassembly contract which has been deployed recently and one can see the actual set that debt above should be the webassembly byte code but the WebAssign byte code can also be represented as a text format which is called the worst format and this is a you know what the byte code contains and it's also possible to see the storage entries for a given contract okay I don't want to go too deep into the Explorer myself maybe Hugo wants to show us around later so the way we organized the test that itself is to a github project board which can be found on github just going today you wasn't project and then clicking on the project's tab and here you can see three different milestones we have in progress and the first one on the bottom is the one for today and if we plan to make another update to the test net and like three weeks time and then a month from there and on this single the current today is my stone here are some items which we haven't fully completed yet but on the right there are all the items which we did complete now the goal with this project listing is that we have a fixed date for the release and we are narrowing down the scope as we get closer to the release prioritizing issues which which are more important and removing the the ones which would be just nice to have okay are there any questions so far or should we just move on on to installing a client Alex just to clarify the so and there's a release on the 10th of December they will start with a new chain a new new Genesis so everything will be wiped yes that's correct okay so the plan at least for now is to restart the test net which each milestone and because having like hard Forks would be an extra unnecessary complexity we don't really need right now and and it should also help us to you you know should we have you know should someone find some issues in the test net we would just get rid of those issues and and deploy the fixes okay then let's just quickly look into how a client can be installed and well actually I can go back to the main page and click on the guide on the main page which brings us to the main readme which is under heavy improvements undergoing heavy improvements right now but there's already a part right here ending a note to the test net which explains step by step how somebody can connect a fresh node now here are the basic prerequisites which are needed important to mention is the version of goal and the version of CMake otherwise the regular C++ compiler is also required but nothing really fancy and here the actual steps I think I will just change the screen sharing to the terminal and we'll just copy these items one by one to the thermo but basically first we need to build our own version of Kuiti REO which can be found at this location and with every single milestone we are having a different tag and so it's it's easy to distinguish which version of the test met somebody tries to build a client for and connect to so the first step is building this kuwaiti room client which has some specific features made by us hopefully those features going to be merged back into the official guity room and soon enough and then test stuff will be obsolete and maybe with the next milestone but it's not fully up to us the second step is to build Hera which is a II was in VM and test this is a C++ piece of code that's why we need a C++ compiler and the next step is downloading the Genesis and setting up the local configuration for go aetherium and then lastly is the step for connecting to the actual test now okay I'm gonna change the screen sharing to the terminal you Oh you is the eternal visible so you should see II wasn't - workstation to mr. prompt directory here for the test so of course this machine has this ludus machine but it also works on on Mac OS with it and issues this machine has all the prerequisites installed now while I'm going through this and I think it would be a good time to because this is gonna take like three four minutes in total it's probably gonna be a good time if you guys have any questions please ask them now so axis this mice while stone one will be updated right when on the 10th December yes we're going to have my stone - and the instructions likely gonna be the same except using this okay my stone one they're going to be my stone too okay let's let's copy the build binary to here and so we have got your bill oh sorry did I yeah yes so we have going to UM built and now we can build Hera Alex why aren't you loading the binary release of Hera alright I could do that yeah because I be in doing this mostly on Mac and we don't have a release for the Mac ever released for Linux so I could do that now but I think it takes like two minutes with on this computer to build you yeah and so what's that same uh he was him test at the milestone one is gonna be the released egg for we're both Hera for guests except that way when when we do an update a milestone - and then you just change that genius that consistent get get tagged all the repos you I suppose it's the power of took like 30 seconds to build Concord to C++ you maybe once about begginers ready we can just tell people to use wagon we'll be the default instructions what do you think it would be 10% of the time to install a node yeah and wagon by the way as as the goal implementation of a web assembly interpreter and Guillaume has been working on using hooking up the Geth Plus wagon I didn't test net you you so the CB also have hardly on the call do you have any any questions if you have to you're compiling stuff here hey Alex oh one more thing sorry for interrupting so inside the Goya tedium folder we will do the git clone of Hera right after they make it yeah I moved out to a different directory so just to school I mean my system is bit slower than your so that's why okay yeah so it's up there and so we downloaded go et room we built it and I just made a copy of the there I just made a copy of the build file and placed it into the test directory and there we're compiling Kara almost finished you yet this seemed actually to be faster on on Mac you you yeah maybe to expand on vague in a bit wagon is a KU implementation of webassembly it's an interpreter and we have Guillaume in the team who is also a member of the KOA trium team and he also works on whisper but he also works on on it wasn't and he's integrating wagon into go a terrarium and adding the the tiny piece of code to to support it was an inchoate eerie amusing wagon and it actually is working but we had a couple of we had a couple of changes and the interfaces which wagon had no chance yet to to be updated to but I think for the next milestone it definitely will be fully working and this process will be much quicker ok Navi of Harrow built let's just make a copy of that is it here yeah okay so now in our tested directory we have to go to your binary and we have error so the next step is to download the Genesis and which is also listed in the readme and now we can initialize all the data for criterion I missed it okay and now comes the the big command of actually pulling all this together so all of this is actually listed in the readme I'm just typing it up it seems easier than copying so this part here is like the only Special part which is needed in case of using vagin and the lip lip here a part won't be there but the other parameters will be there at least initially and but apart from test single - - p.m. that he was in parameter everything else is the same just like you would use go a Tyrian let's just enable RPC but we won't enable mining forgot one tiny thing because we haven't updated the readme yet to deal with that so now we actually just run into like limitation of on inchoate ear 'i'm happy the peer-to-peer networking works if we just specify the boot node which is the remaining nodes vm on the test net and and we don't specify no discover then the client works but it will try to connect to any other random interim node and there's a lot of extra peer-to-peer traffic you know connecting trying to connect to all the nodes on the regular network but due to the network ID being different it's just a useless connection and but if we specify no discover then even despite specifying a build node it won't really connect to the build nodes so one way around this is I'm actually not executing this one one way around this is adding a static notes file which have to be placed into this initialized directory it into get directory that has to be named static - notes that JSON and it is an array of it's a it's a JSON file and it's an array of the keynote like identifier so this a node came from the readme and we will also include the static notes JSON file into the readme so one can just copy and paste it you and now if I copy the command I had over there then everything should work magically you well I think it worked so if you keep keep waiting here a bit then all the incoming blocks should also show up yep I think it's did work salmon that that's that's it from me I'm not sure if anybody has any questions down you Oh you all right then I don't think you have anything more to show at least right now but we plan to have the next community call just right after the release of my stone too and so we will communicate the date much earlier than we did for this one and probably everybody a bit more interaction regarding how to deploy contracts and had to had to deploy EVM countries that had to deploy he wasn't contracts and had to interact between them so that is the plan for the next milestone and for the next community call okay then I think we can if there are no questions we can conclude this meeting and hopefully it's gonna be up on YouTube and see you people can can I have a look at how to you have to deploy the a client thank you all for joining always okay yeah you go please go ahead yeah well I don't know if you want to or you want me to show how to deploy like a simple contract doesn't it and if you're ready to do that and you wanna show it then please of course stop my sharing and you can take it over Alex I have just asked you one question on the chat I don't know whether this question is good for or not I mean this is supposed to be get uploaded on YouTube that's why I just I mean I'm not sure I fully understand the question yeah me you can you can ask any kind of question on this call it's really up to you yes so what are the community projects I mean you're expecting to build something around II was um so there is a project called as Explorer was an explorer I mean for the webassembly it for II was am I have seen that yeah you guys have built but that's I mean just like a bear one so for the web assembly they have implemented for C++ rest and yeah C++ and rest also so is there something that can be built around this Eve awesome similarly just like awesome looking at the link I think this is the earlier version of what is now called the assembly studio yeah and yeah yeah the webassembly studio is is the new version of this and we were looking into integrating it into your pipeline and one way to integrate it is having an actual language in it which has some of the extensions to natively support you awesome and the only one which works easily with webassembly studio is assembly script and so we have a project in place to extend assembly script with Eva's in support and by that I mean that there would be built-in helpers to you to create contracts and it would generate old ABI and all the of the other things needed to be a contract and there would be no manual work required so hopefully that's that's gonna be released you know sometime in the near future and if if anybody is interested to you to work on that that is a type script as less JavaScript project and we definitely would welcome people to you to help EPS on that so it will be mostly like a fiddle just like jsfiddle where you will gonna write the smart contract in one language and you will get the Evo subcontract on the other side right yeah and it I mean it's only for assembly scripts so one could write assembly script using the assembly studio compile it as a contract and then deploy from the from the same interface that is the end goal thank you that was a good question Hugo if you want to code them please go ahead can you see my screen I can okay well let's say as Alex said in the main us own website we have this access to this tool which is called a wesen studio and this tool allows to deploy contract to the US Internet so in order to do that we have we need to have meta mass installed the meta mass extension and also we need to configure meta mask to connect to the the II wasn't present it we can do that and go into settings in here in new RPC URL we have to specify it was done and a five four five a support so we save this configuration and now we are connected to the to the US investment sometimes when you connect to a new to a new network in metal mask you can see in the history you can see other [Music] transactions so I recommend to go in reset the account so you don't have any problems with with the nuns so you can do this again in settings you can reset your account so one once you have connected to the to the test net meta mask you will need some some USM it in order to submit transactions so to do that we have also in the main it was some web page we have access to the faucet in here and the phone set the texture your meta mask address and you can request one either from the FAFSA so I'm going to request one meter here and now we can see that we have a transaction which is sending us one either we also can take a look here in the Explorer for pending transactions right now it says there is no pending construction so we may have this transaction here yeah we have the FAFSA the phone set is sending us one eater which will request it so if I go to met amassed again I can see that now I have one it wasn't meter so now I'm able to to use in western studio it wasn't studio in it wasn't studio you can send transactions to an address if you specify here and address for a contract you can call that contract and you can send some data here or some value but if you leave this address empty what studio is going to do is going to deploy the worst thought you write in here or you copy in here so right now we are going to deploy a very simple contract which is this was code we don't specify any address here so we want to deploy the contract we set any value here so this is a very simple contract it only is reading the depth current block number and it starts the block number in the key 88 for the storage and then it use storage load to read the same value from this key and then it is story start the same value in this new key 99 so I'm going to deploy this contract when I submit the transaction it open meta mask so here I just have to confirm the transaction and you studio show us the transaction number so if I go again to pending transactions there is no pending transaction so maybe this also already processed so here we have the transaction matalas confirmed we have the transaction so if we go to the transaction we can see that this transaction is deploying a new contract and here we have the contract others we can go to these new contract address we can check the code here we have the webassembly bytecode for the contract and this bytecode is from this bytecode the Explorer is is actually getting the the worst code but the difference here between this ones code in the worst code we initially deployed is that the Sentinel contract is adding this new statement for example audacity the use gas and for each one of these branches it is actually charging some gas so right now we have nothing in the storage we can use it wasn't studio to call this contract if we set here the the contract address and we can send some some Barrio and this will call the contract and this code which will be executed so let's submit the transaction confirm gets the transaction received [Music] here is a as a pending transaction now it is processed you can see it here in the new recent transactions and if we got going to this contract we see that there is a new recent transaction calling the contract so this code this code gets executed and now we have the storage changed a now for for these two keys we have the the block number in which the in which the transaction was processed so yeah that will be old my - I just wanted to show how to deploy this simple contracting and how to use these equations - yeah - to do it and also to clarify how to like configure meta masks because sometimes sometimes there is one of the common issues for example these are denounced issue so yeah that's it for me well thank you go I want to point out on the on that contracts storage actually I think that endedness might be wrong for the value thereof the block number yeah that's that's a very large block number instead of at the end of the 256 bit value you'll sort that out later thank Thank You Hugo I think it was really great so do we have any questions or should be conclude nothing for eyes I didn't thank you everyone for joining today and let's have another call in a month one from there thanks thanks everyone thank you bye-bye thank you but
