nimbus-eth1/tests
Jordan Hrycaj 261c0b51a7
Redesign of BaseVMState descriptor (#923)
* Redesign of BaseVMState descriptor

why:
  BaseVMState provides an environment for executing transactions. The
  current descriptor also provides data that cannot generally be known
  within the execution environment, e.g. the total gasUsed which is
  available not before after all transactions have finished.

  Also, the BaseVMState constructor has been replaced by a constructor
  that does not need pre-initialised input of the account database.

also:
  Previous constructor and some fields are provided with a deprecated
  annotation (producing a lot of noise.)

* Replace legacy directives in production sources

* Replace legacy directives in unit test sources

* fix CI (missing premix update)

* Remove legacy directives

* chase CI problem

* rebased

* Re-introduce 'AccountsCache' constructor optimisation for 'BaseVmState' re-initialisation

why:
  Constructing a new 'AccountsCache' descriptor can be avoided sometimes
  when the current state root is properly positioned already. Such a
  feature existed already as the update function 'initStateDB()' for the
  'BaseChanDB' where the accounts cache was linked into this desctiptor.

  The function 'initStateDB()' was removed and re-implemented into the
  'BaseVmState' constructor without optimisation. The old version was of
  restricted use as a wrong accounts cache state would unconditionally
  throw an exception rather than conceptually ask for a remedy.

  The optimised 'BaseVmState' re-initialisation has been implemented for
  the 'persistBlocks()' function.

also:
  moved some test helpers to 'test/replay' folder

* Remove unused & undocumented fields from Chain descriptor

why:
  Reduces attack surface in general & improves reading the code.
2022-01-18 16:19:32 +00:00
..
bootstrap config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
customgenesis config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
fixtures bump ethereum/tests fixtures 2021-09-29 10:55:31 +07:00
graphql unify evm call for both json-rpc and graphql 2021-10-31 12:24:40 +07:00
keystore implement more eth rpc and keystore management 2020-07-23 14:54:32 +07:00
replay Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
rpcclient replace all unittest usage with unittest2 2021-06-21 20:30:01 +07:00
test_clique Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_pow Jordan/pow cache management (#888) 2021-12-10 08:49:57 +00:00
README.md integrate GeneralStateTest runner into CI with 775 running tests (#153) 2018-09-19 16:46:14 +00:00
all_tests.nim Jordan/accounts cache scenario (#904) 2021-12-13 11:58:05 +00:00
asynctest.nim replace all unittest usage with unittest2 2021-06-21 20:30:01 +07:00
macro_assembler.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
nim.cfg unittest2 (parallelism disabled) 2019-10-31 06:17:01 +01:00
persistBlockTestGen.nim config: replace stdlib parseOpt with nim-confutils 2021-09-18 17:34:46 +07:00
test_accounts_cache.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_allowed_to_fail.nim Tests: Add loopMul.json and loopExp.json to skipped, slow tests 2021-08-03 15:03:05 +01:00
test_blockchain_json.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_clique.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00: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_configuration.nim config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
test_difficulty.nim config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
test_forkid.nim Arrow Glacier fork 2021-12-10 13:40:51 +00: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 Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_genesis.nim config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
test_graphql.nim Arrow Glacier fork 2021-12-10 13:40:51 +00:00
test_helpers.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00: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 config: replace stdlib parseOpt with nim-confutils 2021-09-18 17:34:46 +07:00
test_op_arith.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_op_bit.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_op_custom.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_op_env.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_op_memory.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_op_misc.nim make macro_assembler to use the same testEvmCall 2021-10-14 15:10:12 +07:00
test_persistblock_json.nim config: rearrange getConfiguration usage 2021-09-08 08:07:10 +07:00
test_pow.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_precompiles.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00:00
test_rpc.nim Redesign of BaseVMState descriptor (#923) 2022-01-18 16:19:32 +00: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 config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00

README.md

tests

TODO: more GeneralStateTest fixtures!