nimbus-eth1/tests
Jordan Hrycaj a0d0e35a70
Renamed source file clique_utils => clique_helpers (#762)
* Renamed source file clique_utils => clique_helpers

why:
  New name is more in line with other modules where local libraries
  are named similarly.

* re-implemented PoA verification module as clique_verify.nim

details:
  The verification code was ported from the go sources and provisionally
  stored in the clique_misc.nim source file.

todo:
  Bring it to life.

* re-design Snapshot descriptor as: ref object

why:
  Avoids some copying descriptor objects

details:
  The snapshot management in clique_snapshot.nim has been cleaned up.

todo:
  There is a lot of unnecessary copying & sub-list manipulation of
  seq[BlockHeader] lists which needs to be simplified by managing
  index intervals.

* optimised sequence handling for Clique/PoA

why:
  To much ado about nothing

details:
  * Working with shallow sequences inside PoA processing avoids
    unnecessary copying.
  * Using degenerate lists in the cliqueVerify() batch where only the
    parent (and no other ancestor) is needed.

todo:
  Expose only functions that are needed, shallow sequences should be
  handles with care.

* fix var-parameter function argument

* Activate PoA engine -- currently proof of concept

details:
  PoA engine is activated with newChain(extraValidation = true) applied
  to a PoA network.

status and todo:
  The extraValidation flag on the Chain object can be set at a later
  state which allows to pre-load parts of the block chain without
  verification. Setting it later will only go back the block chain to
  the latest epoch checkpoint. This is inherent to the Clique protocol,
  needs testing though.

  PoA engine works in fine weather mode on Goerli replay. With the
  canonical eip-225 tests, there are quite a few fringe conditions
  that fail. These can easily fudged over to make things work but need
  some more work to understand and correct properly.

* Make the last offending verification header available

why:
  Makes some fringe case tests work.

details:
  Within a failed transaction comprising several blocks, this
  feature help to identify the offending block if there was a
  PoA verification error.

* Make PoA header verifier store the final snapshot

why:
  The last snapshot needed by the verifier is the one of the parent but
  the list of authorised signer is derived from the current snapshot. So
  updating to the latest snapshot provides the latest signers list.

details:
  Also, PoA processing has been implemented as transaction in
  persistBlocks() with Clique state rollback.

  Clique tests succeed now.

* Avoiding double yields in iterator => replaced by template

why:
  Tanks to Andri who observed it (see #762)

* Calibrate logging interval and fix logging event detection

why:
  Logging interval as copied from Go implementation was too large and
  needed re-calibration. Elapsed time calculation was bonkers, negative
  the wrong way round.
2021-07-21 14:31:52 +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 Renamed source file clique_utils => clique_helpers (#762) 2021-07-21 14:31:52 +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 Renamed source file clique_utils => clique_helpers (#762) 2021-07-21 14:31:52 +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!