diff --git a/beacon_node/eth1/src/service.rs b/beacon_node/eth1/src/service.rs index 221d0a49df..bf3c1940aa 100644 --- a/beacon_node/eth1/src/service.rs +++ b/beacon_node/eth1/src/service.rs @@ -227,6 +227,15 @@ impl Service { .get_valid_signature_count(self.highest_safe_block()?) } + /// Returns the number of deposits with valid signatures that have been observed, without + /// respecting the `highest_safe_block`. + pub fn get_raw_valid_signature_count(&self) -> Option { + let deposits = self.deposits().read(); + deposits + .cache + .get_valid_signature_count(deposits.cache.latest_block_number()?) + } + /// Returns the number of deposits with valid signatures that have been observed up to and /// including the block at `block_number`. /// diff --git a/beacon_node/genesis/src/eth1_genesis_service.rs b/beacon_node/genesis/src/eth1_genesis_service.rs index a1f6658502..4aa60da7a6 100644 --- a/beacon_node/genesis/src/eth1_genesis_service.rs +++ b/beacon_node/genesis/src/eth1_genesis_service.rs @@ -146,6 +146,7 @@ impl Eth1GenesisService { "Waiting for more deposits"; "min_genesis_active_validators" => spec.min_genesis_active_validator_count, "total_deposits" => eth1_service.deposit_cache_len(), + "valid_deposits" => eth1_service.get_raw_valid_signature_count(), ); delay_for(update_interval).await;