nimbus-eth1/tests
Jordan Hrycaj cfe955c962
Feature/implement poa processing (#748)
* re-shuffled Clique functions

why:
  Due to the port from the go-sources, the interface logic is not optimal
  for nimbus. The main visible function is currently snapshot() and most
  of the _procurement_ of this function result has been moved to a
  sub-directory.

* run eip-225 Clique test against p2p/chain.persistBlocks()

why:
  Previously, loading the test block chains was fugdged with the purpose
  only to fill the database. As it is now clear how nimbus works on
  Goerli, the same can be achieved with a more realistic scenario.

details:
  Eventually these tests will be pre-cursor to the reply tests for the
  Goerli chain supporting TDD approach with more simple cases.

* fix exception annotations for executor module

why:
  needed for exception tracking

details:
  main annoyance are vmState methods (in state.nim) which potentially
  throw a base level Exception (a proc would only throws CatchableError)

* split p2p/chain into sub-modules and fix exception annotations

why:
  make space for implementing PoA stuff

* provide over-loadable Clique PRNG

why:
  There is a PRNG provided for generating reproducible number sequences.
  The functions which employ the PRNG to generate time slots were ported
  ported from the go-implementation. They are currently unused.

* implement trusted signer assembly in p2p/chain.persistBlocks()

details:
  * PoA processing moved there at the end of a transaction. Currently,
   there is no action (eg. transaction rollback) if this fails.
  * The unit tests with staged blocks work ok. In particular, there should
    be tests with to-be-rejected blocks.
  * TODO: 1.Optimise throughput/cache handling; 2.Verify headers

* fix statement cast in pool.nim

* added table features to LRU cache

why:
  Clique uses the LRU cache using a mixture of volatile online items
  from the LRU cache and database checkpoints for hard synchronisation.
  For performance, Clique needs more table like features.

details:
  First, last, and query key added, as well as efficient random delete
  added. Also key-item pair iterator added for debugging.

* re-factored LRU snapshot caching

why:
  Caching was sub-optimal (aka. bonkers) in that it skipped over memory
  caches in many cases and so mostly rebuild the snapshot from the
  last on-disk checkpoint.

details;
  The LRU snapshot toValue() handler has been moved into the module
  clique_snapshot. This is for the fact that toValue() is not supposed
  to see the whole LRU cache database. So there must be a higher layer
  working with the the whole LRU cache and the on-disk checkpoint
  database.

also:
  some clean up

todo:
  The code still assumes that the block headers are valid in itself. This
  is particular important when an epoch header (aka re-sync header) is
  processed as it must contain the PoA result of all previous headers.

  So blocks need to be verified when they come in before used for PoA
  processing.

* fix some snapshot cache fringe cases

why:
  Must not index empty sequences in clique_snapshot module
2021-07-14 16:13:27 +01:00
..
customgenesis fixes crappy custom genesis and chain config parser 2021-05-13 16:04:08 +07:00
fixtures London HF: bump ethereum/tests submodule 2021-06-30 20:44:35 +07:00
graphql fix test_graphql because of London HF changes 2021-06-30 20:44:35 +07:00
keystore implement more eth rpc and keystore management 2020-07-23 14:54:32 +07:00
rpcclient replace all unittest usage with unittest2 2021-06-21 20:30:01 +07:00
test_clique Feature/implement poa processing (#748) 2021-07-14 16:13:27 +01:00
README.md integrate GeneralStateTest runner into CI with 775 running tests (#153) 2018-09-19 16:46:14 +00:00
all_tests.nim [FEATURE] Add support for handling experimental api call (#746) 2021-07-07 11:04:18 +02:00
asynctest.nim replace all unittest usage with unittest2 2021-06-21 20:30:01 +07:00
macro_assembler.nim EVM: Remove `vm_forks` everywhere, use common forks list instead 2021-06-08 15:36:31 +01:00
nim.cfg unittest2 (parallelism disabled) 2019-10-31 06:17:01 +01:00
persistBlockTestGen.nim reduce warnings 2020-07-21 13:15:06 +07:00
test_allowed_to_fail.nim reenable EIP-2565: modExp gas cost 2021-05-17 01:28:31 +07:00
test_blockchain_json.nim Feature/goerli replay clique poa (#743) 2021-07-06 14:14:45 +01:00
test_clique.nim Feature/implement poa processing (#748) 2021-07-14 16:13:27 +01:00
test_code_stream.nim merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals 2021-03-31 18:15:27 +01:00
test_config.nim EVM: Remove `vm_types2` everywhere, use common forks list instead 2021-06-08 15:36:31 +01:00
test_difficulty.nim EVM: Remove `vm_types2` everywhere, use common forks list instead 2021-06-08 15:36:31 +01:00
test_forkid.nim drop PublicNetwork enum usage and replace it with NetworkId 2021-05-20 14:04:16 +07:00
test_gas_meter.nim merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals 2021-03-31 18:15:27 +01:00
test_generalstate_json.nim London: fix test_blockchain_json and test_generalstate_json 2021-06-30 20:41:29 +07:00
test_genesis.nim fixes crappy custom genesis and chain config parser 2021-05-13 16:04:08 +07:00
test_graphql.nim fix test_graphql because of London HF changes 2021-06-30 20:44:35 +07:00
test_helpers.nim London: fix test_blockchain_json and test_generalstate_json 2021-06-30 20:41:29 +07:00
test_lru_cache.nim Feature/implement poa processing (#748) 2021-07-14 16:13:27 +01:00
test_memory.nim merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals 2021-03-31 18:15:27 +01:00
test_misc.nim merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals 2021-03-31 18:15:27 +01:00
test_op_arith.nim unittest2 (parallelism disabled) 2019-10-31 06:17:01 +01:00
test_op_bit.nim unittest2 (parallelism disabled) 2019-10-31 06:17:01 +01:00
test_op_custom.nim reduce warnings 2020-07-21 13:15:06 +07:00
test_op_env.nim reduce warnings 2020-07-21 13:15:06 +07:00
test_op_memory.nim fix macro_assembler -> add call to acounts_cache.persist 2020-06-01 13:58:14 +07:00
test_op_misc.nim disable EIP-2315: Simple Subroutines for the EVM 2021-05-17 01:29:03 +07:00
test_persistblock_json.nim fixes evmc bug and add github action job to test evmc 2021-01-20 11:50:07 +07:00
test_precompiles.nim Tests: Disable precompile fixtures when ENABLE_EVMC=1 2021-06-08 18:29:40 +01:00
test_rpc.nim Feature/goerli replay clique poa (#743) 2021-07-06 14:14:45 +01:00
test_stack.nim merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals 2021-03-31 18:15:27 +01:00
test_state_db.nim access list implementation 2021-01-11 14:54:55 +07:00
test_tools_build.nim drop PublicNetwork enum usage and replace it with NetworkId 2021-05-20 14:04:16 +07:00
test_tracer_json.nim reduce unused import warnings 2020-04-15 19:05:57 +07:00
test_transaction_json.nim fixes test codes to deal with eth_tests submodule 2021-01-06 17:02:19 +07:00
tracerTestGen.nim reduce warnings 2020-07-21 13:15:06 +07:00

README.md

tests

TODO: more GeneralStateTest fixtures!