-
Notifications
You must be signed in to change notification settings - Fork 782
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
Fix Constantinople tests #931
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
Can we run the Constantinople tests in this PR just to (double) make sure that my claim it is fixed is actually true? 😄 |
@jochem-brouwer sure! doing it now |
Heh. Looks like other tests are now failing 😅 I could take a look at this tomorrow. |
} else if (value.length !== 0 && !found.length) { | ||
runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreSet'))) | ||
} | ||
} | ||
await runState.eei.storageStore(keyBuf, value) |
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.
Ah yes this make sense, sorry and thanks! 🙂
Perhaps the misplaced stuff could also go in a function in opcodes/utils
as updateSstoreGas
?
updateSstoreGas(runState, found, setLengthLeftStorage(value))
updateSstoreGasEIP1283(runState, found, setLengthLeftStorage(value))
updateSstoreGasEIP2200(runState, found, setLengthLeftStorage(value), keyBuf)
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.
Yep great suggestion! I will also move the HF logic inside the SSTORE, because otherwise it seems that it updates SSTORE gas 3 times (which is not the case)
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.
Oh nice, yes that's a lot clearer now 💯
vm: move HF-selection logic for SSTORE gas into functions
vm: move HF-selection logic for SSTORE gas into functions vm: remove HF selection logic
…reumjs-vm into fix-constantinople-tests
Great PR :) It looks like all the uses of |
Can you point to these lines @ryanio ? These new BN things are very misleading, I never understood why this was done in the first place as especially the However...
|
Yeah I find that confusing as well, that re: Most of it is |
Ah I see! Just a note here these I think it would be great to do this in a seperate PR, possibly together with #914 |
ah right ok, yeah sounds like something good for future work then. This LGTM then! |
@jochem-brouwer Great stuff here! 😄 Could you please update this post-merge with a proper title and a short description on what was broken respectively has been fixed for the release notes? Thanks! |
(also can please everyone try hard to internalize our new process of upgrading the release notes along PRs 😜 and then hopefully directly add to the release notes on PRs and also mention missing release notes on PR reviews? Seems this is still forgotten 80%+ of the times 😋 🎃 ) |
Thanks for the contribution, @jochem-brouwer!
Closes #928 and fixes nightly builds.