Commit Graph

155 Commits

Author SHA1 Message Date
Ștefan Talpalaru a431ceed11 add "--threads:on" to tests and main binary
- some "funcs" were no longer considered side-effect free, so I made
  them procs
- added {.base.} to some base methods to avoid a deprecation warning
2019-01-15 18:59:24 +02:00
andri lim fbb03fb9b2 update test data 2019-01-15 15:30:25 +02:00
Yuriy Glukhov 58ad0e472c Moved db backends to eth_trie 2019-01-13 15:31:59 +02:00
Ștefan Talpalaru 7c7260552d
rebase and various fixes
- port to new APIs
- added copyright headers
- bumped the copyright interval in modified files
- fixed tests
- reorganised imports
- normalised function names
- deleted some trailing space
- added test_rpc to all_tests
- assert() -> doAssert()
- moved the RPC port in a constant for the test suite
2019-01-06 20:19:48 +01:00
coffeepots d19a7f7c04
Add simple test for eth_estimateGas 2019-01-06 19:03:35 +01:00
coffeepots 2c1c3d6c76
Update eth_estimateGas sig for testing 2019-01-06 19:03:35 +01:00
coffeepots c2fae69318
Add assertion to check for canonical head 2019-01-06 19:03:34 +01:00
andri lim 281b7dffac implement debug_setHead 2019-01-06 13:17:08 +02:00
andri lim 74d728f962 pass additional 15 general state tests 2019-01-06 13:16:45 +02:00
andri lim 96b18cfce3 add select_backend module 2019-01-06 11:43:38 +02:00
andri lim 3a10f99694 add persistblock test 2019-01-06 11:43:38 +02:00
andri lim 5cf43c2909 implement dumpDebuggingMetaData 2019-01-06 11:43:38 +02:00
andri lim 5fc134ac2a add lmdb backend 2019-01-06 11:43:38 +02:00
andri lim a6bf970b1b some cleanup 2019-01-06 11:43:38 +02:00
andri lim 9db4e9296a add tracer test 2019-01-06 11:43:38 +02:00
andri lim 83e01994df add total count to test helpers 2018-12-26 23:45:57 +02:00
andri lim d3380f6cf0 fix test 2018-12-16 15:38:51 +02:00
Ștefan Talpalaru f91e69f7c7
more VM tracing
The existing vmState tracing is plugged into chronicles, at the TRACE
level, to facilitate state test debugging.

Some useful chronicles defines are added to "tests/nim.cfg" to simplify
the compile-and-run command for individual tests.
2018-12-12 11:47:10 +01:00
Ștefan Talpalaru 115843487c
general-state testsuite changes and better fork selection
- skipped the tests in allowedFailInCurrentBuild()
- replaced doAssert() with check() in testFixtureIndexes() so we can see
  both hash values on failure
- checking filename extension for JSON tests to avoid editor swap files
- replaced the duplicated block values in the main net's ChainConfig
  with values from forkBlocks
- allowed overriding the current fork in computations, because the old
  strategy of only looking at the block number doesn't work with JSON tests
  where the block number is usually 1
- explicitly pass the fork to gasCosts() and use it for conditional cost
  calculation
- fixed a logic error in the CREATE opcode
- fixed VM selection based on current fork in updateOpcodeExec()
- single point of control for supported forks in tests (just one fork, at the
  moment)
