-
Notifications
You must be signed in to change notification settings - Fork 772
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
EIP 1014 CREATE2 #329
EIP 1014 CREATE2 #329
Conversation
Hi Jared, I've now updated the |
Tests are now updated to @jwasinger Are you planning to continue to work on this? Or is this also open for someone else to be continued (e.g. from Kyokan)? |
Feel free to take this over. I won't have time to complete it before devcon. |
@holgerd77 @jwasinger as I am really interested in playing around with this feature, is there some ETA? Also is there some way I could contribute to get thisndone faster 😄 |
Hi @rmeissner, as a first step I have now updated the according PR on the util library along the latest discussions from the EIP update PR #1375 page, can you do a review of this? I think one thing you can do is to follow the discussion alongside the PR linked above and come up with some examples for the hash creation - covering different cases - that would also help other implementations a lot. You can further directly take on this PR if your time permits, that would be great! 😄 I have added you as collaborator to this library, so feel free to directly take on the PR here, rebase and re-submit. |
Have now updated the Tests are now passing and it should now be possible to continue to work on this here on the VM side. |
EIP-1014 makes address collisions possible. As I see it right now in that case the ethereumjs-vm just clears the address and creates the new contract. According to the update to the EIP this should fail. Therefore I would add this check. Also the gascosts will be dynamic according to the latest comment, so that should be changed too. I would try to get this done monday/tuesday if it is not done before 😉 |
Cool, pretty sure it won't be done before 😄 |
The test cases don't included the correct gas costs yet. Also there are still quite some issues with the constantinople tests (the ci failures can be resolved if the new version if the utils package is released) |
Just released |
@holgerd77 It seems that just upgrading ethereumjs-utils from 5.2.0 to 6.0.0 is breaking quite some tests, if possible I would appreciate some help with that :) |
Just looking into it. |
lib/runCall.js
Outdated
@@ -5,6 +5,7 @@ const BN = ethUtil.BN | |||
const exceptions = require('./exceptions.js') | |||
|
|||
const ERROR = exceptions.ERROR | |||
const EMPTY_CODE_HASH = ethUtil.keccak256() |
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.
You are introducing an ethUtil call here, eventually that can also be a cause?
I've done a pure |
Update: ah no, tests are also failing on the test PR, seems to be really the util update. |
Ok, here is my theory, quite crazy stuff: Tests like the API tests (
On a first and second look, buffers look actually quite the same, so one is puzzled. On a third thought I experimented a bit with
This would mean that there is no mistake with the util library but that this can be fixed by replacing the I will test this by doing the |
Ok, first update on #369, if theory is correct the API tests should pass now. |
API tests are passing, seems to me that I was on the correct track. However other tests are still failing. It just occurred to me that similar comparisons in the production code will likely now also fail. The easier way to go would be eventually to update the merkle tree library to also use the Not sure about the way to go, directly fixing this would probably be the more correct way. |
Ok, I found one left-over occurence of a sha3-named constant in StateManager, which have been removed in the v6.0.0 util version, this might very well be it, waiting for the tests to finish. |
The failures on collision are very likely not Will also try to dig a bit into that. |
Rebased this to run with the latest tests. |
Results with latest Constantinople state tests ( 1..4776
# tests 4776
# pass 4749
# fail 27 Update: just saw, same as above, there is also a more detailed summary listing the failing tests. |
Hi @rmeissner, tried to rebase this, this is currently conflicting with the latest |
@holgerd77 i will rebase it and fix it after devcon and try to figure out why all the create and create2 collision tests are failing |
@holgerd77 I rebased and squashed the commits (to make future rebasing easier). I also fixed the linting tests. Will start looking into the create2/create tests |
0a04199
to
6a2c9e2
Compare
@holgerd77 I got it down to 4 failing tests. Tried to figure out what goes wrong but I think these are unrelated to create2. E.g. ethereumjs-vm
vs
The costs for One side note the |
this might actually also fix #232 didn't check everything but the example provided in the latest comment now passes |
Hi @rmeissner, already a bit late to congratulate you on this, great achievement!!! 😄 I would very much have a tendency to merge this for now, since there is always this rebasing back and forth with the work from @mattdean-digicatapult with both of you working on larger structural changes. It should also get easier then to tackle the last failing tests, being them related to I would then rebase this and - if you are ok with it - approve and merge. |
trap if not constantinople add check if nonce or code at address Fix lint errors Refactoring Fix lint Use invalid init code on colission Fix lint
Rebased this. |
If you are not actively intervening in the next half-an-hour or so, I would merge this 😄, would like to forward to @mattdean-digicatapult, hope this is ok. |
sounds good 👍 |
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.
Looks good, thanks @rmeissner for the great work and staying on with this for so long!
Assumption was right, collision tests are now also fixed, see #383. 😄 |
Depends on ethereumjs/ethereumjs-util#146.
Closes #356.