Intro to Core Development with Ethereumjs-vm
Devcon·Mon, Oct 9, 2017, 12:00 AM
For beginning core devs, Casey and Daniel walk through running ethereumjs-vm on the consensus test suite.
Transcript
and we're live cool welcome so uh this is a video for new developers to the ethereum JS VM project uh the purpose of this video is to show you how to set up your Dev environment where to find where to find requirements for what to work on next and how to run the tests my name is Dan I'm a contributor to the ethereum JS project and this is Casey Casey would you like to introduce yourself yeah I'm Casey I'm a volunteer um helping out with ethereum JS lately and trying to get more contributors involved sweet so uh you're cloning down stuff right now and we can do an npm install but while you're at it would you like to tell us a bit about eips and how a new developer can find IPS to work on sure um the eips repository is over here at ethereum eips and the finalized specifications that ethereum JS VM needs updating are all listed down here so the one we're going to work on right now is 150 cool but it's a little confusing because sometimes eips are in issues this was the original one and we're trying to get them Consolidated so that the correct final specification is just in a file so you don't have to Wade through the comments and the evolution of each specification perfect so the issues board is for seeing any context an evolution like discussion between cevs and to find the final spec for what you want to implement in our project you're going to use this these markdown files in the eips folder yeah that's right great let's talk a bit about the homestead tests okay so currently the homestad are in a poll request right here and what with these PO requests merg this one and delegate call um which did I already merge that one let me see already up to date um we pass all of the homestead tests um so now that we have the branch we just do npm install to install all the dependencies yep and uh when we run or what command do you use to run the tests yeah um just run npm run test blockchain great and the test Suite that we're using is in ethereum tests and specifically we're running the blockchain tests and the general blockchain tests General State tests yep and and the tests in ethereum that test are cross client in that they are run in all of the ethereum clients so that's right this whole test Suite is uh is the cross client consensus test Suite Okay cool so once those node modules are in uh we're going to run the tests and we'll expect to have the changes that you merged in which means we'll get some test failures well we're going to run the tests for EP 150 so got it as soon as this is done I'll show you how to change the for configuration MH okay so now we can now we can change the fort configuration from homestead which what this does is it looks at the test name name each test name and matches with the end so it will only run the test that ended Homestead and we're going to update that to ep150 so that we're going to be running the 150 test yep okay so now we've done that now we can run the tests and we should expect to see some some failures because we're running uh a homestead compatible implementation on the 150 test cases yep so had we had we run the original Homestead tests then we would have gotten 100% of the Test passing that's right like uh y this is right here with all the homestead tests running you can see each test SP is Homestead right and so they all pass and in our case we're getting a failure because we're running on E150 and and the reason why we need to show you these outputs as they're saved and like not really wait for them all to run is because the test Suite the consensus test Suite does take a couple of hours to run so we're just showing you how to get the test running and what expected outputs are before we move on to more Dev environment setup so we have one failure uh now let's do this the easiest bit of E150 and just change the constants change the gas costs for a few op codes [Music] um so balance is now 400 EXT code copy 700 s load [Music] to 200 and 700 700 5,000 and then we rerun the tests and we should hope to see um some of the test case which we're failing now passing and we do yep would be the full output for the changes 300 failures y so without the the change in app code guas we have about 1,500 failures once we do the simple change of changing the cost the app codes we're down to 300 failures and when we finish with these last two [Music] changes um should be down to well down to zero failures perfect cool so um yeah that about wraps it up for for this video we've gone over how to run tests in the ethereum jvm project and how to find requirements for the eips you need to implement uh in a future video or if you hit us up on getter we can explain how to set up the rest of your Dev environment and how to do debugging and um uh running traces on both the ethereum JS project and the pi ethereum Y and the pi ethereum implementation yep uh anything else you'd like to share yeah just we need help uh and so yeah hope to see some contributors um join up join us great thanks Casey thanks Daniel see you
Automatic transcript — names and jargon may be misspelled.