DAPPCON 2019: Workshop - How to Become an Eth Core Dev w/ A. Akhunov & D. Khoklov (Ledger Watch)

DappCon 2019 · August 2019 · 1:22:31

At a DappCon 2019 workshop, Alexey Akhunov of Ledger Watch walks attendees through what it takes to become an Ethereum core developer, covering the client implementations, testing processes, and protocol discussions that shape the network. He draws on his own work on Ethereum client research and tooling. The session offers a practical entry point for developers who want to contribute to Ethereum's base layer.

Speakers

Topics

From DappCon 2019, hosted by Dappcon Berlin.

Transcript

so welcome everybody and thank you for coming to our workshop and so it's not just me who is doing it we're a team of five people here it's yogini Boris mitri and Andre so we'll be taking turns and this is the structure of the workshop so first I will do a little introduction and in describe in a general idea what you can do if you want to become a core developer which are the different paths you can take and then it will be followed by a guinea doing what you want to call yourself you Gino yogini so he's going to do show-and-tell which is gonna

be sort of live coding session about for 40 minutes and you would try to show you how would you implement it is a relatively simple AIP and a Gaussian code base and then we will have Dmitry showing how to construct a simple conformance test for this AIP then we will be break4 so just before the lunch boris volga is going to give a quick introduction about what you would be expected to do in after lunch if you are still here and then after lunch we're gonna try to do it yourself session which all of us will be available to help you so you see there's

quite a few of us so hopefully we'll get you if you get stuck we will help you so let me start ok so basically there is a the one of the goals of this workshop is essentially demystified the demystified the sort of the the core developer profession i would say is that you know and to encourage people to try in and and then just enter this field and so generally I would say this might not be entirely correct you could choose three different paths there might be more paths but these are the things that I just could think about

so first of all you could try to contribute code to establish the implementation like a go a serum or parity or something like that or you can you know you can try to start your own implementation or your fork the existing one like like we did with surrogate and just do something completely different or the third option is that if you don't want to be so radical or you're not sure yet about coding you can review the code and write the test cases which is also appreciated obviously each path has its called pros and cons I'm not gonna read it out for you or so you can see it so generally if you want to be more radical experimental you might want to to just

do the fork of the existing client or implementation and/or it starts at one from scratch which is super hard but it's also very educational or if you want to just be very popular and you know be everybody's friend you can choose a third path because everybody will love you for that so then so as I you might know that so the the the story of the true bequeath is that we chose this the second path and but regardless of what you choose first to the second so let's say that the out of all possible programs that you can write

what actually constitutes a correct viable theorem client so you can look at the theorem client implementation as the something which is very heavily involved and data processing so you can actually maybe you could sit down yes I just wanted to show you the faces but they you could sit down so the it's a heavily involved data processing in this diagram very schematically shows you that the data flow so as you can see that it's pretty much all about the data processing so then so what are your constraints out of all possible programs that you could write what is the what is the the correct Assyrian client so from my point of view the constraints coming

from two things so all the data that is a is baneful is flowing around the serial implementation there there is some pieces of data which more important than the others and this is the authenticated data it's the data that somebody has a kind of put a stamp of approval on authenticated in some way and you can think about two such important pieces of data the block headers which has been sort of approved by the miners by producing a lot of computational work on this and the block headers contain some pieces of information for example the State Route transaction route and so forth these are the like a short summarization of the

content of a theorem state which you know it's quite large or a content of the block which is the transaction hash or the content of receipts which is the result of execution so whatever you do however you decide to store the data process them one of the constraints that you cannot avoid is that you will need to be able to compute this for things like uncle hash to transaction hash risky - in-state State Route hash you will have to compute them efficiently so that you know you can you should be able to compute them very fast and compare it with a block header so that's one constraint and otherwise you're pretty

