using quinn library
streamer: Sign TLS cert with validator identity key
Handle multiple incoming chunks
(cherry picked from commit 5a230f418d
)
Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
@ -26,6 +26,7 @@ use {
|
||||
cost_model::CostModel,
|
||||
vote_sender_types::{ReplayVoteReceiver, ReplayVoteSender},
|
||||
},
|
||||
solana_sdk::signature::Keypair,
|
||||
std::{
|
||||
net::UdpSocket,
|
||||
sync::{
|
||||
@ -46,6 +47,7 @@ pub struct Tpu {
|
||||
banking_stage: BankingStage,
|
||||
cluster_info_vote_listener: ClusterInfoVoteListener,
|
||||
broadcast_stage: BroadcastStage,
|
||||
tpu_quic_t: thread::JoinHandle<()>,
|
||||
}
|
||||
|
||||
impl Tpu {
|
||||
@ -59,6 +61,7 @@ impl Tpu {
|
||||
tpu_forwards_sockets: Vec<UdpSocket>,
|
||||
tpu_vote_sockets: Vec<UdpSocket>,
|
||||
broadcast_sockets: Vec<UdpSocket>,
|
||||
transactions_quic_socket: UdpSocket,
|
||||
subscriptions: &Arc<RpcSubscriptions>,
|
||||
transaction_status_sender: Option<TransactionStatusSender>,
|
||||
blockstore: &Arc<Blockstore>,
|
||||
@ -75,6 +78,7 @@ impl Tpu {
|
||||
tpu_coalesce_ms: u64,
|
||||
cluster_confirmed_slot_sender: GossipDuplicateConfirmedSlotsSender,
|
||||
cost_model: &Arc<RwLock<CostModel>>,
|
||||
keypair: &Keypair,
|
||||
) -> Self {
|
||||
let (packet_sender, packet_receiver) = channel();
|
||||
let (vote_packet_sender, vote_packet_receiver) = channel();
|
||||
@ -90,6 +94,15 @@ impl Tpu {
|
||||
);
|
||||
let (verified_sender, verified_receiver) = unbounded();
|
||||
|
||||
let tpu_quic_t = solana_streamer::quic::spawn_server(
|
||||
transactions_quic_socket,
|
||||
keypair,
|
||||
cluster_info.my_contact_info().tpu.ip(),
|
||||
packet_sender,
|
||||
exit.clone(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let sigverify_stage = {
|
||||
let verifier = TransactionSigVerifier::default();
|
||||
SigVerifyStage::new(packet_receiver, verified_sender, verifier)
|
||||
@ -153,6 +166,7 @@ impl Tpu {
|
||||
banking_stage,
|
||||
cluster_info_vote_listener,
|
||||
broadcast_stage,
|
||||
tpu_quic_t,
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,6 +178,7 @@ impl Tpu {
|
||||
self.cluster_info_vote_listener.join(),
|
||||
self.banking_stage.join(),
|
||||
];
|
||||
self.tpu_quic_t.join()?;
|
||||
let broadcast_result = self.broadcast_stage.join();
|
||||
for result in results {
|
||||
result?;
|
||||
|
@ -539,8 +539,11 @@ impl Validator {
|
||||
}
|
||||
}
|
||||
|
||||
let mut cluster_info =
|
||||
ClusterInfo::new(node.info.clone(), identity_keypair, socket_addr_space);
|
||||
let mut cluster_info = ClusterInfo::new(
|
||||
node.info.clone(),
|
||||
identity_keypair.clone(),
|
||||
socket_addr_space,
|
||||
);
|
||||
cluster_info.set_contact_debug_interval(config.contact_debug_interval);
|
||||
cluster_info.set_entrypoints(cluster_entrypoints);
|
||||
cluster_info.restore_contact_info(ledger_path, config.contact_save_interval);
|
||||
@ -904,6 +907,7 @@ impl Validator {
|
||||
node.sockets.tpu_forwards,
|
||||
node.sockets.tpu_vote,
|
||||
node.sockets.broadcast,
|
||||
node.sockets.tpu_quic,
|
||||
&rpc_subscriptions,
|
||||
transaction_status_sender,
|
||||
&blockstore,
|
||||
@ -920,6 +924,7 @@ impl Validator {
|
||||
config.tpu_coalesce_ms,
|
||||
cluster_confirmed_slot_sender,
|
||||
&cost_model,
|
||||
&identity_keypair,
|
||||
);
|
||||
|
||||
datapoint_info!("validator-new", ("id", id.to_string(), String));
|
||||
|
Reference in New Issue
Block a user