- 44 new test failures (that were probably passing for the wrong reasons)
2018-12-07 18:18:29 +01:00
coffeepots 86853ea97c
Merge pull request #187 from status-im/modexp-fixes
Modexp fixes
2018-12-06 10:10:59 +00:00
andri lim c954dc7d62 fix tests 2018-12-05 22:01:29 +07:00
mratsim 4d07d99f66 Add precompiles to all tests to prevent regressions 2018-12-04 16:32:11 +01:00
mratsim f50bb57eb6 Reactivate the precompiles test + consume gas 2018-12-04 15:52:59 +01:00
mratsim 29f8a8a066 modExp fixed! 2018-12-04 15:46:33 +01:00
mratsim 949c5a1dc6 Modexp fix example 1 (returned to early for ints of length 1) 2018-12-04 12:49:48 +01:00
coffeepots 184143ba65 Update return types 2018-11-28 22:27:15 +00:00
coffeepots b57427e3ee Add genesis block 2018-11-28 21:57:10 +00:00
coffeepots 3557567a1b Moch test for eth_call but needs working header fetching 2018-11-26 18:16:58 +00:00
coffeepots 0899634b6d Update signatures for eth_call 2018-11-26 18:13:24 +00:00
coffeepots f7d858d58b Add missing .json 2018-11-13 19:45:34 +00:00
coffeepots 6dcb639e64 Add 32 bit failures to GST CI exclusion 2018-11-13 19:45:34 +00:00
coffeepots e5551bb3f7 Update memDB/chain use with eth_trie changes 2018-11-13 19:45:34 +00:00
coffeepots eceaa58ebb Update failing tests list 2018-11-13 19:45:34 +00:00
coffeepots f99138dca6 Merge branch 'call-fixes-precompiles' 2018-11-12 15:57:54 +00:00
coffeepots 0366dd47d9 Remove irrelevant comments 2018-11-08 18:54:21 +00:00
Dustin Brody 5095bfa8d8 add missing module import 2018-10-19 09:42:32 -07:00
Zahary Karadjov 41adca1abb Minimal changes required for building the LES branch 2018-10-16 03:10:01 +03:00
coffeepots 4ca4a859ad Remove bogus sha256 tests 2018-10-10 18:47:54 +01:00
coffeepots e53222c7ab Test suite for precompiles 2018-10-10 17:27:00 +01:00
coffeepots 7c778867a2 Allow simpler json files to be processed, add dir sep for echo 2018-10-10 17:26:32 +01:00
coffeepots 2ee9861a9e Precompile test data 2018-10-10 17:25:54 +01:00
Zahary Karadjov 343cc4fa43 Populate the persistent databases with the empty RLP key.
Also implements transactional block persistence. Two issues
in the transaction processing code have been discovered that
might affect other usages such as the CALL instruction.

The main fix gets us past block 49000.

You may need to clean up your database.
2018-10-05 03:36:48 +03:00
Dustin Brody 7459650663 only disable 32-bit-failing tests in 32-bit builds 2018-10-04 17:52:58 +00:00
Dustin Brody 7aa0c386dd some simplification and cleanup 2018-10-04 17:52:58 +00:00
coffeepots e2087f0922 Remove precompile hash table 2018-10-02 15:55:28 +01:00
tersec 4f04332205
Refactor contract creation into transaction code from P2P code; get 14 new GSTs working (#163)
* checkpoint where refactoring and calling from GST runner doesn't break anything

* 14 new GSTs pass by refactoring contract creation out of p2p/chain and using from GST test runner

* 2 of 14 new tests fail in 32-bit builds

* switch from CREATE_CONTRACT_ADDRESS to isContractCreation

* switch another CREATE_CONTRACT_ADDRESS to isContactCreation
2018-09-29 15:36:42 +00:00
tersec d4e95fae94
refactor aspects of transaction processing out of GeneralStateTests handler; get p2p/chain runnning through block 48680; combine/deduplicate two different but equivalent methods of caulculating transaction intrinsic gas cost; fix BaseTransaction references to just Transaction references in hitherto unreferenced stubbed out source so it builds; clean up some imports from refactoring (#161) 2018-09-27 19:09:26 +00:00
Zahary Karadjov 74f6f0b738 Deal with the refactoring in status-im/nim-rlp#20 2018-09-26 12:58:23 +03:00
Zahary Karadjov 4e323df363 Implement a --datadir command-line options
By default, the database files will be written in the
platform-specific application data folder:

$HOME/AppData/Roaming/Nimbus/DB
$HOME/Library/Application Support/Nimbus/DB
$HOME/.cache/nimbus/db
2018-09-25 02:06:20 +03:00
Dustin Brody c468bcd713 clean up VMTests and remove some scaffolding 2018-09-24 21:46:53 +03:00