Commit Graph

53 Commits

Author SHA1 Message Date
steviez 4753dcae71 Rename and uniquify QUIC thread names (#28)
When viewing in various tools such as gdb and perf, it is not easy to
distinguish which threads are serving which function (TPU or TPU FWD)
2024-03-09 13:23:06 -06:00
Lijun Wang 8fde8d26c7
don't sign X.509 certs (#34896)
This get rid of 3rd party components rcgen in the path of private key access to make the code more secure.
2024-01-28 16:17:46 -08:00
Pankaj Garg 904700cc56
Use EMA to compute QUIC streamer load for staked connections (#34586)
* Use EMA to compute QUIC streamer load for staked connections

* change min load to 25% of max load

* reduce max PPS from 500K to 250K

* update ema_function to account for missing intervals

* replace f64 math with u128

* track streams across all connections for a peer

* u128  -> u64

* replace ' as ' type conversion to from and try_from

* add counter for u64 overflow

* reset recent stream load on ema interval

* do not use same counter for unstaked connections from a peer IP
2024-01-11 10:05:38 -08:00
Lijun Wang 1a001751dd
add metrics on throttled streams (#34579) 2023-12-22 16:49:01 -08:00
ryleung-solana 132c910f81
Quic update identity (#33865)
Update the Quic transport layer keypair and identity when the Validator's identity keypair is updated
2023-12-08 14:53:19 +08:00
behzad nouri 868e086d75
upgrades quinn and rustls crates (#32499) 2023-07-14 17:30:57 +00:00
behzad nouri 5a80dc0d73
adds QUIC endpoint specific for turbine connections (#32294)
Working towards separating out turbine QUIC from TPU.
2023-07-03 18:57:18 +00:00
ryleung-solana 36222a44d7
Use QUIC Retry packets during handshake (#31802)
Have the Quic server send a Retry packet to verify client control of the source IP
2023-06-06 14:23:23 -07:00
behzad nouri f1ebc5b5c3
separates out quic streamer connection stats from different servers (#31797) 2023-05-25 16:54:24 +00:00
behzad nouri 34da001cda
passes through concrete QUIC connection errors up the call stack (#31168) 2023-04-12 19:53:25 +00:00
sakridge e575650d47
Add connection error metrics (#31049) 2023-04-05 16:40:31 +02:00
behzad nouri ff9a42a354
uses Duration type instead of untyped ..._ms: u64 (#30971) 2023-03-31 15:42:49 +00:00
ryleung-solana 721d8cb0ac
Add logging of the number of chunks handled by the quic server (#30954) 2023-03-31 01:51:32 +08:00
ryleung-solana 92189d82b4
Quic server log data rate (#30892)
* Add more statistics to better track incoming data rate to the Quic server
2023-03-28 15:33:40 +08:00
ryleung-solana 0ed9f62602
Quic server batching (#30330) 2023-03-16 21:50:57 +08:00
Pankaj Garg 164c929b27
Cleanup QUIC single signed client cert code (#29686) 2023-01-12 15:24:02 -08:00
Brennan Watt dbf97daa78
Increase wait for chunk timeout in QUIC tests (#29629) 2023-01-11 07:16:41 -08:00
Lijun Wang ecea802fe6
Bidirectional quic communication support (#29155)
* Support bi-directional quic communication, use the same endpoint for the quic server and client
This is needed for supporting using quic for repair

* Added comments on the bi-directional communication tests

* Removed some debug logs

* clippy issue
2022-12-09 10:59:43 -08:00
Haoran Yi 516d27bc42 saturating max_concurrent_uni_streams and receive_window instead of overflow 2022-11-16 15:39:21 -06:00
Lijun Wang f156bc12ca
Enforce stream receive timeout (#28513)
In the quic server handle_connection, when we timed out in receiving the chunks, we loop forever to wait for the chunk. If the client never provide another chunk, the server can hopelessly wait for that chunk and wasting server resources. Instead WAIT_FOR_CHUNK_TIMEOUT_MS is introduced to bound this to 10 seconds at maximum. The stream will be dropped if it times out.
2022-11-02 10:09:32 -07:00
Lijun Wang a8d5731e5b Give the quic client and server thread the names 2022-10-06 16:55:21 -07:00
Michael Vines 3f4731b37f Standardize thread names
Tenets:
1. Limit thread names to 15 characters
2. Prefix all Solana-controlled threads with "sol"
3. Use Camel case. It's more character dense than Snake or Kebab case
2022-08-20 07:49:39 -07:00
Lijun Wang ddd660e2d3
Different staked vs unstaked chunks_received (#27033)
* Different staked vs unstaked chunks_received

* Suppress a clippy warning
2022-08-09 17:39:14 -07:00
Pankaj Garg 3c15d26840
Refactor QUIC new connection handler function (#26855)
* Refactor QUIC new connection handler function

* cleanup setup_connection

* more cleanup
2022-08-05 11:24:07 -07:00
Richard Patel 048b9f670b
Set solana-tpu ALPN protocol ID (#26587) 2022-07-13 20:55:13 +02:00
Pankaj Garg 49a112ae74
Use pubkey of peer for active QUIC connection table (#26597)
* Use pubkey of peer for active QUIC connection table

* clippy

* update code
2022-07-13 09:59:01 -07:00
Pankaj Garg 14ee87d793
Move QUIC TLS certificate code in its own file (#26569) 2022-07-12 13:34:37 -07:00
Pankaj Garg ea7448c568
Use client certs in QUIC to get peer's stake (#26477)
* Use client certs in QUIC to get peer's stake

* fixes to cert processing

* integrate the code

* clippy

* more cleanup

* sort cargo deps

* test fixes

* info -> debug
2022-07-11 18:06:40 +00:00
ryleung-solana 4772a93109
Quic handshake timeout (#26306)
* Implement timeout for the quic client and server handshake
2022-07-11 14:10:12 +08:00
Pankaj Garg 94685e1222
Implement randomized pruning of QUIC connection from staked peers (#26299) 2022-06-30 17:56:15 -07:00
Pankaj Garg 71087ac94f
Use correct QUIC connection table for removing the entry (#26328)
* Use correct QUIC connection table for removing the entry

* fix test

* address review comments

* address comments
2022-06-30 10:21:53 -07:00
Pankaj Garg d5dbfb67fd
QUIC stream timeouts if no data is received (#26116) 2022-06-21 18:56:47 -07:00
Lijun Wang 61946a49c3
Weight concurrent streams by stake (#25993)
Weight concurrent streams by stake for staked nodes
Ported changes from #25056 after address merge conflicts and some refactoring
2022-06-21 12:06:44 -07:00
Jon Cinque 061dc5322a
streamer: Add nonblocking quic server (#25806) 2022-06-07 18:22:46 +02:00
Pankaj Garg 1c2ae470c5
Fix forwarding of transactions over QUIC (#25674)
* Spawn QUIC server to receive forwarded txs

* Update validator port range

* forward votes using UDP

* no forwarding from unstaked nodes

* forwarding stats in banking stage

* fix test builds

* fix lifetime of forward sender
2022-06-02 11:14:58 -07:00
behzad nouri 880684565c
limits read access into Packet data to Packet.meta.size (#25484)
Bytes past Packet.meta.size are not valid to read from.

The commit makes the buffer field private and instead provides two
methods:
* Packet::data() which returns an immutable reference to the underlying
  buffer up to Packet.meta.size. The rest of the buffer is not valid to
  read from.
* Packet::buffer_mut() which returns a mutable reference to the entirety
  of the underlying buffer to write into. The caller is responsible to
  update Packet.meta.size after writing to the buffer.
2022-05-25 16:52:54 +00:00
steviez ec7ca411dd
Make PacketBatch packets vector non-public (#25413)
Upcoming changes to PacketBatch to support variable sized packets will
modify the internals of PacketBatch. So, this change removes usage of
the internal packet struct and instead uses accessors (which are
currently just wrappers of Vector functions but will change down the
road).
2022-05-23 15:30:15 -05:00
behzad nouri c248fb3f51
renames Packet Meta::{,set_}addr methods to {,set_}socket_addr (#25478)
In order to distinguish between Meta.addr field which is an IpAddr and
the methods which refer to a SocketAddr.
2022-05-23 15:48:59 +00:00
sakridge a56ce8283a
quic: Fix prune_oldest table size calculation (#25431) 2022-05-22 00:06:05 +02:00
sakridge 5be138826b
Add sender stake to quic packets (#25054) 2022-05-07 16:45:03 +02:00
Pankaj Garg 0910d9a209
Increase worker thread limits in quic streamer runtime (#24751)
* Resurrect "Increase worker thread limits in quic streamer runtime (#24535)""

* Fix test_quic_server_block_multiple_connections

* remove sleep
2022-04-27 20:50:08 +00:00
Pankaj Garg ded6ac6696
Swap quic counters with 0 while reporting (#24754) 2022-04-27 20:17:40 +00:00
Justin Starry 2f62fb2031 Revert "Increase worker thread limits in quic streamer runtime (#24535)"
This reverts commit f244a2e141.
2022-04-28 00:46:42 +08:00
Pankaj Garg f244a2e141
Increase worker thread limits in quic streamer runtime (#24535)
* Increase worker thread limits in quic streamer runtime

* fix Cargo.lock

* fix test, and use a constant for controlling thread count
2022-04-26 21:25:02 +00:00
Pankaj Garg 564bd4b34b
Add more datapoints in QUIC streamer (#24611) 2022-04-25 10:12:11 -07:00
Pankaj Garg 5d0dcca1e7
Add some datapoints in quic for error conditions (#24489) 2022-04-19 13:05:02 -07:00
kirill lykov 5c7060eaeb
fix test compilation error (#24413) 2022-04-16 14:41:33 +02:00
sakridge d71986cecf
Separate staked and un-staked on quic tpu port (#24339) 2022-04-16 10:54:22 +02:00
sakridge 1b7d1f78de
Implement QUIC connection warmup service for future leaders (#24054)
* Increase connection timeouts

* Bump quic connection cache to 1024

* Use constant for quic connection timeout and add warm cache service

* Fixes to QUIC warmup service

* fix check failure

* fixes after rebase

* fix timeout test

Co-authored-by: Pankaj Garg <pankaj@solana.com>
2022-04-15 12:09:24 -07:00
ryleung-solana 17b00ad3a4
Add quic-client module (#23166)
* Add quic-client module to send transactions via quic, abstracted behind the TpuConnection trait (along with a legacy UDP implementation of TpuConnection) and change thin-client to use TpuConnection
2022-03-09 21:33:05 -05:00