-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bitwise shift opcodes for Constantinople #1112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big 👍 for adding individual opcode function tests.
655a6a2
to
d2fc10c
Compare
@pipermerriam failing CI seems like something related to the new network abstraction and unrelated to this PR as far as I can tell. https://circleci.com/gh/ethereum/py-evm/50905?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link |
@cburgdorf see cburgdorf#1 for how to do this without the library. |
Regarding test failure: ethereum/pytest-asyncio-network-simulator#6 incoming |
@cburgdorf you should be able to rebase this now and pass CI |
Relates to ethereum#1111
5b07721
to
9614afb
Compare
@pipermerriam yep, passes! There's one more shifting opcode left to implement and I also want to put more work in the tests. I'll try to finish that up tomorrow. |
Can we start running selected Constantinople state tests now? |
@carver yes, but my recommendation would be to do that in a separate PR. We'll need to update the commit that our fixtures are current set at (probably to whatever is in geth master?) and then fix anything that is broken. |
9614afb
to
888f496
Compare
@pipermerriam @carver Alright, I decided to branch of #1134 for the So, this one is ready for review if anyone is up for it. |
What was wrong?
As stated in #1104, the upcoming Constantinople fork adds three new opcodes for bitwise shifting operations. Namely
SHL
,SHR
andSAR
. This PR adds support for theSHL
andSHR
opcodes.This does not include support for the
SAR
opcode yet which is expected to land in another PR. #1134How was it fixed?
Created a new
test_opcodes
file and wrote a couple of tests for existing opcodes. This isn't finished but from the perspective of this PR it shouldn't matter and we have an open issue to not forget about testing other existing opcodes Create unit tests for Opcodes #1111Implemented
SHR
andSHL
logic ineth.vm.logic.arithmetic
Added all test cases from the EIP
Added opcodes that expose the functionality to the constantinople opcodes
Cute Animal Picture