From 7873f2a3c8516ff3e35f5ffcc570b770c2f4d6c0 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 31 Dec 2024 14:49:06 +0100 Subject: [PATCH] A0-0000: Rename flag no_collection_of_extra_debugging_data to collect_validator_network_data. (#1904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description "Cherry-pick" of https://github.com/Cardinal-Cryptography/aleph-node/commit/a9935749cf2c92e32f712e959e5b567a8a88980b . It's fine to rename param as this change will be released in the next major release. ## Type of change Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - Breaking change (fix or feature that would cause existing functionality to not work as expected) # Testing Run locally command: ``` curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "alephNode_unstable_validatorNetworkInfo", "params": []}' http://localhost:9944/ {"jsonrpc":"2.0","result":{"5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK":{"session":11,"network_level_address":"127.0.0.1:30346","validator_network_peer_id":"5G8NVxeEmShiyafdkTSEoGXXqh8beqWFiaZrMWUcaHm3Pnuf"},"5DiDShBWa1fQx6gLzpf3SFBhMinCoyvHM1BWjPNsmXS8hkrW":{"session":11,"network_level_address":"127.0.0.1:30347","validator_network_peer_id":"5EKkZAotyPkhR9LQ45ePK3Pz6MEHAVT9v4rSaDaGfQ262bJu"},"5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o":{"session":11,"network_level_address":"127.0.0.1:30344","validator_network_peer_id":"5CnYteF2HAqBEX54cCKptwoFR3yMFJAPyjfmRYwNTdzsV9tZ"},"5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9":{"session":11,"network_level_address":"127.0.0.1:30345","validator_network_peer_id":"5G7D18QnYUZJzCkFyJZqdGei41mZ818KMpr7yCq8rmUtPWYW"}},"id":1}⏎ ``` --- bin/node/src/aleph_cli.rs | 8 ++++---- bin/node/src/service.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/node/src/aleph_cli.rs b/bin/node/src/aleph_cli.rs index fafcf5ed4f..36b039bfa2 100644 --- a/bin/node/src/aleph_cli.rs +++ b/bin/node/src/aleph_cli.rs @@ -57,8 +57,8 @@ pub struct AlephCli { /// Don't spend some extra time to collect more debugging data (e.g. validator network details). /// By default collecting is enabled, as the impact on performance is negligible, if any. - #[clap(long, default_value_t = false)] - no_collection_of_extra_debugging_data: bool, + #[clap(long, default_value_t = true)] + collect_validator_network_data: bool, } impl AlephCli { @@ -105,7 +105,7 @@ impl AlephCli { self.substrate_network_bit_rate } - pub fn no_collection_of_extra_debugging_data(&self) -> bool { - self.no_collection_of_extra_debugging_data + pub fn collect_validator_network_data(&self) -> bool { + self.collect_validator_network_data } } diff --git a/bin/node/src/service.rs b/bin/node/src/service.rs index 54f1f01c3c..d4715bdf90 100644 --- a/bin/node/src/service.rs +++ b/bin/node/src/service.rs @@ -212,7 +212,7 @@ fn get_aleph_runtime_vars(client: &Arc) -> AlephRuntimeVars { fn get_validator_address_cache(aleph_config: &AlephCli) -> Option { aleph_config - .no_collection_of_extra_debugging_data() + .collect_validator_network_data() .then(ValidatorAddressCache::new) }