Skip to content

Commit da92715

Browse files
authored
Revert "Gossip: add back in staked node ping bypass (#10154)" (#10319)
This reverts commit cbb591b.
1 parent b8cfdee commit da92715

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

gossip/src/cluster_info.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ pub const DEFAULT_NUM_TVU_RECEIVE_SOCKETS: NonZeroUsize = MINIMUM_NUM_TVU_RECEIV
136136
pub const MINIMUM_NUM_TVU_RETRANSMIT_SOCKETS: NonZeroUsize = NonZeroUsize::new(1).unwrap();
137137
pub const DEFAULT_NUM_TVU_RETRANSMIT_SOCKETS: NonZeroUsize = NonZeroUsize::new(12).unwrap();
138138

139-
/// Minimum stake required for a node to bypass the initial ping check when joining gossip.
140-
pub(crate) const MIN_STAKE_TO_SKIP_PING: u64 = 10_000 * solana_native_token::LAMPORTS_PER_SOL;
141-
142139
#[derive(Debug, PartialEq, Eq, Error)]
143140
pub enum ClusterInfoError {
144141
#[error("NoPeers")]
@@ -2019,7 +2016,6 @@ impl ClusterInfo {
20192016
&mut rng,
20202017
&self_keypair,
20212018
value,
2022-
stakes,
20232019
&self.socket_addr_space,
20242020
&self.ping_cache,
20252021
&mut pings,
@@ -2500,19 +2496,14 @@ fn verify_gossip_addr<R: Rng + CryptoRng>(
25002496
rng: &mut R,
25012497
keypair: &Keypair,
25022498
value: &CrdsValue,
2503-
stakes: &HashMap<Pubkey, u64>,
25042499
socket_addr_space: &SocketAddrSpace,
25052500
ping_cache: &Mutex<PingCache>,
25062501
pings: &mut Vec<(SocketAddr, Ping)>,
25072502
) -> bool {
2508-
let (pubkey, addr) = match value.data() {
2509-
CrdsData::ContactInfo(node) => (node.pubkey(), node.gossip()),
2503+
let addr = match value.data() {
2504+
CrdsData::ContactInfo(node) => node.gossip(),
25102505
_ => return true, // If not a contact-info, nothing to verify.
25112506
};
2512-
// For (sufficiently) staked nodes, don't bother with ping/pong.
2513-
if stakes.get(pubkey).copied() >= Some(MIN_STAKE_TO_SKIP_PING) {
2514-
return true;
2515-
}
25162507
// Invalid addresses are not verifiable.
25172508
let Some(addr) = addr.filter(|addr| socket_addr_space.check(addr)) else {
25182509
return false;

0 commit comments

Comments
 (0)