diff --git a/.travis.yml b/.travis.yml index 2b699bc84e8..e4289f76dc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,13 @@ matrix: - os: linux node_js: "8" env: CXX=g++-4.8 TEST_SUITE=testState -# temporarily disable testBlockchain -# - os: linux -# node_js: "8" -# env: CXX=g++-4.8 TEST_SUITE=testBlockchain + - os: linux + node_js: "8" + env: CXX=g++-4.8 TEST_SUITE=testBlockchainBlockGasLimit + - os: linux + node_js: "8" + env: CXX=g++-4.8 TEST_SUITE=testBlockchainValid + - os: linux + node_js: "8" + env: CXX=g++-4.8 TEST_SUITE=testBlockchainTotalDifficulty script: npm run $TEST_SUITE diff --git a/README.md b/README.md index 281ab66b6dc..46ded9dbca9 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,40 @@ Emits the Transaction that is about to be processed. #### `afterTx` Emits the result of the transaction. + +# Internal Structure +The VM processes state changes at many levels. + +* runBlockchain + * for every block, runBlock +* runBlock + * for every tx, runTx + * pay miner and uncles +* runTx + * check sender balance + * check sender nonce + * runCall + * transfer gas charges +* runCall + * checkpoint state + * transfer value + * load code + * runCode + * materialize created contracts + * revert or commit checkpoint +* runCode + * iterate over code + * run op codes + * track gas usage +* OpFns + * run individual op code + * modify stack + * modify memory + * calculate fee + +The opFns for `CREATE`, `CALL`, and `CALLCODE` call back up to `runCall`. + + # TESTING ### Running Tests @@ -184,6 +218,10 @@ Running all the blockchain tests in a file: `node ./tests/tester -b --file='randomStatetest303'` +Running tests from a specific directory: + +`node ./tests/tester -b --dir='bcBlockGasLimitTest'` + Running a specific state test case: `node ./tests/tester -s --test='stackOverflow'` @@ -201,38 +239,6 @@ All/most State tests are replicated as Blockchain tests in a ``GeneralStateTests For comparing ``EVM`` traces [here](https://gist.github.com/cdetrio/41172f374ae32047a6c9e97fa9d09ad0) are some instructions for setting up ``pyethereum`` to generate corresponding traces for state tests. -# Internal Structure -The VM processes state changes at many levels. - -* runBlockchain - * for every block, runBlock -* runBlock - * for every tx, runTx - * pay miner and uncles -* runTx - * check sender balance - * check sender nonce - * runCall - * transfer gas charges -* runCall - * checkpoint state - * transfer value - * load code - * runCode - * materialize created contracts - * revert or commit checkpoint -* runCode - * iterate over code - * run op codes - * track gas usage -* OpFns - * run individual op code - * modify stack - * modify memory - * calculate fee - -The opFns for `CREATE`, `CALL`, and `CALLCODE` call back up to `runCall`. - # LICENSE [MPL-2.0](https://www.mozilla.org/MPL/2.0/) diff --git a/circle.yml b/circle.yml index 21aee1e4cf6..a45e0a24cb2 100644 --- a/circle.yml +++ b/circle.yml @@ -8,5 +8,5 @@ test: override: # testVM disabled. testBlockchain temporarily disabled # - case $CIRCLE_NODE_INDEX in 0) npm run lint ;; 1) npm run testVM ;; 2) npm run testState ;; 3) npm run testBlockchain ;; esac: - - case $CIRCLE_NODE_INDEX in 0) npm run lint ;; 1) npm run testState ;; esac: + - case $CIRCLE_NODE_INDEX in 0) npm run lint ;; 1) npm run testState ;; 2) npm run testBlockchainBlockGasLimit ;; 3) npm run testBlockchainValid ;; 4) npm run testBlockchainTotalDifficulty ;; esac: parallel: true diff --git a/package.json b/package.json index 0811b6525b1..e5638260a70 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,9 @@ "testVM": "node ./tests/tester -v", "testState": "node ./tests/tester -s", "testBlockchain": "node --stack-size=1500 ./tests/tester -b", + "testBlockchainBlockGasLimit": "node --stack-size=1500 ./tests/tester -b --dir='bcBlockGasLimitTest'", + "testBlockchainValid": "node --stack-size=1500 ./tests/tester -b --dir='bcValidBlockTest'", + "testBlockchainTotalDifficulty": "node --stack-size=1500 ./tests/tester -b --dir='bcTotalDifficultyTest'", "lint": "standard", "test": "node ./tests/tester -a" }, diff --git a/tests/tester.js b/tests/tester.js index 471db88c7b5..e7f37335e94 100644 --- a/tests/tester.js +++ b/tests/tester.js @@ -135,6 +135,8 @@ function runTests (name, runnerArgs, cb) { testGetterArgs.forkConfig = FORK_CONFIG testGetterArgs.file = argv.file testGetterArgs.test = argv.test + testGetterArgs.dir = argv.dir + testGetterArgs.excludeDir = argv.excludeDir runnerArgs.forkConfig = FORK_CONFIG runnerArgs.debug = argv.debug // for BlockchainTests