Commit Graph

108 Commits

Author SHA1 Message Date
jangko db65f92e66
refactor vmConfiguration in test_blockchain_json
instead of using it's own blockNumber to Fork calculation,
we switch to ChainConfig to Fork to ensure smooth transition
when using common block validator.
2021-05-14 15:37:29 +07:00
jangko beb274d98c
remove unnecessary codes from test_blockchain_json
except for genesis block, we are not parsing block header from json
node anymore.

we parse block headers from block RLP, it is the same thing.
2021-05-14 15:37:29 +07:00
jangko f2491e6307
fixes crappy custom genesis and chain config parser
instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.

fixes #635
2021-05-13 16:04:08 +07:00
jangko 639674d341
add disableParamFiltering() to both test_generalstate_json and test_blockchain_json
disableParamFiltering() is called in test_all, so its ok when
called via test_all. but when test_generalstate_json or
test_blockchain_json is called independently, and we are using
command line switch, the default param handler from std/unittest
will interfere. hence need to disable it.
2021-04-25 12:20:03 +07:00
Jamie Lokier 8a806da600
Bugfix: Fix blockchain tests: It was quietly skipping 4654 of them
The "new block chain json tests" were being skipped on Linux, but silently so
that CI didn't notice.  These are a significant part of the Ethereum test suite.

See the missing output from `make test`, also visible in CI logs for Linux
targets (prior to this commit):

      [OK] tests/fixtures/eth_tests/TransactionTests/ttGasPrice/TransactionWithGasPriceOverflow.json
      [OK] tests/fixtures/eth_tests/TransactionTests/ttGasPrice/TransactionWithHighGasPrice.json

    [Suite] new block chain json tests
            <-- nothing here

    [Suite] Fork ID tests
      [OK] MainNet
      [OK] RopstenNet

Commit 3d468a7 (`fixes path pointing to eth_tests`) renamed the JSON fixture
source directoryf in the witness-builder tests but not the regular blockchain
tests.  As a result, searching for JSON test files yielded zero results.  To
make this less likely in future, zero results is now an error.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-04-08 16:40:53 +01:00
Jordan Hrycaj 00ba7a2718
merge vm_forks and vm_opcode_values => vm_type2
why:
  all types, but they cannot be merged int vm_types because of a circular
  dependency.
2021-03-31 17:53:15 +01:00
Jordan Hrycaj 3a3e4d5707
provide vm_forks as import/export wrapper
details:
  moved original vm/interpreter/vm_forks.nim => vm/interpreter/nvm_forks.nim