much free but how would you do that and the second thing you need to do is that you need to respect the digital signature so essentially the people who are holding ether and they can they basically entitled to send transactions into this here network and get it getting included so those people are using their secrets they generate digital signatures and obviously when they generate those signatures they construct a transaction in certain format so you've got to respect that format and you should be able to you should must be able to verify the signatures so these are the constraints in terms of data everything else is up to you like you can

anything else as long as you respect those two things essentially and and oh actually they're the important bit here is that there are a lot of conformance tests in a serial clients which are actually shared between the different of limitation and this is what mitri has been working on for most of this time in in in cerium so it these conformance tests are actually their main purpose is actually to verify that your implementation actually passes these two criteria and and then apart from being correct your your your implementation also needs to be useful because it's not enough just to verify the blocks and

headers so what is the point of running this your implementation usually it's it's either some kind of data structure that you want to perform so essentially you're a serial node is your window into the fear of network it sort of receives the data from outside and some sometimes you want to query it you want to either ask questions about the current state or about history and you either want to get the proof of that or not so depending on situation so depending on how you're intend to use your implementation you've got to think about so will I ever be a will will I ever need to query the history and if you did and if you don't then you might skip some of the things that relate it to the history or so your

implementation might be a bit simpler so and for example the use case of the mining mining you note is that you need to be able to quickly notify your your sort of application stack about the new blocks arriving so that's kind of the block latency and they could be many other use cases but that's basically main things that I could think about it's like your your SD just get some data so let me see if I think I've got my ten minutes so now what we we're going to proceed to the second part we need to switch the microphone and while we're switching

over any questions we're going to we're going to implement an actual AIP I think it was accepted and merged into the Istanbul Hart fork last week so my part is to implement the CIP in go aetherium client and the part of Dmitri is going to implement acceptance tests to be sure that these ap works well on the Istanbul Heart Walk so let's start let's read this PAP as a core developer we can

substract intubation everything is good and interesting however as a good as a core developer I'm most interested in specification so I can see that this ap is about changing the gasp gasp for three operations like a sled balanced exit code hash and these introduced introduces and year code self balance that shewed that that should put on the stack the balance of the current smart

contract so if you read all these document you will find that this ap is essential to balance the network because at the moment gas prices are in balance and and this IP should help us to introduce Dicky starts and restarts and to bounce their prices okay let's go to idea and okay [Music]

yeah nice okay let's start from searching where all these constants are present in going court so I'm going to do simple find on the whole project and it's second party will work only prepared by us branch it only difference in one thing it in it already introduces Istanbul fork because of it was not yet

introduced in go through by velocities it's it's too early to introduce a example fork okay yeah [Music] if you really want to can be sent the link okay I'm going to show the branch one second please the pouch you can find it on my

repository here is it second please it's loading something yeah it is my name so you can type it and find this go to the repository in github and then you need a special branch circled Russia okay okay so let me continue I was searching for as load constants in the code and the first believe that I found is about

as low gas price gas cost so I'm going to this file and I'm in go through parents particle crumbs and I can see here a lot of constants related to the universal machine and the theorem consensus as well I think let's find these constants okay as you can see we have a bunch of constants for many all for operation codes and they are named in a pattern like the actual operation

court guess so yes cost and the fork name so the only I think we need to do is just copy paste it and introduce new cousin for Istanbul fork so has slowed yes is Istanbul water then we need the same for Xcode hair yes okay introduced in Istanbul and the last one is about balance gas so just following

this okay so then we need to change these values as it is specified in the EIT so Selden's fellows should be 700 as load should be 800 and his code has should be 702 okay at this point we have introduced all the constants we need for the first part of the AAP okay can I go okay

we need to find the places where these cousins are used and where they are used in a theoretical machine to calculate the total gas costs all the coal so let's search for balanced gas usage and the only usage is in commercial machine jump table as you can see these Falcons things a lot of constructions constructors and they are construct these types like arrays of operations we do have we do have these instruction

sets for each hard work so I think we should introduce a new one for Istanbul hard walk boom this faction said and if we take a look to another instruction sets you can see that they are constructed as in a way of inheritance so they create a previous heart for destruction set and then they change things they change actual

