Add support for simple subroutines (EIP-2315, scheduled for Berlin)
What is wrong?
EIP 2315 introduces three opcodes to support subroutines: BEGINSUB, JUMPSUB and RETURNSUB which Py-EVM currently does not yet support.
How can it be fixed
- Read the EIP
- Add support for the three opcodes
- Add tests for all official test cases
I'm going to look into this.
Can I take a shot at this? seems an interesting job
@Peppece I started with this today. I have a rough implementation and are now trying to work myself through the test cases that are specified in the EIP.
I also believe that some familiarity with the code base would be good to work on this issue. That said, if you think this would make a great code challenge for you then I'm happy to throw my code away and take yours!
I propose to put my code away for some days and wait for you to create a PR to show some progress on the issue. I would recommend to base your work on #1933 which has the basic boilerplate code to support the upcoming Berlin fork.
You may also want to look into test_opcodes.py to get a sense for how the other opcode tests are written.
Please let me know if you want to take a stab on that or find something else. For instance, there's also #1927 that needs to be tackled for the upcoming Berlin fork.
Awesome, thank you soo much! I’ll dig this and get back asap. @cburgdorf
@Peppece We'll save this for you until all the other EIPs are done. Can't save it too long though, because the mainnet date approaches.