Skip to content
Snippets Groups Projects
Unverified Commit 98bd626b authored by Michael Müller's avatar Michael Müller
Browse files

Do not send unfinalized authority sets to telemetry

`update_authority_set()` is called from, among others,
import side. These updates only track a pending change
and may or may not happen, hence it's wrong to send
this set to telemetry (which would assume that this is
the current, finalized authority set).
parent 48e36ffe
Branches
No related merge requests found
......@@ -25,7 +25,6 @@ use fork_tree::ForkTree;
use grandpa::round::State as RoundState;
use sr_primitives::traits::{Block as BlockT, NumberFor};
use log::{info, warn};
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
use fg_primitives::{AuthorityId, AuthorityWeight, SetId, RoundNumber};
use crate::authorities::{AuthoritySet, SharedAuthoritySet, PendingChange, DelayKind};
......@@ -376,17 +375,6 @@ pub(crate) fn update_authority_set<Block: BlockT, F, R>(
let encoded_set = set.encode();
if let Some(new_set) = new_set {
telemetry!(CONSENSUS_INFO; "afg.authority_set";
"hash" => ?new_set.canon_hash,
"number" => ?new_set.canon_number,
"authority_set_id" => ?new_set.set_id,
"authorities" => {
let authorities: Vec<String> =
new_set.authorities.iter().map(|(id, _)| format!("{}", id)).collect();
format!("{:?}", authorities)
}
);
// we also overwrite the "last completed round" entry with a blank slate
// because from the perspective of the finality gadget, the chain has
// reset.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment