diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index e1414afde..a9a0c0555 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -2922,18 +2922,24 @@ fn filter_on_shred_version( ) -> Option { let filter_values = |from: &Pubkey, values: &mut Vec, skipped_counter: &Counter| { let num_values = values.len(); + // Node-instances are always exempted from shred-version check so that: + // * their propagation across cluster is expedited. + // * prevent two running instances of the same identity key cross + // contaminate gossip between clusters. if crds.get_shred_version(from) == Some(self_shred_version) { - // Retain values with the same shred-vesion, or those which are - // contact-info so that shred-versions can be updated. values.retain(|value| match &value.data { + // Allow contact-infos so that shred-versions are updated. CrdsData::ContactInfo(_) => true, + CrdsData::NodeInstance(_) => true, + // Only retain values with the same shred version. _ => crds.get_shred_version(&value.pubkey()) == Some(self_shred_version), }) } else { - // Only allow node to update its own contact info in case their - // shred-version changes. values.retain(|value| match &value.data { + // Allow node to update its own contact info in case their + // shred-version changes CrdsData::ContactInfo(node) => node.id == *from, + CrdsData::NodeInstance(_) => true, _ => false, }) }