operational parameters all introduced new ones so it's like we need to do the same because we want to be compatible with the previous heart hawks and the previous one was constant Anibal so struction said to duction said then return instructions said okay what else we have a constructor but we didn't change anything at the moment so let's try to change our dust causes for as slow as you can see this instruction set

is just an array of 256 operations and [Music] we can address any operation but by its operation God and we have a bunch of constants for for it so assload we have constant gask and we can change it to parents who start Istanbul so we just changed the first gas cost for s load for to introduce the two just introduced new constant and then we are going to keep

pace things and do the same for balance okay let's check do we have balance constant yes we have balance Istanbul and the last part is about exit code he'll ship yep next go - temple okay we did all the changes in a constructor but it doesn't used anywhere yet so we need to find where these constructors are used let's find this one new customer

per instruction except it used in two places one of them our new constructor and the first one is these these variables okay let's do the same let's copy-paste and I just mean you variable stamp instruction said okay let's foreign fielder well these variables are used okay here's some interesting happening here this is a constructor for the field virtual machine interpreter so this is

the thing that that gets the sequence of operations the calls the proper functions for each operation and get the result and we can see here that we have a big switch that checks at what for we are at the moment and creates a proper instruction set for this for okay that's it and you are follow these yes we have a constant for Istanbul already so if we are on Istanbul if it is true then we should

use the instruction set for is temple for Stamboul instruction set okay let's check that it compiles [Applause] so far so good our code compiles well and at this moment we completely finish the first part of the as you can see it's not very difficult and you can be core developer if you can read the court

if you can copy/paste the court and if you can read the EAP instructions okay let's go to the second part should be a bit more interesting because it introduces a new operation towards self balance the suppression what could be used by higher level languages like solidity and why did this you can feel that you bring some value to the environment and you bring some value to these sort of such fancy things like solidity compiler okay let's let's find where all these

progressions court or in the going Court okay we again I jump again to jump table file because here so the balance constant and I think the self balance should be quite similar to balance so I'm going to fall to this balance constant all around the court and check all the places where I need to introduce self balance

constants functions and all this stuff okay I think the only place where it is used these are introduced it is opcode of goods go and I think we are in the right ways let's check this file and what we can see here we can see him a bug a bunch of constants that are sorted by ranges of operation codes like from 0 from 0 X 10 from lyrics 30 ok from lyrics 40 self

balance up good should be introduced at 0 X 47 so it should be somewhere here ok 40 41 42 43 44 45 46 is skipped let's leave a comment here and let's introduce zero X 47 okay then let's check all the places where these constants are used okay the first place what is it it's just a map that helps to

convert operation 4 to 2 in representation okay let's edit for self balance okay next piece what is it I think it's reverse map that helps to correct correct student representation to operation code okay let's do the same and it's all of these ok at this point we have introduced our I think all the

constant for knee abrasion course so we can now we do have now any aggression toward 0 X 47 and we have the bite representation and the string representation for this operation point ok let's go through that we need the main thing we need we need to add this operation quad to instruction sets the Istanbul instruction set okay should be more or less familiar the moment South

balanced here we can introduce a new operation let's scroll down the file and find something familiar to us maybe let's find how the operation balance was written here okay just so much it's changing the gas price oh yes let's copy-paste and dig into it in more details just a second and formatting

okay what do you see here we see a new type operation and it has a bunch of fields like execute what is it execute a separation function execution function okay I think it should be a reference to a function that should be called if silver Thomas interpreter face to give the proper operation Court in counties 47 self balance okay so you should be something like operation sound

balance right in a minute then constant gas okay this tells us yeah I see thank you okay constant guest so it's the value or how much depression causes if we go to the specification we can find that cell balance is priced as gas fast step at five gas okay gasps fast step yes we do have this

constant okay okay we set up these constant gasps it's just gas cost as it's specified in the specification okay these three parameters I just want to tell that they are used for sanity checks and we will back them in a minute by the way we'll mark them okay let's find okay now we need to do a little bit

of hard work we need to write the function that should be called if interpreter faced with the self balance of code okay let's find the same for balance and I'm going to jump into op balanced function and here this okay let's copy-paste it hope South balanced okay what South balance should do it should get the value of the balance from

state and these bounds should be for the current contract okay let's get the value over the balance I forgive this bottle okay balance gets from the state the address of the the electrologist that you want to get balance and it writes the balance to these up to the stack again self balance

doesn't get anything from this tag because it already it should already know the address because it is address of the contract however it should put the balance of the code address at the sector okay let's get the actual balance I think we need the same function because it get balanced it looks like we need and then we need to get somewhere the contract balance let's check what do we have we have in temperature we have

contract we have memory and we have step okay we do have contract the check do we have in the contract in the contract we have code analysis Cola gas will you address ice okay it should get parents to us and then we should push this value on the top of the stack because error as you know the material for machine is stack machine and all the code he writes

stack code and it do things with the stack okay we need to push this value up on the top of the stack okay do we have this tag yes tag oh it's right good thank you I'm in the wrong place stop push stack douchebags let's check don't compile okay compiles so bleep at this point we

very much finished all the things we need and we need to sort out these sanity checks means they can mark stack okay let's return to it okay and let's return to the specification if we can find that self balance pops zero argument of the stack and it pushed only one will new to the stack okay these two fields was read about them a little bit means that tells how many stack items are required MUX text which hides the

max length this tech can have for this operation not to over for the stack so it looks like that it is a long time checks writer I think at the runtime sanity checks to be sure that the operation doesn't get to mod that doesn't put too much values up to the stack or doesn't get much values from the stack okay make sense for me and let's set optic correct value week oops zero values from the stack and push one okay and the maximum we hope to value

and push one our pressure is constant it always push one value and ops nothing so let's check will at compile and it's all done it is a complete implementation of actual AP or if you're fine it's all questions yeah we're going for two to make a full cycle so we write the quarter we'll just written the code

and then we are going to listen about the test and write the actual test okay oh it's just Mike yeah or make gas it's fast okay okay welcome everybody I've been working with the serum foundation since the early beginning right after I joined

there were like three people working on a CTP serum client and the major a she had this testing so I was hired to help the team with tests and since then we have developed a lot of tests we could follow the repository github.com Assyrian / test to see it yeah here the test repo we have I'm maintaining the test repo mostly the consensus tests which are all clients must pass if they want to be synched to the main net and to find the consensus we have

between the clients so well for this workshop you don't need to clone this whole repo I have prepared a flash drive with one test that you would need and the binder is in case you couldn't compile so you will be able to write your own test and about the test so for a long time every client it was a client responsibility to make sure that it passes a test that it could sync up well and they've been doing it themselves and I've been creating tests using a serum cpp client so if we have any New Year P and we had to implement at first and CTP clients

and other clients could run the test that it generated a CVP client this year I prepared the new software tool for the client developers it's now called retest ETH retested and it could communicate to any client we are RPC protocol sending commands and missus commands it tells the client to set up blockchain and with parameters imports and blocks imports and transaction and then it asked what is your what is your client state what is the result of the transaction execution our block execution and this is enough is like five RPC meters for

the client and then your client could pass all of the existing state tests and blockchain tests also on the state test as a desert contain one transaction and the blockchain tests contain many blocks many transactions and your client could even generate the test it's the most important part if you want to create a new yet P you need to create a new test and for that you need a client which generates it so about reject it eh you could follow the github repository he theorem /r e 30 th and there is a wiki page I tried to describe everything you need to run to

install this tool and to use it with a serum client and currently get client is compatible with readers to th and it's fully supported for state test and the world tests again in the test three poor yeah if you want I could plus the flash drive it's compatible with Linux and Mac it because the test replying you could yeah if you have internet access but you know the cloning when you clean the dust repo specifies a

