From 030226148de63a688521b458b569620619bb0f52 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sat, 23 Dec 2023 06:55:47 +0100 Subject: [PATCH] rename `exit_pool` > `validator_change_pool` (#5679) The `ExitPool` was renamed to `ValidatorChangePool` with Capella, but the files were still using the previous name. Rename for consistency. --- beacon_chain/beacon_node.nim | 6 +++--- beacon_chain/consensus_object_pools/README.md | 2 +- .../{exit_pool.nim => validator_change_pool.nim} | 0 beacon_chain/gossip_processing/eth2_processor.nim | 10 ++++++---- beacon_chain/gossip_processing/gossip_validation.nim | 3 ++- beacon_chain/rpc/rest_beacon_api.nim | 2 +- beacon_chain/validators/beacon_validators.nim | 4 ++-- tests/all_tests.nim | 2 +- ...st_exit_pool.nim => test_validator_change_pool.nim} | 2 +- 9 files changed, 17 insertions(+), 14 deletions(-) rename beacon_chain/consensus_object_pools/{exit_pool.nim => validator_change_pool.nim} (100%) rename tests/{test_exit_pool.nim => test_validator_change_pool.nim} (99%) diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index 6a9d0a5e2..8f4879706 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -20,7 +20,7 @@ import ./el/el_manager, ./consensus_object_pools/[ blockchain_dag, blob_quarantine, block_quarantine, consensus_manager, - exit_pool, attestation_pool, sync_committee_msg_pool], + attestation_pool, sync_committee_msg_pool, validator_change_pool], ./spec/datatypes/[base, altair], ./spec/eth2_apis/dynamic_fee_recipients, ./sync/[sync_manager, request_manager], @@ -32,10 +32,10 @@ import export osproc, chronos, presto, action_tracker, beacon_clock, beacon_chain_db, conf, light_client, - attestation_pool, sync_committee_msg_pool, validator_pool, + attestation_pool, sync_committee_msg_pool, validator_change_pool, eth2_network, el_manager, request_manager, sync_manager, eth2_processor, optimistic_processor, blockchain_dag, block_quarantine, - base, exit_pool, message_router, validator_monitor, + base, message_router, validator_monitor, validator_pool, consensus_manager, dynamic_fee_recipients type diff --git a/beacon_chain/consensus_object_pools/README.md b/beacon_chain/consensus_object_pools/README.md index 777b2769c..0a96afd54 100644 --- a/beacon_chain/consensus_object_pools/README.md +++ b/beacon_chain/consensus_object_pools/README.md @@ -22,5 +22,5 @@ The pools presenet in this folder are: - blockchain_dag: an in-memory direct-acyclic graph of fully validated and verified blockchain candidates with the tail being the last finalized epoch. A block in the DAG MUST be in the fork choice and a block in the fork choice MUST be in the DAG (except for orphans following finalization). On finalization non-empty epoch blocks are stored in the beacon_chain_db. - attestation_pool: Handles the attestation received from gossip and collect them for fork choice. -- exit_pool: +- validator_change_pool: Handle voluntary exits and forced exits (attester slashings and proposer slashings) diff --git a/beacon_chain/consensus_object_pools/exit_pool.nim b/beacon_chain/consensus_object_pools/validator_change_pool.nim similarity index 100% rename from beacon_chain/consensus_object_pools/exit_pool.nim rename to beacon_chain/consensus_object_pools/validator_change_pool.nim diff --git a/beacon_chain/gossip_processing/eth2_processor.nim b/beacon_chain/gossip_processing/eth2_processor.nim index aef95b5fc..e850e3a1a 100644 --- a/beacon_chain/gossip_processing/eth2_processor.nim +++ b/beacon_chain/gossip_processing/eth2_processor.nim @@ -15,16 +15,18 @@ import ../spec/datatypes/[altair, phase0, deneb], ../consensus_object_pools/[ blob_quarantine, block_clearance, block_quarantine, blockchain_dag, - exit_pool, attestation_pool, light_client_pool, sync_committee_msg_pool], + attestation_pool, light_client_pool, sync_committee_msg_pool, + validator_change_pool], ../validators/validator_pool, ../beacon_clock, "."/[gossip_validation, block_processor, batch_validation], ../nimbus_binary_common export - results, taskpools, block_clearance, blockchain_dag, exit_pool, attestation_pool, - light_client_pool, sync_committee_msg_pool, validator_pool, beacon_clock, - gossip_validation, block_processor, batch_validation, block_quarantine + results, taskpools, block_clearance, blockchain_dag, attestation_pool, + light_client_pool, sync_committee_msg_pool, validator_change_pool, + validator_pool, beacon_clock, gossip_validation, block_processor, + batch_validation, block_quarantine logScope: topics = "gossip_eth2" diff --git a/beacon_chain/gossip_processing/gossip_validation.nim b/beacon_chain/gossip_processing/gossip_validation.nim index bb6b9e156..d5a0947c0 100644 --- a/beacon_chain/gossip_processing/gossip_validation.nim +++ b/beacon_chain/gossip_processing/gossip_validation.nim @@ -16,7 +16,8 @@ import beaconstate, state_transition_block, forks, helpers, network, signatures], ../consensus_object_pools/[ attestation_pool, blockchain_dag, blob_quarantine, block_quarantine, - exit_pool, spec_cache, light_client_pool, sync_committee_msg_pool], + spec_cache, light_client_pool, sync_committee_msg_pool, + validator_change_pool], ".."/[beacon_clock], ./batch_validation diff --git a/beacon_chain/rpc/rest_beacon_api.nim b/beacon_chain/rpc/rest_beacon_api.nim index 0070b987e..e8496ad82 100644 --- a/beacon_chain/rpc/rest_beacon_api.nim +++ b/beacon_chain/rpc/rest_beacon_api.nim @@ -12,7 +12,7 @@ import ./rest_utils, ./state_ttl_cache, ../beacon_node, - ../consensus_object_pools/[blockchain_dag, exit_pool, spec_cache], + ../consensus_object_pools/[blockchain_dag, spec_cache, validator_change_pool], ../spec/[deposit_snapshots, eth2_merkleization, forks, network, validator], ../spec/datatypes/[phase0, altair, deneb], ../validators/message_router_mev diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 62a7cf100..e117b73d0 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -32,8 +32,8 @@ import eth2_merkleization, forks, helpers, network, signatures, state_transition, validator], ../consensus_object_pools/[ - spec_cache, blockchain_dag, block_clearance, attestation_pool, exit_pool, - sync_committee_msg_pool, consensus_manager], + spec_cache, blockchain_dag, block_clearance, attestation_pool, + sync_committee_msg_pool, validator_change_pool, consensus_manager], ../el/el_manager, ../networking/eth2_network, ../sszdump, ../sync/sync_manager, diff --git a/tests/all_tests.nim b/tests/all_tests.nim index 713941f89..a900594ed 100644 --- a/tests/all_tests.nim +++ b/tests/all_tests.nim @@ -26,7 +26,6 @@ import # Unit test ./test_el_manager, ./test_el_conf, ./test_eth2_ssz_serialization, - ./test_exit_pool, ./test_forks, ./test_gossip_transition, ./test_gossip_validation, @@ -45,6 +44,7 @@ import # Unit test ./test_statediff, ./test_sync_committee_pool, ./test_sync_manager, + ./test_validator_change_pool, ./test_validator_pool, ./test_zero_signature, ./test_signing_node, diff --git a/tests/test_exit_pool.nim b/tests/test_validator_change_pool.nim similarity index 99% rename from tests/test_exit_pool.nim rename to tests/test_validator_change_pool.nim index d81d02f62..213a0b153 100644 --- a/tests/test_exit_pool.nim +++ b/tests/test_validator_change_pool.nim @@ -11,7 +11,7 @@ import ../beacon_chain/spec/[ datatypes/base, forks, presets, signatures, state_transition], ../beacon_chain/consensus_object_pools/[ - block_quarantine, blockchain_dag, exit_pool], + block_quarantine, blockchain_dag, validator_change_pool], "."/[testutil, testblockutil, testdbutil] func makeSignedBeaconBlockHeader(