From 469661d217f5cbc7a88fbacf279ea3599687cd21 Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Tue, 20 Jun 2023 20:50:16 +0000 Subject: [PATCH] removes outdated tvu_forward socket (#32101) Shreds are no longer sent to tvu_forward socket. --- core/benches/retransmit_stage.rs | 3 - .../broadcast_fake_shreds_run.rs | 2 +- core/src/serve_repair.rs | 2 - core/src/shred_fetch_stage.rs | 16 --- core/src/tvu.rs | 6 - core/src/validator.rs | 1 - dos/src/cli.rs | 1 - dos/src/main.rs | 1 - gossip/src/cluster_info.rs | 112 +----------------- gossip/src/contact_info.rs | 11 -- gossip/src/legacy_contact_info.rs | 3 +- gossip/tests/gossip.rs | 2 +- validator/src/admin_rpc_service.rs | 2 +- validator/src/bootstrap.rs | 3 - validator/src/main.rs | 1 - 15 files changed, 8 insertions(+), 158 deletions(-) diff --git a/core/benches/retransmit_stage.rs b/core/benches/retransmit_stage.rs index f066575186..228d9dcbdb 100644 --- a/core/benches/retransmit_stage.rs +++ b/core/benches/retransmit_stage.rs @@ -62,9 +62,6 @@ fn bench_retransmitter(bencher: &mut Bencher) { let mut contact_info = ContactInfo::new_localhost(&id, timestamp()); let port = socket.local_addr().unwrap().port(); contact_info.set_tvu((Ipv4Addr::LOCALHOST, port)).unwrap(); - contact_info - .set_tvu_forwards(contact_info.tvu(Protocol::UDP).unwrap()) - .unwrap(); info!("local: {:?}", contact_info.tvu(Protocol::UDP).unwrap()); cluster_info.insert_info(contact_info); socket.set_nonblocking(true).unwrap(); diff --git a/core/src/broadcast_stage/broadcast_fake_shreds_run.rs b/core/src/broadcast_stage/broadcast_fake_shreds_run.rs index 01650aad32..4269e01866 100644 --- a/core/src/broadcast_stage/broadcast_fake_shreds_run.rs +++ b/core/src/broadcast_stage/broadcast_fake_shreds_run.rs @@ -139,7 +139,7 @@ impl BroadcastRun for BroadcastFakeShredsRun { peers.iter().enumerate().for_each(|(i, peer)| { if fake == (i <= self.partition) { // Send fake shreds to the first N peers - if let Ok(addr) = peer.tvu_forwards() { + if let Ok(addr) = peer.tvu(Protocol::UDP) { data_shreds.iter().for_each(|b| { sock.send_to(b.payload(), addr).unwrap(); }); diff --git a/core/src/serve_repair.rs b/core/src/serve_repair.rs index 0db791f3f7..8afc55db77 100644 --- a/core/src/serve_repair.rs +++ b/core/src/serve_repair.rs @@ -1929,7 +1929,6 @@ mod tests { ); nxt.set_gossip((Ipv4Addr::LOCALHOST, 1234)).unwrap(); nxt.set_tvu((Ipv4Addr::LOCALHOST, 1235)).unwrap(); - nxt.set_tvu_forwards((Ipv4Addr::LOCALHOST, 1236)).unwrap(); nxt.set_repair((Ipv4Addr::LOCALHOST, 1237)).unwrap(); nxt.set_tpu((Ipv4Addr::LOCALHOST, 1238)).unwrap(); nxt.set_tpu_forwards((Ipv4Addr::LOCALHOST, 1239)).unwrap(); @@ -1960,7 +1959,6 @@ mod tests { ); nxt.set_gossip((Ipv4Addr::LOCALHOST, 1234)).unwrap(); nxt.set_tvu((Ipv4Addr::LOCALHOST, 1235)).unwrap(); - nxt.set_tvu_forwards((Ipv4Addr::LOCALHOST, 1236)).unwrap(); nxt.set_repair((Ipv4Addr::LOCALHOST, 1237)).unwrap(); nxt.set_tpu((Ipv4Addr::LOCALHOST, 1238)).unwrap(); nxt.set_tpu_forwards((Ipv4Addr::LOCALHOST, 1239)).unwrap(); diff --git a/core/src/shred_fetch_stage.rs b/core/src/shred_fetch_stage.rs index f0e01d5dfa..2b22c7493d 100644 --- a/core/src/shred_fetch_stage.rs +++ b/core/src/shred_fetch_stage.rs @@ -171,7 +171,6 @@ impl ShredFetchStage { pub(crate) fn new( sockets: Vec>, quic_socket: UdpSocket, - forward_sockets: Vec>, repair_socket: Arc, sender: Sender, shred_version: u16, @@ -196,19 +195,6 @@ impl ShredFetchStage { turbine_disabled.clone(), ); - let (tvu_forwards_threads, fwd_thread_hdl) = Self::packet_modifier( - forward_sockets, - exit.clone(), - sender.clone(), - recycler.clone(), - bank_forks.clone(), - shred_version, - "shred_fetch_tvu_forwards", - PacketFlags::FORWARDED, - None, // repair_context - turbine_disabled.clone(), - ); - let (repair_receiver, repair_handler) = Self::packet_modifier( vec![repair_socket.clone()], exit.clone(), @@ -222,10 +208,8 @@ impl ShredFetchStage { turbine_disabled.clone(), ); - tvu_threads.extend(tvu_forwards_threads.into_iter()); tvu_threads.extend(repair_receiver.into_iter()); tvu_threads.push(tvu_filter); - tvu_threads.push(fwd_thread_hdl); tvu_threads.push(repair_handler); let keypair = cluster_info.keypair().clone(); diff --git a/core/src/tvu.rs b/core/src/tvu.rs index 55cac180b6..6a73e7680c 100644 --- a/core/src/tvu.rs +++ b/core/src/tvu.rs @@ -80,7 +80,6 @@ pub struct TvuSockets { pub(crate) fetch_quic: UdpSocket, pub repair: UdpSocket, pub retransmit: Vec, - pub forwards: Vec, pub ancestor_hashes_requests: UdpSocket, } @@ -149,7 +148,6 @@ impl Tvu { fetch: fetch_sockets, fetch_quic: fetch_quic_socket, retransmit: retransmit_sockets, - forwards: tvu_forward_sockets, ancestor_hashes_requests: ancestor_hashes_socket, } = sockets; @@ -158,12 +156,9 @@ impl Tvu { let repair_socket = Arc::new(repair_socket); let ancestor_hashes_socket = Arc::new(ancestor_hashes_socket); let fetch_sockets: Vec> = fetch_sockets.into_iter().map(Arc::new).collect(); - let forward_sockets: Vec> = - tvu_forward_sockets.into_iter().map(Arc::new).collect(); let fetch_stage = ShredFetchStage::new( fetch_sockets, fetch_quic_socket, - forward_sockets, repair_socket.clone(), fetch_sender, tvu_config.shred_version, @@ -463,7 +458,6 @@ pub mod tests { retransmit: target1.sockets.retransmit_sockets, fetch: target1.sockets.tvu, fetch_quic: target1.sockets.tvu_quic, - forwards: target1.sockets.tvu_forwards, ancestor_hashes_requests: target1.sockets.ancestor_hashes_requests, } }, diff --git a/core/src/validator.rs b/core/src/validator.rs index 61a0b87405..e7c739b65d 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -1135,7 +1135,6 @@ impl Validator { retransmit: node.sockets.retransmit_sockets, fetch: node.sockets.tvu, fetch_quic: node.sockets.tvu_quic, - forwards: node.sockets.tvu_forwards, ancestor_hashes_requests: node.sockets.ancestor_hashes_requests, }, blockstore.clone(), diff --git a/dos/src/cli.rs b/dos/src/cli.rs index 9e82c3f06e..eb87fcd526 100644 --- a/dos/src/cli.rs +++ b/dos/src/cli.rs @@ -117,7 +117,6 @@ pub struct TransactionParams { pub enum Mode { Gossip, Tvu, - TvuForwards, Tpu, TpuForwards, Repair, diff --git a/dos/src/main.rs b/dos/src/main.rs index e0b4331125..ec16bc3188 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -444,7 +444,6 @@ fn get_target( target = match mode { Mode::Gossip => Some((*node.pubkey(), node.gossip().unwrap())), Mode::Tvu => Some((*node.pubkey(), node.tvu(Protocol::UDP).unwrap())), - Mode::TvuForwards => Some((*node.pubkey(), node.tvu_forwards().unwrap())), Mode::Tpu => Some((*node.pubkey(), node.tpu(protocol).unwrap())), Mode::TpuForwards => { Some((*node.pubkey(), node.tpu_forwards(protocol).unwrap())) diff --git a/gossip/src/cluster_info.rs b/gossip/src/cluster_info.rs index 620d1f7d19..7a680cd96b 100644 --- a/gossip/src/cluster_info.rs +++ b/gossip/src/cluster_info.rs @@ -826,7 +826,7 @@ impl ClusterInfo { } let ip_addr = node.gossip().as_ref().map(SocketAddr::ip).ok(); Some(format!( - "{:15} {:2}| {:5} | {:44} |{:^9}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {}\n", + "{:15} {:2}| {:5} | {:44} |{:^9}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {}\n", node.gossip() .ok() .filter(|addr| self.socket_addr_space.check(addr)) @@ -848,7 +848,6 @@ impl ClusterInfo { self.addr_to_string(&ip_addr, &node.tpu(contact_info::Protocol::UDP).ok()), self.addr_to_string(&ip_addr, &node.tpu_forwards(contact_info::Protocol::UDP).ok()), self.addr_to_string(&ip_addr, &node.tvu(contact_info::Protocol::UDP).ok()), - self.addr_to_string(&ip_addr, &node.tvu_forwards().ok()), self.addr_to_string(&ip_addr, &node.repair().ok()), self.addr_to_string(&ip_addr, &node.serve_repair().ok()), node.shred_version(), @@ -859,9 +858,9 @@ impl ClusterInfo { format!( "IP Address |Age(ms)| Node identifier \ - | Version |Gossip|TPUvote| TPU |TPUfwd| TVU |TVUfwd|Repair|ServeR|ShredVer\n\ - ------------------+-------+----------------------------------------------\ - +---------+------+-------+------+------+------+------+------+------+--------\n\ + | Version |Gossip|TPUvote| TPU |TPUfwd| TVU |Repair|ServeR|ShredVer\n\ + ------------------+-------+---------------------------------------\ + +---------+------+-------+------+------+------+------+------+--------\n\ {}\ Nodes: {}{}{}", nodes.join(""), @@ -2798,7 +2797,6 @@ pub struct Sockets { pub gossip: UdpSocket, pub ip_echo: Option, pub tvu: Vec, - pub tvu_forwards: Vec, pub tvu_quic: UdpSocket, pub tpu: Vec, pub tpu_forwards: Vec, @@ -2836,7 +2834,6 @@ impl Node { let gossip_addr = SocketAddr::new(localhost_ip_addr, gossip_port); let ((_tvu_port, tvu), (_tvu_quic_port, tvu_quic)) = bind_two_in_range_with_offset(localhost_ip_addr, port_range, QUIC_PORT_OFFSET).unwrap(); - let tvu_forwards = UdpSocket::bind(&localhost_bind_addr).unwrap(); let ((_tpu_forwards_port, tpu_forwards), (_tpu_forwards_quic_port, tpu_forwards_quic)) = bind_two_in_range_with_offset(localhost_ip_addr, port_range, QUIC_PORT_OFFSET).unwrap(); let tpu_vote = UdpSocket::bind(&localhost_bind_addr).unwrap(); @@ -2865,11 +2862,6 @@ impl Node { } set_socket!(set_gossip, gossip_addr, "gossip"); set_socket!(set_tvu, tvu.local_addr().unwrap(), "TVU"); - set_socket!( - set_tvu_forwards, - tvu_forwards.local_addr().unwrap(), - "TVU-forwards" - ); set_socket!(set_repair, repair.local_addr().unwrap(), "repair"); set_socket!(set_tpu, tpu.local_addr().unwrap(), "TPU"); set_socket!( @@ -2891,7 +2883,6 @@ impl Node { gossip, ip_echo: Some(ip_echo), tvu: vec![tvu], - tvu_forwards: vec![tvu_forwards], tvu_quic, tpu: vec![tpu], tpu_forwards: vec![tpu_forwards], @@ -2937,7 +2928,6 @@ impl Node { Self::get_gossip_port(gossip_addr, port_range, bind_ip_addr); let ((tvu_port, tvu), (_tvu_quic_port, tvu_quic)) = bind_two_in_range_with_offset(bind_ip_addr, port_range, QUIC_PORT_OFFSET).unwrap(); - let (tvu_forwards_port, tvu_forwards) = Self::bind(bind_ip_addr, port_range); let ((tpu_port, tpu), (_tpu_quic_port, tpu_quic)) = bind_two_in_range_with_offset(bind_ip_addr, port_range, QUIC_PORT_OFFSET).unwrap(); let ((tpu_forwards_port, tpu_forwards), (_tpu_forwards_quic_port, tpu_forwards_quic)) = @@ -2968,7 +2958,6 @@ impl Node { } set_socket!(set_gossip, gossip_port, "gossip"); set_socket!(set_tvu, tvu_port, "TVU"); - set_socket!(set_tvu_forwards, tvu_forwards_port, "TVU-forwards"); set_socket!(set_repair, repair_port, "repair"); set_socket!(set_tpu, tpu_port, "TPU"); set_socket!(set_tpu_forwards, tpu_forwards_port, "TPU-forwards"); @@ -2984,7 +2973,6 @@ impl Node { gossip, ip_echo: Some(ip_echo), tvu: vec![tvu], - tvu_forwards: vec![tvu_forwards], tvu_quic, tpu: vec![tpu], tpu_forwards: vec![tpu_forwards], @@ -3017,9 +3005,6 @@ impl Node { bind_ip_addr, (tvu_port + QUIC_PORT_OFFSET, tvu_port + QUIC_PORT_OFFSET + 1), ); - let (tvu_forwards_port, tvu_forwards_sockets) = - multi_bind_in_range(bind_ip_addr, port_range, 8).expect("tvu_forwards multi_bind"); - let (tpu_port, tpu_sockets) = multi_bind_in_range(bind_ip_addr, port_range, 32).expect("tpu multi_bind"); @@ -3061,7 +3046,6 @@ impl Node { let addr = gossip_addr.ip(); let _ = info.set_gossip((addr, gossip_port)); let _ = info.set_tvu((addr, tvu_port)); - let _ = info.set_tvu_forwards((addr, tvu_forwards_port)); let _ = info.set_repair((addr, repair_port)); let _ = info.set_tpu(public_tpu_addr.unwrap_or_else(|| SocketAddr::new(addr, tpu_port))); let _ = info.set_tpu_forwards( @@ -3076,7 +3060,6 @@ impl Node { sockets: Sockets { gossip, tvu: tvu_sockets, - tvu_forwards: tvu_forwards_sockets, tvu_quic, tpu: tpu_sockets, tpu_forwards: tpu_forwards_sockets, @@ -3193,7 +3176,6 @@ mod tests { duplicate_shred::{self, tests::new_rand_shred, MAX_DUPLICATE_SHREDS}, }, itertools::izip, - regex::Regex, solana_ledger::shred::Shredder, solana_net_utils::MINIMUM_VALIDATOR_PORT_RANGE_WIDTH, solana_sdk::signature::{Keypair, Signer}, @@ -3224,92 +3206,6 @@ mod tests { )); } - #[test] - fn test_cluster_info_trace() { - solana_logger::setup(); - let keypair = Keypair::from_base58_string("3jATNWfbii1btv6nCpToAXAJz6a4km5HsLSWiwLfNvHNQAmvksLFVAKGUz286bXb9N4ivXx8nuwkn91PFDTyoFEp"); - - let node = { - let tpu = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8900); - let _tpu_quic = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8901); - - let gossip = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8888); - let tvu = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8902); - let tvu_forwards = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8903); - let tpu_forwards = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8904); - - let tpu_vote = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8906); - let repair = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8907); - let rpc = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8908); - let rpc_pubsub = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8909); - - let serve_repair = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 8910); - - let mut info = ContactInfo::new( - keypair.pubkey(), - timestamp(), // wallclock - 0u16, // shred_version - ); - info.set_gossip(gossip).unwrap(); - info.set_tvu(tvu).unwrap(); - info.set_tvu_forwards(tvu_forwards).unwrap(); - info.set_repair(repair).unwrap(); - info.set_tpu(tpu).unwrap(); - info.set_tpu_forwards(tpu_forwards).unwrap(); - info.set_tpu_vote(tpu_vote).unwrap(); - info.set_rpc(rpc).unwrap(); - info.set_rpc_pubsub(rpc_pubsub).unwrap(); - info.set_serve_repair(serve_repair).unwrap(); - Node { - info, - sockets: Sockets { - gossip: UdpSocket::bind("0.0.0.0:0").unwrap(), - ip_echo: None, - tvu: vec![], - tvu_forwards: vec![], - tvu_quic: UdpSocket::bind("0.0.0.0:0").unwrap(), - tpu: vec![], - tpu_forwards: vec![], - tpu_vote: vec![], - broadcast: vec![], - repair: UdpSocket::bind("0.0.0.0:0").unwrap(), - retransmit_sockets: vec![], - serve_repair: UdpSocket::bind("0.0.0.0:0").unwrap(), - ancestor_hashes_requests: UdpSocket::bind("0.0.0.0:0").unwrap(), - tpu_quic: UdpSocket::bind("0.0.0.0:0").unwrap(), - tpu_forwards_quic: UdpSocket::bind("0.0.0.0:0").unwrap(), - }, - } - }; - - let cluster_info = Arc::new(ClusterInfo::new( - node.info, - Arc::new(keypair), - SocketAddrSpace::Unspecified, - )); - - let golden = r#" -IP Address |Age(ms)| Node identifier | Version |Gossip|TPUvote| TPU |TPUfwd| TVU |TVUfwd|Repair|ServeR|ShredVer -------------------+-------+----------------------------------------------+---------+------+-------+------+------+------+------+------+------+-------- -127.0.0.1 me| \d | 7fGBVaezz2YrTxAkwvLjBZpxrGEfNsd14Jxw9W5Df5zY | - | 8888 | 8906 | 8900 | 8904 | 8902 | 8903 | 8907 | 8910 | 0 -Nodes: 1 - -RPC Address |Age(ms)| Node identifier | Version | RPC |PubSub|ShredVer -------------------+-------+----------------------------------------------+---------+------+------+-------- -127.0.0.1 me| \d | 7fGBVaezz2YrTxAkwvLjBZpxrGEfNsd14Jxw9W5Df5zY | - | 8908 | 8909 | 0 -RPC Enabled Nodes: 1"#; - - let re = Regex::new(golden).unwrap(); - - let output = format!( - "\n{}\n\n{}", - cluster_info.contact_info_trace(), - cluster_info.rpc_info_trace() - ); - - assert!(re.is_match(&output)); - } - #[test] fn test_handle_pull() { solana_logger::setup(); diff --git a/gossip/src/contact_info.rs b/gossip/src/contact_info.rs index 7c64d77b1f..42a079ab10 100644 --- a/gossip/src/contact_info.rs +++ b/gossip/src/contact_info.rs @@ -36,7 +36,6 @@ const SOCKET_TAG_TPU_FORWARDS_QUIC: u8 = 7; const SOCKET_TAG_TPU_QUIC: u8 = 8; const SOCKET_TAG_TPU_VOTE: u8 = 9; const SOCKET_TAG_TVU: u8 = 10; -const SOCKET_TAG_TVU_FORWARDS: u8 = 11; const SOCKET_TAG_TVU_QUIC: u8 = 12; const_assert_eq!(SOCKET_CACHE_SIZE, 13); const SOCKET_CACHE_SIZE: usize = SOCKET_TAG_TVU_QUIC as usize + 1usize; @@ -228,7 +227,6 @@ impl ContactInfo { ); get_socket!(tpu_vote, SOCKET_TAG_TPU_VOTE); get_socket!(tvu, SOCKET_TAG_TVU, SOCKET_TAG_TVU_QUIC); - get_socket!(tvu_forwards, SOCKET_TAG_TVU_FORWARDS); set_socket!(set_gossip, SOCKET_TAG_GOSSIP); set_socket!(set_repair, SOCKET_TAG_REPAIR); @@ -243,7 +241,6 @@ impl ContactInfo { ); set_socket!(set_tpu_vote, SOCKET_TAG_TPU_VOTE); set_socket!(set_tvu, SOCKET_TAG_TVU, SOCKET_TAG_TVU_QUIC); - set_socket!(set_tvu_forwards, SOCKET_TAG_TVU_FORWARDS); remove_socket!(remove_serve_repair, SOCKET_TAG_SERVE_REPAIR); remove_socket!(remove_tpu, SOCKET_TAG_TPU, SOCKET_TAG_TPU_QUIC); @@ -253,7 +250,6 @@ impl ContactInfo { SOCKET_TAG_TPU_FORWARDS_QUIC ); remove_socket!(remove_tvu, SOCKET_TAG_TVU, SOCKET_TAG_TVU_QUIC); - remove_socket!(remove_tvu_forwards, SOCKET_TAG_TVU_FORWARDS); #[cfg(test)] fn get_socket(&self, key: u8) -> Result { @@ -359,7 +355,6 @@ impl ContactInfo { let mut node = Self::new(*pubkey, wallclock, /*shred_version:*/ 0u16); node.set_gossip((Ipv4Addr::LOCALHOST, 8000)).unwrap(); node.set_tvu((Ipv4Addr::LOCALHOST, 8001)).unwrap(); - node.set_tvu_forwards((Ipv4Addr::LOCALHOST, 8002)).unwrap(); node.set_repair((Ipv4Addr::LOCALHOST, 8007)).unwrap(); node.set_tpu((Ipv4Addr::LOCALHOST, 8003)).unwrap(); // quic: 8009 node.set_tpu_forwards((Ipv4Addr::LOCALHOST, 8004)).unwrap(); // quic: 8010 @@ -383,7 +378,6 @@ impl ContactInfo { let (addr, port) = (socket.ip(), socket.port()); node.set_gossip((addr, port + 1)).unwrap(); node.set_tvu((addr, port + 2)).unwrap(); - node.set_tvu_forwards((addr, port + 3)).unwrap(); node.set_repair((addr, port + 4)).unwrap(); node.set_tpu((addr, port)).unwrap(); // quic: port + 6 node.set_tpu_forwards((addr, port + 5)).unwrap(); // quic: port + 11 @@ -747,10 +741,6 @@ mod tests { node.tvu(Protocol::QUIC).ok().as_ref(), sockets.get(&SOCKET_TAG_TVU_QUIC) ); - assert_eq!( - node.tvu_forwards().ok().as_ref(), - sockets.get(&SOCKET_TAG_TVU_FORWARDS) - ); // Assert that all IP addresses are unique. assert_eq!( node.addrs.len(), @@ -841,7 +831,6 @@ mod tests { old.tvu(Protocol::UDP).unwrap(), node.tvu(Protocol::UDP).unwrap() ); - assert_eq!(old.tvu_forwards().unwrap(), node.tvu_forwards().unwrap()); } #[test] diff --git a/gossip/src/legacy_contact_info.rs b/gossip/src/legacy_contact_info.rs index 7f4e5eba78..22fedc50b5 100644 --- a/gossip/src/legacy_contact_info.rs +++ b/gossip/src/legacy_contact_info.rs @@ -196,7 +196,6 @@ impl LegacyContactInfo { get_socket!(gossip); get_socket!(@quic tvu); - get_socket!(tvu_forwards); get_socket!(repair); get_socket!(@quic tpu); get_socket!(@quic tpu_forwards); @@ -264,7 +263,7 @@ impl TryFrom<&ContactInfo> for LegacyContactInfo { id: *node.pubkey(), gossip: unwrap_socket!(gossip), tvu: unwrap_socket!(tvu, Protocol::UDP), - tvu_forwards: unwrap_socket!(tvu_forwards), + tvu_forwards: SOCKET_ADDR_UNSPECIFIED, repair: unwrap_socket!(repair), tpu: unwrap_socket!(tpu, Protocol::UDP), tpu_forwards: unwrap_socket!(tpu_forwards, Protocol::UDP), diff --git a/gossip/tests/gossip.rs b/gossip/tests/gossip.rs index ac9acd20f6..a1232b916b 100644 --- a/gossip/tests/gossip.rs +++ b/gossip/tests/gossip.rs @@ -130,7 +130,7 @@ fn retransmit_to( let dests: Vec<_> = if forwarded { peers .iter() - .filter_map(|peer| peer.tvu_forwards().ok()) + .filter_map(|peer| peer.tvu(Protocol::UDP).ok()) .filter(|addr| socket_addr_space.check(addr)) .collect() } else { diff --git a/validator/src/admin_rpc_service.rs b/validator/src/admin_rpc_service.rs index 76b156b59e..f40bc01ffe 100644 --- a/validator/src/admin_rpc_service.rs +++ b/validator/src/admin_rpc_service.rs @@ -102,7 +102,7 @@ impl From for AdminRpcContactInfo { last_updated_timestamp: node.wallclock(), gossip: unwrap_socket!(gossip), tvu: unwrap_socket!(tvu, Protocol::UDP), - tvu_forwards: unwrap_socket!(tvu_forwards), + tvu_forwards: SOCKET_ADDR_UNSPECIFIED, repair: unwrap_socket!(repair), tpu: unwrap_socket!(tpu, Protocol::UDP), tpu_forwards: unwrap_socket!(tpu_forwards, Protocol::UDP), diff --git a/validator/src/bootstrap.rs b/validator/src/bootstrap.rs index 5c7b21ffc6..b9fc101a0c 100644 --- a/validator/src/bootstrap.rs +++ b/validator/src/bootstrap.rs @@ -100,9 +100,6 @@ fn verify_reachable_ports( udp_sockets.extend(node.sockets.broadcast.iter()); udp_sockets.extend(node.sockets.retransmit_sockets.iter()); } - if verify_address(&node.info.tvu_forwards().ok()) { - udp_sockets.extend(node.sockets.tvu_forwards.iter()); - } let mut tcp_listeners = vec![]; if let Some((rpc_addr, rpc_pubsub_addr)) = validator_config.rpc_addrs { diff --git a/validator/src/main.rs b/validator/src/main.rs index e9f68d0be8..bdb609627d 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1763,7 +1763,6 @@ pub fn main() { node.info.remove_tpu(); node.info.remove_tpu_forwards(); node.info.remove_tvu(); - node.info.remove_tvu_forwards(); node.info.remove_serve_repair(); // A node in this configuration shouldn't be an entrypoint to other nodes