depth level one otherwise it's too huge yeah if you need the flash drive yeah so in a test three-point an SRC folder I keep the sources for all the tests we have and today we're going to be looking at the general state test each test has a feeler file as a source file for the test is called if all those files have filler dot Jason on the ending and this is a suffix for each file before it's a test name and from this in the files is a simple command we could generate the result test and it is stored in a test Reaper in general state test folder the

filler file contains instructions it has a pre section defining the pre States and four counts in the Genesis it has an expectation section which is a post condition that you add and this post condition you check after the transaction execution for convenience the transaction has some fields as arrays so you could define many transactions for one state in one state test file and yeah in the expects section you could define the post check for each of those is a transaction and once you generate the test the transaction get executed clients create first yeah first clients create a blockchain with the parameters then it

executes transaction and then it was a repetitive to verifies post condition the post state you could select individual fields to be checked after the transaction execution and its verify that those fields as certain values for example you could execute some opcode put it result in a storage and check that the storage has certain volume and then in the final test it puts prostate hash so when you run this test you don't need to check the post condition again it's in a source only and the clients will just verify that they have the same post cache for

each test that would mean that the state is the same and that there is no concern such issues on all of the clients so what would we need to run the test generation first we need the client which could which supports this five RPC matters for the protocol communication right now it's go client and others clients and pants on they already supports or and wait for priority you could compile the retest attach I would recommend to compile it locally docker image and it's not supported yet but it's working also then you need the test

repository is a test itself and this useful tool the loc translator for solidity or it's not supported so you have to switch to this commit hash for now this is a tool used to compile a low-level language into the bytecode because when you write tests it's easier to use some language other than typing plain bytecode so then in the first part of the presentation we've been working on changing the actual client making a new a IP implementation then yeah with this setup we could start writing the

test for that implementation so imagine we have this whole thing done now we could look at the test in a test repo I prepared in asti example for general state test in this the example and this one add one one filler has a lot of comments described in every field for the state test and so it's an example for the basic result of addition operation use the two arguments one and one and then the post condition there is a check that the result is true and it's been put into the storage so this is a like basic example you could write more complex tests than that and if you

follow the second link it's in yellow format not only Jason's form supported because if you need to write a complex code smart contract code in your more formal it's easier and you could see at that test like a bit more complex example of a state test let's look at the commands in the previous session we have compiled successfully the get client and if you run it is get retest ETH it will start listening on a port eight five four five by default but you could set the sport and you could start using retest ETH because this one one important part in

the test repos there is a configuration for it as tth there is a folder in the root three tests eth and there is a folder default it's a default configuration for the test adage which describes where to connect to the client what fork names are allowed and in what order and what Genesis configurations for each work should be sent so in the V key I have described this whole thing so you could read then what would we need just to run the test it th specifies that we are running general state test st example is our test so by default the clients will use a default configuration

but if you change this and you want to change this you could put the configuration name in the clients parameter important note it's a client it's a folder name is not the past or any config file and then if you want to run specific tests you could use a selector single test is a test name no no endings no extensions no filler digestion or anything and then single net if you want to run on a specific fork and in this case we have a new for example and - G - G - V is to select a specific transaction from a state test if there are more than one

transaction but those selector and you could just skip and you could just run all the tests in a generation motor in the running mode it's also described in the github video what we are saying if you have any questions you could ask me or you could open Edition github repo is very welcome not so many people working on it yet so I want to make this documentation as good as it could be and so no no question should emerge eventually I hope so we have set up the test the it tested need to find the path to the test that Iran but default it reads tries to read Assyrian test path

environment variable if there is no and then it would read two folders up and you could authorize this by using the test pass option also important but like make sure the tree tsth knows where to look for the tests then you set up the test client which we already like for the retest in th we could use just the default configuration this clients section is not needed default is run by default and it it is configured to run with the gate client on the port only TCP socket and the port that get used by default as well yeah and we have a time I could

