From ba0a49b436a68b3e6a9e21d17cff5a9310a2fae8 Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Wed, 15 Nov 2023 19:02:21 +0000 Subject: [PATCH] propagates the new contact-info through gossip (#34092) Working towards migrating from legacy contact-info to the new contact-info: https://github.com/solana-labs/solana/pull/29596 --- gossip/src/crds_gossip_pull.rs | 7 +------ gossip/src/crds_gossip_push.rs | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/gossip/src/crds_gossip_pull.rs b/gossip/src/crds_gossip_pull.rs index c3044dbba..191406dd6 100644 --- a/gossip/src/crds_gossip_pull.rs +++ b/gossip/src/crds_gossip_pull.rs @@ -18,7 +18,7 @@ use { crds::{Crds, GossipRoute, VersionedCrdsValue}, crds_gossip, crds_gossip_error::CrdsGossipError, - crds_value::{CrdsData, CrdsValue}, + crds_value::CrdsValue, legacy_contact_info::LegacyContactInfo as ContactInfo, ping_pong::PingCache, }, @@ -488,11 +488,6 @@ impl CrdsGossipPull { let out: Vec<_> = crds .filter_bitmask(filter.mask, filter.mask_bits) .filter(pred) - .filter(|entry| { - // Exclude the new ContactInfo from the pull responses - // until the cluster has upgraded. - !matches!(&entry.value.data, CrdsData::ContactInfo(_)) - }) .map(|entry| entry.value.clone()) .take(output_size_limit.load(Ordering::Relaxed).max(0) as usize) .collect(); diff --git a/gossip/src/crds_gossip_push.rs b/gossip/src/crds_gossip_push.rs index 345c9eaf1..72ffc30a4 100644 --- a/gossip/src/crds_gossip_push.rs +++ b/gossip/src/crds_gossip_push.rs @@ -16,7 +16,7 @@ use { cluster_info::{Ping, CRDS_UNIQUE_PUBKEY_CAPACITY}, crds::{Crds, CrdsError, Cursor, GossipRoute}, crds_gossip, - crds_value::{CrdsData, CrdsValue}, + crds_value::CrdsValue, ping_pong::PingCache, push_active_set::PushActiveSet, received_cache::ReceivedCache, @@ -191,11 +191,6 @@ impl CrdsGossipPush { let crds = crds.read().unwrap(); let entries = crds .get_entries(crds_cursor.deref_mut()) - .filter(|entry| { - // Exclude the new ContactInfo from outgoing push messages - // until the cluster has upgraded. - !matches!(&entry.value.data, CrdsData::ContactInfo(_)) - }) .map(|entry| &entry.value) .filter(|value| wallclock_window.contains(&value.wallclock())); for value in entries {