nimbus-eth2/tests
Jacek Sieka 1ef7d237cc
Shared validator pubkey (#5883)
This PR allows sharing the pubkey data between validators by using a
thread-local cache for pubkey data, netting about a 400mb mem usage
reduction on holesky due to us keeping 3 permanent + several ephemeral
state copies in memory at all times and each state copy holding a full
validator.

The PR also introduces a hash cache for the key which gives ~14% speedup
for a full state `hash_tree_root` - the key makes up for a large part of
the `Validator` htr time.

Finally, the time it takes to copy a state goes down as well from ~80m
ms to ~60, for reasons similar to htr.

We use a `ptr` even if a `ref` could in theory have been used - there is
not much practical benefit to a `ref` (given it's mutable) while a `ptr`
is cheaper and easier to copy (when copying temporary states).

We could go further and cache a cooked pubkey but it turns out this is
quite intrusive - in all the relevant places, we're already using a
cooked key from the immutable validator data so there are no immediate
performance gains of doing so while managing the compressed -> cooked
key mapping would become more difficult - something for a future PR
perhaps.

Co-authored-by: Etan Kissling <etan@status.im>
2024-02-21 20:06:19 +01:00
..
consensus_spec annotate `test_fixture_fork_choice` with `{.raises.}` (#5903) 2024-02-17 22:52:11 +01:00
fuzzing add missing `std/` prefix to more imports (#5696) 2024-01-06 07:18:28 +01:00
helpers add missing `std/` prefix to more imports (#5696) 2024-01-06 07:18:28 +01:00
media Add a JWT file that must be present on the file system for the test suite to succeed 2023-03-17 17:49:39 +02:00
mocking verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
simulation add `KZGProof` and `Blob` REST JSON serializations (#5526) 2023-10-25 23:50:59 +02:00
slashing_protection verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
all_tests.nim implement getBlindedBlock REST API (#5829) 2024-01-31 03:18:55 +00:00
nim.cfg chronos: bump (#5684) 2024-01-05 10:08:38 +01:00
test_action_tracker.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_attestation_pool.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_beacon_chain_db.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_beacon_time.nim Fix typos (#5835) 2024-01-29 09:37:38 +00:00
test_block_dag.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_block_processor.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_block_quarantine.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_blockchain_dag.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_conf.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_datatypes.nim remove false OnBlockAdded dependency on phase0 HashedBeaconState (#2661) 2021-06-21 08:35:24 +00:00
test_deposit_snapshots.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_discovery.nim rm some unnecessary stew/shims/net imports to reduce deprecation warnings (#5805) 2024-01-20 12:32:38 +00:00
test_el_conf.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_el_manager.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_engine_authentication.nim remove unused imports in tests/ (#3713) 2022-06-07 17:05:06 +00:00
test_eth2_ssz_serialization.nim use isZeroMemory for Eth2Digest comparisons (#3386) 2022-02-14 05:26:19 +00:00
test_forks.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_gossip_transition.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_gossip_validation.nim `noCancel` in `test_gossip_validation` (#5907) 2024-02-18 00:40:15 +00:00
test_helpers.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_honest_validator.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_key_splitting.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_keymanager_api.nim Fix typos (#5835) 2024-01-29 09:37:38 +00:00
test_keystore.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_keystore_management.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_light_client.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_light_client_processor.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_message_signatures.nim rm unused code in {ncli,research,tests}/ (#5809) 2024-01-21 07:55:03 +01:00
test_network_metadata.nim Add metadata for the Holesky network (#5337) 2023-09-08 08:53:27 +03:00
test_peer_pool.nim proc -> func in ncli/, research/, and test/ (#2818) 2021-08-25 14:51:52 +00:00
test_remote_keystore.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_rest_json_serialization.nim Shared validator pubkey (#5883) 2024-02-21 20:06:19 +01:00
test_serialization.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_signing_node.nim rm unused code; fix a Deprecated warning; proc to func (#5807) 2024-01-20 21:36:01 +00:00
test_spec.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_statediff.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_sync_committee_pool.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_sync_manager.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
test_toblindedblock.nim implement getBlindedBlock REST API (#5829) 2024-01-31 03:18:55 +00:00
test_validator_change_pool.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_validator_client.nim raises for gossip (#5808) 2024-01-22 17:34:54 +01:00
test_validator_pool.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
test_zero_signature.nim update spec references from eth2.0-specs to consensus-specs and to v1.1.0-beta.2 (#2822) 2021-08-26 10:21:52 +02:00
testbcutil.nim add `{.push raises: [].}` to recently modified files (#5908) 2024-02-18 01:16:49 +00:00
testblockutil.nim automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
testdbutil.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
teststateutil.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00
testutil.nim verify `genesis_time` more strictly (fixes #1667) (#5694) 2024-01-06 15:26:56 +01:00