demonstrate it everything how it works and the currently editor to teach supports the general state test and the blockchain test in run mode and general status in filler mode as well by running those two tests major test cases you would run a lot of basically everything we have right now in the manual written test format for the clients what a lot of tests general state has currently configured to run on a recent fork Constantinople fix and there is a new suit ID I have a legacy test it's a test cases for all of the previous four

configurations this is very useful for the clients that are just building and they want to make sure that for any Forks like could pass the test and could sync up with a minute so this is a comment we're going to be using the fuel tests tell city tested to rerun the test generation process executed transaction and checking the plot condition and for that we use another subsection a ste example because we're gonna run our own new tests and some tools for debugging the results could increase the velocity illiteracy th and the most important here is a full statement state full

state tells detectives not to convert huge states into a hash especially in some test cases where a lot of accounts get created in the post state those retested to print the result for state after the transaction execution we could see what is actual cost state on our client and could figure out what would we want to add to support condition some combinations also mention some of this this is a frequent questions I get asked when first dealing this retest Vth make sure that tests pass is a scene very testy th also check that

your test report is updated check that you have the config for your client and don't use filler Jason as a test name with just an extension and each each new test case your ad should have in inner Jason the same name as the file without filler da Jason for the state test it's also for those issues if you need some online health but to use my skype it's giving me notification so I could quickly reply to your questions and let's begin is a testing

it's a bit uncomfortable to work in Cisco have internet connection okay let's start like as an I couldn't see the screen black so I have come have a compiled version of a gets from the previous working session let's start it in retested Jewish mode okay now it should listen on port 80

five four five four the incoming connection and the test RPC interface is enabled now go to retest ETH [Applause] go for looser cables [Music] yeah okay okay yeah we could start running the

first test but from each folder so here we have the test report let's look at default configuration that I mentioned is retest ETH inside the test folder the default configuration looks

like this just look at the config so here we have a go client setup using TCP socket using these ports to connect so there are many ports because the test eth could eat could run testing and in threads so you could set multiple ports and run multiple threads and then for claims that you're going to be using it's exactly the same order one one by one for what because best support in the post condition specification like you could set a post condition for each fork starting from home stat for example and

this would be the order and the configuration the Genesis configuration for each fork like we have a new configuration here for Istanbul here the parameters for the sidechain params test method so we have specified that now Istanbul for clock is 0 so it should be active from very first block here are the precompiled contracts described for the specification is not just some basic stuff here's another file correct money reward

and this one initially state tests were not like blockchain so mining reward is not calculated in state test but now when we're honest through the air PC it is the same as running as blockchain because we are telling the client to start execute transaction and mine a test block so I need to correct the mining reward for the coin ways with each tests this file just describes what would be the mining reward and just to explain the meaning okay and let's look at our test is SRC folder here's the sources for all tests we have a general

state tests either here we have a lot of different tests let's look at the ste example here the one I mentioned with a lot of comments add one and for the previous change that we made to get client and created a copy for balance instruction and how much Gossett should now take I've been running on Istanbul [Music] so balance of court result and how much gas it will take first we need to set up

the pre section these are our cows that going to be existing from the Genesis state this address is the ones that are going to be sending it it's a color dress it's going to be sending the transaction and the transaction itself it has fields data data calls the gas limit of transaction gas price all the basic fields here the most important be the secret key this is the secret of that address I mentioned and it's this transaction going to be sent to this contract address well you couldn't escaped actually is a balance that you

sent so let's look what what is the contract called and here is this address in a pre state there's some balance some previous codes someone is not actual here's the cord because I expect that not everybody would be able to use LLC maybe for some reason that's why I put compiled bytecode so you won't meet LLC compiler but if you have mlc installed you could type in try like this because

it's a state source this is a readable code so we we want to check the balance they're calling balance instruction of the color itself put the result into storage 0 then we checking how many gas we spent on this instruction and we put the result of gas remaining into storage 1 and below is the bytecode of this of this operation zone for IBM it's already compiled what if you have work loc tool it will become files on the fly into bytecode and this is a post condition