2021-03-31 16:03:34 +01:00
jangko 03bed02512 split legacy and new test to save time 2021-01-14 23:22:28 +07:00
jangko f6c44ffcc0 fixes EIP2929 CALL opCode 2021-01-14 23:22:28 +07:00
jangko 15cacc749d
clean up EIP2929 for test 2021-01-12 16:17:00 +07:00
jangko f906d177f4
add comments about disabled EIPs 2021-01-11 15:33:30 +07:00
jangko 8f7e45fa08
fixes test codes 2021-01-11 14:54:11 +07:00
jangko 3d468a7a4c
fixes path pointing to eth_tests 2021-01-06 21:45:48 +07:00
jangko 74cccdfe9e
fixes test codes to deal with eth_tests submodule 2021-01-06 17:02:19 +07:00
jangko 165f9fea2e
reduce warnings 2020-07-21 13:15:06 +07:00
jangko 49460b6b1e
move buildWitness from test_blockchain_json to vm_state 2020-06-18 13:16:38 +07:00
jangko 3947e9a853
piggyback generate block witness test on test_blockchain_json 2020-06-06 10:26:36 +07:00
jangko 079579c1cb
fix test_blockchain_json -> add a call to accounts_cache.persist 2020-06-01 12:00:36 +07:00
andri lim af02a3b1b2
reduce unused import warnings 2020-04-15 19:05:57 +07:00
andri lim 5e694c6874
fix test_blockchain_json 2020-04-12 19:02:03 +07:00
andri lim 87bae2bb78
switch to new toFork 2020-04-12 18:02:59 +07:00
andri lim 266e0ddb1e
room for EIP-1283 2020-03-24 17:21:13 +07:00
andri lim 32574fcebe allow user to turn pruning on/off when run test 2020-02-20 09:16:29 +02:00
andri lim ed5710fa17 allow user to select legacy or new test suite for GST and BCT 2020-02-20 09:16:29 +02:00
Ștefan Talpalaru ea38893416
fix test dir name 2020-01-31 22:53:28 +01:00
andri lim df21dd44cb fixes typo 2019-12-10 12:34:48 +02:00
andri lim 9596dbc267 activates blockchain test 2019-12-10 12:34:48 +02:00
andri lim 1ffb992674 multi root state trie implementation 2019-12-10 12:34:48 +02:00
andri lim 2057f88dba
fixes #421, each tests have their own skip table 2019-12-06 15:01:49 +07:00
andri lim 6b053d8a89
skip failed tests 2019-11-19 13:12:13 +07:00
andri lim dda26611c2
fixes bc and gst tester [skip ci] 2019-11-14 22:37:58 +07:00
andri lim f66f49168a
fix bc/gst tester for istanbul [skip ci] 2019-11-14 21:20:34 +07:00
Ștefan Talpalaru d84e4810d5
unittest2 (parallelism disabled)
This is https://github.com/status-im/nimbus/pull/332 with parallelism
disabled, while some threadpool deadlock is being debugged.
2019-10-31 06:17:01 +01:00
andri lim a65ab2763e fixes generateHeaderFromParentHeader 2019-09-26 12:33:43 +03:00
andri lim 12960c27ce fixes coinBase suicide 2019-09-26 12:33:43 +03:00
andri lim 4c48244cbb fixes debugger 2019-09-26 12:33:43 +03:00
andri lim b189e1604f fixes gasLimitBounds 2019-09-26 12:33:43 +03:00
andri lim ed01201233 fixes fork choice 2019-09-26 12:33:43 +03:00
andri lim a2a8e81265 fixes difficulty validation 2019-09-26 12:33:43 +03:00
andri lim 58a7d5af83 fixes checkPOW of validateSeal 2019-09-26 12:33:43 +03:00
andri lim 7a07737855 implement bc_test debugger 2019-09-26 12:33:43 +03:00
andri lim bf23bd8d84 fixes wrongNumber bug 2019-09-26 12:33:43 +03:00
andri lim 5c7adaae3b implement pow validation 2019-09-26 12:33:43 +03:00
andri lim b5266a7412 fix wrong gasUsed 2019-09-26 12:33:43 +03:00
andri lim 85b21721b0 pass more tests 2019-09-26 12:33:43 +03:00
andri lim 9cba2c9cc0 fix validateGasLimit 2019-09-26 12:33:43 +03:00
andri lim 3ad465d169 implement block validation and friends 2019-09-26 12:33:43 +03:00
andri lim af49151bc6 deals with invalid blocks 2019-09-26 12:33:43 +03:00
andri lim 49a6f84ac9 activates verifyStateDB 2019-09-26 12:33:43 +03:00
andri lim 7c65b8a2b2 implement validate block unchanged 2019-09-26 12:33:43 +03:00
andri lim 594c3b8d08 some cleanup 2019-09-26 12:33:43 +03:00
andri lim e61e530b9f skip failing test 2019-09-26 12:33:43 +03:00
andri lim 890c6a9802 add command line config 2019-09-26 12:33:43 +03:00
andri lim 12ea5247d6 execute transactions 2019-09-26 12:33:43 +03:00
andri lim 9485db920d prepare vmstate for block validation 2019-09-26 12:33:43 +03:00
andri lim 33c2848fd5 implement vmconfig for bc test 2019-09-26 12:33:43 +03:00
andri lim 081baa6da7 parsing complete 2019-09-04 19:05:21 +02:00
andri lim c5d07fc07f implement bc test fixtures parser 2019-09-04 19:05:21 +02:00