nimbus-eth1/tests
Jacek Sieka 0b32078c4b
Consolidate block type for block processing (#2325)
This PR consolidates the split header-body sequences into a single EthBlock
sequence and cleans up the fallout from that which significantly reduces
block processing overhead during import thanks to less garbage collection
and fewer copies of things all around.

Notably, since the number of headers must always match the number of bodies,
we also get rid of a pointless degree of freedom that in the future could
introduce unnecessary bugs.

* only read header and body from era file
* avoid several unnecessary copies along the block processing way
* simplify signatures, cleaning up unused arguemnts and returns
* use `stew/assign2` in a few strategic places where the generated
  nim assignent is slow and add a few `move` to work around poor
  analysis in nim 1.6 (will need to be revisited for 2.0)

```
stats-20240607_2223-a814aa0b.csv vs stats-20240608_0714-21c1d0a9.csv
                       bps_x     bps_y     tps_x        tps_y    bpsd    tpsd    timed
block_number
(498305, 713245]    1,540.52  1,809.73  2,361.58  2775.340189  17.63%  17.63%  -14.92%
(713245, 928185]      730.36    865.26  1,715.90  2028.973852  18.01%  18.01%  -15.21%
(928185, 1143126]     663.03    789.10  2,529.26  3032.490771  19.79%  19.79%  -16.28%
(1143126, 1358066]    393.46    508.05  2,152.50  2777.578119  29.13%  29.13%  -22.50%
(1358066, 1573007]    370.88    440.72  2,351.31  2791.896052  18.81%  18.81%  -15.80%
(1573007, 1787947]    283.65    335.11  2,068.93  2441.373402  17.60%  17.60%  -14.91%
(1787947, 2002888]    287.29    342.11  2,078.39  2474.179448  18.99%  18.99%  -15.91%
(2002888, 2217828]    293.38    343.16  2,208.83   2584.77457  17.16%  17.16%  -14.61%
(2217828, 2432769]    140.09    167.86  1,081.87  1296.336926  18.82%  18.82%  -15.80%

blocks: 1934464, baseline: 3h13m1s, contender: 2h43m47s
bpsd (mean): 19.55%
tpsd (mean): 19.55%
Time (total): -29m13s, -15.14%
```
2024-06-09 16:32:20 +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 Enable test_tracer_json (#2326) 2024-06-08 11:36:51 +00: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 Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
rpc Cleanup stateless and block witness code. (#2295) 2024-06-08 15:05:00 +07:00
test_aristo Coredb fix storage tree issues (#2317) 2024-06-07 10:56:31 +00:00
test_beacon Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_coredb Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_jwt_auth Enable JWT authentication for websockets (#1039) 2022-04-06 15:11:13 +01:00
test_txpool enable JWT auth tests (#2312) 2024-06-07 09:01:45 +07:00
README.md
all_tests.nim Enable test_tracer_json (#2326) 2024-06-08 11:36:51 +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 Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +07:00
nim.cfg import: read from era files (#2254) 2024-05-31 09:13:56 +02:00
persistBlockTestGen.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_accounts_cache.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02: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 Coredb fix storage tree issues (#2317) 2024-06-07 10:56:31 +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 Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +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 Cleanup stateless and block witness code. (#2295) 2024-06-08 15:05:00 +07:00
test_coredb.nim Add some basic rocksdb options to command line (#2286) 2024-06-05 17:08:29 +02: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 Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +07:00
test_generalstate_json.nim Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +07: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 enable JWT auth tests (#2312) 2024-06-07 09:01:45 +07:00
test_helpers.nim rm withdrawn EIP-2315 (#2309) 2024-06-07 08:59:05 +07:00
test_jwt_auth.nim enable JWT auth tests (#2312) 2024-06-07 09:01:45 +07:00
test_memory.nim Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +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_multi_keys.nim Cleanup stateless and block witness code. (#2295) 2024-06-08 15:05:00 +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 Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +07:00
test_persistblock_json.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02: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 EIP-2537 BLS12-381 G1 add/mul/exp and G2 add/mul support with tests (#2315) 2024-06-08 07:39:53 +07:00
test_rpc.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_rpc_experimental_json.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_rpc_getproofs_track_state_changes.nim Cleanup stateless and block witness code. (#2295) 2024-06-08 15:05:00 +07:00
test_stack.nim Remove exceptions from EVM (#2314) 2024-06-07 15:24:32 +07:00
test_state_db.nim Core db disable legacy api n remove distinct tries (#2299) 2024-06-05 20:52:04 +00:00
test_tools_build.nim More witness fixes (#2009) 2024-02-09 12:09:02 +08:00
test_tracer_json.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_transaction_json.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
test_txpool.nim enable JWT auth tests (#2312) 2024-06-07 09:01:45 +07:00
test_txpool2.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00
test_wire_protocol.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
tracerTestGen.nim Consolidate block type for block processing (#2325) 2024-06-09 16:32:20 +02:00

README.md

tests

TODO: more GeneralStateTest fixtures!