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

New testStateDev test run command to allow for parallel Constantinople testing #317

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,24 @@ jobs:
- run:
name: testBlockchainTotalDifficulty
command: npm run testBlockchainTotalDifficulty
test_state:
test_state_byzantium:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- *restore_node_modules
- run:
name: testState
command: npm run testState
name: testStateByzantium
command: npm run testStateByzantium
test_state_constantinople:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- *restore_node_modules
- run:
name: testStateConstantinople
command: npm run testStateConstantinople
coveralls:
<<: *defaults
steps:
Expand All @@ -88,7 +97,10 @@ workflows:
- test_total_difficulty:
requires:
- install
- test_state:
- test_state_byzantium:
requires:
- install
- test_state_constantinople:
requires:
- install
- coveralls:
Expand Down
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ function VM (opts = {}) {

let chain = opts.chain ? opts.chain : 'mainnet'
let hardfork = opts.hardfork ? opts.hardfork : 'byzantium'
let supportedHardforks = [ 'byzantium' ]
let supportedHardforks = [
'byzantium', // Officially supported
'constantinople' // No official support yet, only for testing reasons
]
this._common = new Common(chain, hardfork, supportedHardforks)

if (opts.stateManager) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"coverage": "istanbul cover ./tests/tester.js -- -s",
"coveralls": "npm run coverage && coveralls <coverage/lcov.info",
"testVM": "node ./tests/tester -v",
"testState": "npm run build:dist && node ./tests/tester -s --dist",
"testStateByzantium": "npm run build:dist && node ./tests/tester -s --fork='Byzantium' --dist",
"testStateConstantinople": "npm run build:dist && node ./tests/tester -s --fork='Constantinople' --dist",
"testBuildIntegrity": "npm run build:dist && node ./tests/tester -s --dist --test='stackOverflow'",
"testBlockchain": "npm run build:dist && node --stack-size=1500 ./tests/tester -b --dist --excludeDir='GeneralStateTests'",
"testBlockchainGeneralStateTests": "npm run build:dist && node --stack-size=1500 ./tests/tester -b --dist --dir='GeneralStateTests'",
Expand Down