that we need to check so select transaction we have only one transaction for two forks starting from constantinople fix and we added istanbul fork so it's going to be two forks we're gonna check that in the result for the contract that you called here this is a contract we have exactly the same like the most important here to check a storage but if you have exactly this values this is a result of balance of course at the storage cells 0 and this is remaining gas at storage cell 1 so

those expected results for these instructions and that's basically it says what we are testing right now we're going to retest it eh select our test and run so right now Ritter to th use this test balance from this file it's right it tried to use the already

compiled version and run it against the gate fork that's currently listening on a port that we specified result what's what's the most interesting part here yeah basically tree part is that

when you have these Dow support change once again this is where the retest s it resets the chain every time that you see this line this is where ya just have like two four yeah that's what's generate the test now so it's here rebuilding the block chain because we have two forks just for just fun for Constantinople figs and for Istanbul and

we have an error so apparently incorrect storage the result from the clients this is better this is better anyway so the result storage and someone was a contract this for this contract the result storage from the client is this zero five seven seven nine four but we put in our port conditions that we

expect this storage to be set to this 0 5 7 8 C 0 so we have an error and this is because we have changed the cost of a balance instructions you have exactly one balance instruction and now the result different for 300 guests the result is different what you see this error occurs only once was a fork ýstanbul that means that the fork Constantinople fix doesn't have such an error so the

gas is the same as what we expected it to be on a fork Constantinople fix but not only for Constantinople no not on the fork Instanbul so that's that's it the process to fix the test and we better to create a new post condition section here for each for each fork and here where the manual part starts like when you create in the post condition you're mentally verify that this is the result that you have

expected otherwise you could check something wrong but we have many clients so even if you have a wrong expectation and also client running this test you'll disagree with you because they could have implemented it differently maybe their version is correct maybe yours version all you need to investigate that's how we check what what does a difference when running the tests and this is a basic example of the gas price change but there are some tricky cases where some opcode being called from the SAP call which is delegate call or a certain depth level

and not all the clients behaving the same way in such situation is getting complicated especially is the river top course and out of gas calculations when you need to reset the state back so now we have two expectations one for Constantinople fixes with for instance what we should still see there because I just greeted you can fork Eastham wolf

has this error so the client returned parameter was this man so let's imagine we have this error we checked why we know that this is actually correct for Istanbul the gas price so now we set in the test yep okay the gas price here is expected to be this one for Istanbul and that one for Constantinople fix generated again so in the test generation went without errors

just that we don't have LLC for the version to put into the final test this Microsoft no I just didn't anyone will see back again in the system generates a test okay no errors in a well simulation

isn't a final test let's look at it the final test is generated in the folder here general state test s the example The Ballad of Jason those are automatically generated test cases if they don't touch here hero test this is how it looks when it's generated some comments about which software we used to generate the test and Genesis

block configuration and the post states that we have after the execution the transactional indication for the Constantinople fix we have this post route was the Istanbul this post here this is our pre state is the compiled bytecode the source you could see in this test winner this is our count and transaction transaction with these parameters no data discussed limit calling this contract so it should run it and here how it works currently this test could be converted into a

blockchain test and run by the hive tool and go and parity have a parser to run this format but they don't really need it now if they just implement retest eth support its test methods they could run and using retested and even we want to set up we plan to set up there a server which could run tests all the time use the retest ETH and the recent docker images provided by the client developers so they want me to pass this test format because it could change don't need to worry about it if you're

implementing the client you could use retested edge tool to check to write your own tests in the first place and to check that you're passing the legacy test and if there are some errors you could debug it there is also an option to attach to your client on an IPC socket in debug mode so you could debug your client whether using a retest ETH I plan to continue this work this development of the protocol may be are the new methods for the test interface that provides some debug information from the client-side or some other test methods to generate malicious blocks

there are many many interesting things I have in mind so right now it's an uncommon block change support maybe I could set up networks and see how clients interact on the same network and what I really need is help on writing the actual tests more developers because when you get P proposals but not so many tests and nobody from from the even EAP proposal they don't do any tests so it would be wonderful if the community

