Skip to content
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

Add petersburg aka constantinopleFix support #433

Merged
merged 7 commits into from
Feb 7, 2019

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Feb 1, 2019

Addressses #423

  • This PR ensures that the changes applied in EIP 1283 SSTORE #367 are only applied on the constantinople hardfork (and not on prior or subsequent hardforks).
  • Tests are updated to allow testing of the petersburg hardfork.
  • An npm script is added for exclusively running petersburg state tests
  • A circleci job is added that runs these petersburg tests

This is branched from #432

For this PR to work, we will also have to merge ethereumjs/ethereumjs-blockchain#86 and ethereumjs/ethereumjs-block#64, release new versions of those repos to npm and then update this PR to use those new versions.

@danjm danjm force-pushed the update-ethereumjs-common-version branch from 2e63c71 to e8f7d72 Compare February 1, 2019 16:45
@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from e858f81 to fb81943 Compare February 1, 2019 16:46
@@ -126,7 +126,11 @@ function runTestCase (options, testData, t, cb) {

module.exports = function runStateTest (options, testData, t, cb) {
try {
const testCases = parseTestCases(options.forkConfig, testData, options.data, options.gasLimit, options.value)
let aliasForkConfig
if (options.forkConfig === 'Petersburg') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some note here: when I added the fork config logic here to the tests some time ago I added it in a way that both capital and non-capital names can be used, see e.g. here, so e.g. Byzantiumorbyzantium`. Still not sure if this was a good idea, I actually already did a first take to remove this lately along some other PR and then stumbled over some unexpected stuff which made this a bit more complicated than expected.

So I would suggest also for now that we keep that behavior and concentrate on the Petersburg changes. But to keep things consistent we should then also do these two Petersburg comparisons in the PR case-agnostic and compare the lowercase versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made changes in 948fcfa such that the fork config for tests can be provided 'petersburg' or 'Petersburg'.

However, I noticed that node ./tests/tester -s --fork="Byzantium" works but node ./tests/tester -s --fork="byzantium" does not. This is because the ethereum/tests assume that the fork names will be written in upper case. The 'petersburg'/'Petersburg' case is not affected because I've made the name check in the added hardfork alias logic case insensitive.

One way to address this would be the changes I pushed (with another branch) here: add-petersburg-aka-constantinople-fix-support...fix-test-fork-name-case-handling

@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from fb81943 to fe0d62d Compare February 5, 2019 12:22
@danjm danjm force-pushed the update-ethereumjs-common-version branch from e8f7d72 to 6451b75 Compare February 5, 2019 13:04
@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from 7af05fe to 020bc03 Compare February 5, 2019 13:05
@danjm danjm force-pushed the update-ethereumjs-common-version branch from 6451b75 to da97a00 Compare February 5, 2019 13:06
@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from 020bc03 to 948fcfa Compare February 5, 2019 13:07
@danjm danjm force-pushed the update-ethereumjs-common-version branch from da97a00 to e6be3e1 Compare February 5, 2019 20:13
@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from 948fcfa to 1b31ead Compare February 5, 2019 20:14
@coveralls
Copy link

coveralls commented Feb 5, 2019

Coverage Status

Coverage remained the same at 90.987% when pulling 3d8f14f on add-petersburg-aka-constantinople-fix-support into b1e318f on master.

lib/vm/opFns.js Outdated Show resolved Hide resolved
@danjm danjm force-pushed the add-petersburg-aka-constantinople-fix-support branch from 0aa7bd8 to ceb1787 Compare February 6, 2019 13:27
@danjm danjm changed the base branch from update-ethereumjs-common-version to master February 6, 2019 14:09
Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks Dan for taking on this! 😄

Will directly prepare a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants