py-evm icon indicating copy to clipboard operation
py-evm copied to clipboard

Add support for simple subroutines (EIP-2315, scheduled for Berlin)

Open cburgdorf opened this issue 5 years ago • 5 comments

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

  1. Read the EIP
  2. Add support for the three opcodes
  3. Add tests for all official test cases

cburgdorf avatar May 18 '20 07:05 cburgdorf

I'm going to look into this.

cburgdorf avatar May 26 '20 08:05 cburgdorf

Can I take a shot at this? seems an interesting job

Peppece avatar May 26 '20 13:05 Peppece

@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.

cburgdorf avatar May 26 '20 14:05 cburgdorf

Awesome, thank you soo much! I’ll dig this and get back asap. @cburgdorf

Peppece avatar May 26 '20 14:05 Peppece

@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.

carver avatar Mar 01 '21 17:03 carver