start doing the tests and provide contribution to this ap that would really help to integrate them faster questions there was a high stats running all the tests it's it's currently not updated it has because you see I changed the format of some test way also also location and no heaviness to update all right so I think it was high stats is he sir starts dotnet but you could ask Martin Martin

host man that he supports hive the hive still gonna be working some video updated for Istanbul the destination is more of a new tool but it's already code runs is the whole general status and the original prototype of it a CTS tests ETH from the CPP client is a backup version for all the tests all the New Testament that was going to be for Istanbul so it's important to choose the branch workshop and because so if you if you don't do recursive it will not basically

go into your repository is connected to the test repository through the test data folder so if you do recursive it will establish that connection straight away if you don't do it you have to do this some sort of get sub module a plate or something like that and also if you don't do the branch straightaway you have to do they get check out but then you have to update some modules again and that one is therefore to reduce the download size so lastly is the easel LC strictly required I think no but I'd be great if you did conveyance of three steps we can implement your own the first EAP we're going to implement ap 2228 related to

reusing that a transaction of called data data the previous value was 68 when need to reduce to 16 it's quite simple but we need the simplest EAP to show how to implement a piece and how to write in tests for it so the first step is preparing environment we need to go back in start we need the custom range of theorem and if you want to write test unit to download inbuilt registers and

policy the next step is implementation details you're going to implement this ap the next step is testing the link of this document is here see you on the net but hello guys I think we can start everybody prepared environment here's a link to the instruction guide everybody hope you prepared environment or we could do it together okay so I think we can start we're going to

implement ap 2288 reducing a transition gas cost here's a ap we need to change current Walia Willia eighty sixty eight to sixteen let's prepare environment we need to clone our own branch which prepared by usually if you have any questions you can feel free to ask we'll try to help you I'm going to go film from Mutants branch

we need to do with recursive function because it contains appear on state tests which is supported by v3 so we cloned go phew

after it we need to install tools for testing it's written it doesn't register and we need to install solid Jim okay I'll try so when installing the tester using this small bulb range oh yeah but this is a link here so everybody opens it

okay so lol was one of the first language is that so even before did here emerged in 2015 so the Gabbin wouldn't see class class he was working on a series of prototypes there was like POC wherever for and in that client that was like you I build in C++ and inside you can actually hide yourselves ll and you would use it to generate the bite of a VM there was no civility at the moment at that point and nothing the only thing the nice thing about this language is that actually it's very easy to understand what bite

Hollywood produced so it has no all kind of code pretty much no more generation so you can figure out it's very low level essentially Sony feel see the very simple code you pretty much can guess what the compiler is going to do like magical trickery and the I guess who Demitri who had 1911 tests krystal krystal change was the first started noodles contestants work out that she had an idea would be nice instead of booted by Chrome's in the Code section

of the contracts which that you didn't I mean I sometimes it's impossible some of the tests look at the business second Exodus industry so it was a bit nicer to have although still very low level would miss figure out okay this test does this storage stuff but for this particular workshop it's not really a requirement you could try to do that because the test we have is so simple that you can just do the bite apart which is for instructions not for byte space and nothing Boris can explain you what is over so I wanted to say a couple of words about this particular approach of

compiling go project would make it's actually not it's a it's an unorthodox way of compiling go usually you would use something like go modules and some stuff like this and actually the gold modules if is becoming much more mature but because the go assyrian project has been created a few years ago they created made file and sometimes you have to turn off some a new newer feature of go to make it work so so it's this is not likely the the best way to compile your go project so but it's just their experience of building some seemingly unrelated c++ project but and then just

prepare the docker containers but actually i think it's part of the valid part of the experience is that you should be kind of brave and not being shy to let's say okay i'ma go developer but i have to do the c++ project that's fine you know you can figure this out if there's the DOS steps and stuff like this so if we prepared all the docker containers for you but of course might be a bit smoother but you you wouldn't get that part of experience you