nimbus-eth1/tests
Jordan Hrycaj 0f430c70fd
Aristo avoid storage trie update race conditions (#2251)
* Update TDD suite logger output format choices

why:
  New format is not practical for TDD as it just dumps data across a wide
  range (considerably larder than 80 columns.)

  So the new format can be turned on by function argument.

* Update unit tests samples configuration

why:
  Slightly changed the way to find the `era1` directory

* Remove compiler warnings (fix deprecated expressions and phrases)

* Update `Aristo` debugging tools

* Always update the `storageID` field of account leaf vertices

why:
  Storage tries are weekly linked to an account leaf object in that
  the `storageID` field is updated by the application.

  Previously, `Aristo` verified that leaf objects make sense when passed
  to the database. As a consequence
  * the database was inconsistent for a short while
  * the burden for correctness was all on the application which led
    to delayed error handling which is hard to debug.

  So `Aristo` will internally update the account leaf objects so that
  there are no race conditions due to the storage trie handling

* Aristo: Let `stow()`/`persist()` bail out unless there is a `VertexID(1)`

why:
  The journal and filter logic depends on the hash of the `VertexID(1)`
  which is commonly known as the state root. This implies that all
  changes to the database are somehow related to that.

* Make sure that a `Ledger` account does not overwrite the storage trie reference

why:
  Due to the abstraction of a sub-trie (now referred to as column with a
  hash describing its state) there was a weakness in the `Aristo` handler
  where an account leaf could be overwritten though changing the validity
  of the database. This has been changed and the database will now reject
  such changes.

  This patch fixes the behaviour on the application layer. In particular,
  the column handle returned by the `CoreDb` needs to be updated by
  the `Aristo` database state. This mitigates the problem that a storage
  trie might have vanished or re-apperaed with a different vertex ID.

* Fix sub-trie deletion test

why:
  Was originally hinged on `VertexID(1)` which cannot be wholesale
  deleted anymore after the last Aristo update. Also, running with
  `VertexID(2)` needs an artificial `VertexID(1)` for making `stow()`
  or `persist()` work.

* Cosmetics

* Activate `test_generalstate_json`

* Temporarily `deactivate test_tracer_json`

* Fix copyright header

---------

Co-authored-by: jordan <jordan@dry.pudding>
Co-authored-by: Jacek Sieka <jacek@status.im>
2024-05-30 17:48:38 +00:00
..
amphora Migrate to Engine API spec version v1.0.0-alpha.5; More progress towards working M1 2022-01-25 12:52:50 +02:00
bootstrap config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
customgenesis Add geth compatibility to genesis config parser 2023-11-29 16:15:31 +07:00
db Added support for namespaces to RocksDb kvstore. (#2066) 2024-03-12 11:04:46 +08:00
fixtures evm: Reject contract creation if the storage is non-empty(EIP-7610) 2024-05-07 09:19:59 +07:00
graphql Workaround for 0 gas price estimation (#2180) 2024-05-28 13:36:38 +07:00
keystore implement more eth rpc and keystore management 2020-07-23 14:54:32 +07:00
merge reenable testEngineAPI in test_merge 2022-03-17 12:54:04 +07:00
replay results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
rpc Experimental RPC endpoints for generating block witnesses (#1977) 2024-01-22 17:11:37 +08:00
test_aristo Aristo avoid storage trie update race conditions (#2251) 2024-05-30 17:48:38 +00:00
test_beacon Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_coredb Aristo avoid storage trie update race conditions (#2251) 2024-05-30 17:48:38 +00:00
test_jwt_auth Enable JWT authentication for websockets (#1039) 2022-04-06 15:11:13 +01:00
test_rocksdb_timing Misc updates for full sync (#2140) 2024-04-19 18:37:27 +00:00
test_sync_snap results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
test_txpool results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
README.md
all_tests.nim Aristo avoid storage trie update race conditions (#2251) 2024-05-30 17:48:38 +00:00
all_tests_macro.nim Fix unhandled overflow exception in gasCall 2023-12-04 14:10:56 +07:00
asynctest.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
evm_tests.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
macro_assembler.nim Make test op memory work again (#2236) 2024-05-28 14:24:10 +00:00
nim.cfg Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
persistBlockTestGen.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_accounts_cache.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_allowed_to_fail.nim evm: Reject contract creation if the storage is non-empty(EIP-7610) 2024-05-07 09:19:59 +07:00
test_aristo.nim Update aristo journal functionality (#2155) 2024-04-26 13:43:52 +00:00
test_block_fixture.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
test_blockchain_json.nim Simplify AccountsLedgerRef complexity (#2239) 2024-05-29 13:06:49 +02:00
test_code_stream.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
test_config.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
test_configuration.nim rm Clique consensus method support and Goerli network (#2219) 2024-05-25 16:12:14 +02:00
test_coredb.nim Aristo avoid storage trie update race conditions (#2251) 2024-05-30 17:48:38 +00:00
test_difficulty.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_eip4844.nim Introduce wrapper type for EIP-4844 transactions (#2177) 2024-05-15 10:07:59 +07:00
test_filters.nim Bump nim-web3 and others 2024-01-14 10:41:23 +07:00
test_forkid.nim Remove more goerli data (#2249) 2024-05-30 11:49:47 +00:00
test_gas_meter.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
test_generalstate_json.nim results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
test_genesis.nim rm Clique consensus method support and Goerli network (#2219) 2024-05-25 16:12:14 +02:00
test_getproof_json.nim Simplify AccountsLedgerRef complexity (#2239) 2024-05-29 13:06:49 +02:00
test_graphql.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_helpers.nim Ledger activate unified accounts cache wrapper (#1939) 2023-12-12 19:12:56 +00:00
test_jwt_auth.nim results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
test_keyed_queue_rlp.nim Reduce compiler warnings (#2030) 2024-02-16 16:08:07 +07:00
test_memory.nim Reduce compiler warnings (#2030) 2024-02-16 16:08:07 +07:00
test_merge.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_misc.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
test_op_arith.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_op_bit.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_op_custom.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_op_env.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_op_memory.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_op_misc.nim Fix styles and reduce compiler warnings (#2086) 2024-03-20 14:35:38 +07:00
test_overflow.nim restore a few tests, cleanup (#2234) 2024-05-28 14:49:35 +02:00
test_persistblock_json.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_persistblock_witness_json.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_pow.nim fix import path; force refc memory management even with Nim 2.0+ (#2241) 2024-05-29 20:47:06 +02:00
test_precompiles.nim restore a few tests, cleanup (#2234) 2024-05-28 14:49:35 +02:00
test_rocksdb_timing.nim Misc updates for full sync (#2140) 2024-04-19 18:37:27 +00:00
test_rpc.nim Workaround for 0 gas price estimation (#2180) 2024-05-28 13:36:38 +07:00
test_rpc_experimental_json.nim Simplify AccountsLedgerRef complexity (#2239) 2024-05-29 13:06:49 +02:00
test_rpc_getproofs_track_state_changes.nim restore a few tests, cleanup (#2234) 2024-05-28 14:49:35 +02:00
test_stack.nim Core db and aristo updates for destructor and tx logic (#1894) 2023-11-16 19:35:03 +00:00
test_state_db.nim Enable test_state_db (#2244) 2024-05-30 07:44:52 +02:00
test_sync_snap.nim restore a few tests, cleanup (#2234) 2024-05-28 14:49:35 +02:00
test_tools_build.nim More witness fixes (#2009) 2024-02-09 12:09:02 +08:00
test_tracer_json.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00
test_transaction_json.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
test_txpool.nim Enable test_txpool2 independetly from test_txpool (#2246) 2024-05-30 12:11:41 +02:00
test_txpool2.nim results: use canonical import (#2248) 2024-05-30 14:54:03 +02:00
test_wire_protocol.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
tracerTestGen.nim Culling legacy DB and accounts cache (#2197) 2024-05-20 10:17:51 +00:00

README.md

tests

TODO: more GeneralStateTest fixtures!