Commit Graph

265 Commits

Author SHA1 Message Date
Pankaj Garg 3f9c974587
Remove the specific QUIC connection entry that disconnected (#29883) 2023-01-25 16:14:25 -08:00
Han Yang 7d286961ba
Add `MSG_WAITFORONE.try_into().unwrap()` to deal with different type signature on musl libc (#29369)
* add try_into().unwrap() to deal with different type signature on musl libc

* add allow useless_conversion

* trailing whitespace

* cargo fmt
2023-01-25 13:40:14 +01:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
Kevin Ji dd92f225bb
Use Ipv4Addr::{LOCALHOST, UNSPECIFIED} constants (#29813) 2023-01-23 16:49:51 -06:00
behzad nouri 272e667cb2
deprecates Pubkey::new in favor of Pubkey::{,try_}from (#29805)
The commit deprecates Pubkey::new which lacks type-safety and instead
implements TryFrom<&[u8]> and TryFrom<Vec<u8>> for Pubkey.
2023-01-21 18:06:27 +00:00
Trent Nelson f96af7929d
quic-server: demote and annotate noisy, ambiguous log message (#29704) 2023-01-13 20:22:57 -07:00
dependabot[bot] d32256d2af
Bump pem from 1.1.0 to 1.1.1 (#29673)
* Bump pem from 1.1.0 to 1.1.1

Bumps [pem](https://github.com/jcreekmore/pem-rs) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/jcreekmore/pem-rs/releases)
- [Changelog](https://github.com/jcreekmore/pem-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jcreekmore/pem-rs/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pem
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-01-12 19:39:02 -07:00
Pankaj Garg 164c929b27
Cleanup QUIC single signed client cert code (#29686) 2023-01-12 15:24:02 -08:00
Pankaj Garg 1d0a28c66a
Restrict QUIC to use single self signed client cert (#29681) 2023-01-12 10:05:56 -08:00
Richard Patel 1b6024a101
disable rustls tls12 feature (#28956)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2023-01-12 08:37:06 -08:00
Lijun Wang 7c8b846344
Update quinn versions (#29603)
* chore: bump quinn-udp from 0.1.3 to 0.3.2

Bumps [quinn-udp](https://github.com/quinn-rs/quinn) from 0.1.3 to 0.3.2.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/commits)

---
updated-dependencies:
- dependency-name: quinn-udp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Try to use quinn 0.9.3 and quinn-proto 0.9.2

* Update streamer and client for quic to support qunn 0.9.3

* Update Cargo.lock

* Fixed unit test failure for quic tests

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-11 10:08:22 -08:00
Brennan Watt dbf97daa78
Increase wait for chunk timeout in QUIC tests (#29629) 2023-01-11 07:16:41 -08:00
behzad nouri 5c9beef498
fixes errors from clippy::useless_conversion (#29534)
https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2023-01-05 18:05:32 +00:00
dependabot[bot] 65391a70cb
chore: bump futures-util from 0.3.24 to 0.3.25 (#29337)
* chore: bump futures-util from 0.3.24 to 0.3.25

Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.24 to 0.3.25.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

---
updated-dependencies:
- dependency-name: futures-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-12-22 22:42:18 -07:00
dependabot[bot] 6ebbaf30c9
chore: bump rcgen from 0.9.2 to 0.9.3 (#28021)
* chore: bump rcgen from 0.9.2 to 0.9.3

Bumps [rcgen](https://github.com/est31/rcgen) from 0.9.2 to 0.9.3.
- [Release notes](https://github.com/est31/rcgen/releases)
- [Changelog](https://github.com/est31/rcgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/est31/rcgen/compare/v0.9.2...v0.9.3)

---
updated-dependencies:
- dependency-name: rcgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-12-20 02:12:53 +00:00
Lijun Wang d1cf4ced3d
quic test timeout fix (#29260)
Allow longer chunk receive timeout without impacting testing the stream exit condition for unit tests. The exit is periodically checked, we will break only when the total allowed chunk receive timed out. The start time is reset when a new chunk is received.
2022-12-16 14:26:04 -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
behzad nouri 9524c9dbff patches errors from clippy::uninlined_format_args
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Jon Cinque b1340d77a2
sdk: Make Packet::meta private, use accessor functions (#29092)
sdk: Make packet meta private
2022-12-06 12:54:49 +01:00
Lijun Wang 16e2c5c0a2
Increase stream timeout to 1 sec to fix flaky tests (#28983) 2022-11-30 10:04:32 -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 ad24e37cc0
Limit the maximum staked streams to avoid excessive streams from staked nodes (#27973)
* Limit the maximum staked streams to avoid excessive streams from staked nodes.

* Fixed a clippy issue
2022-11-15 12:58:10 -08:00
Lijun Wang 8d34dfd881
Fixed flaky quic test (#28789) 2022-11-14 08:35:10 -08:00
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
ryleung-solana 842fa993c8
Quic fix calculation of staked number of concurrent streams (#28705)
* Fix calculation of staked number of concurrent streams
2022-11-03 20:45:44 +08: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 8036f6f304 Address some comments from Ryan 2022-10-12 14:12:40 -07:00
Lijun Wang 56b9288f9e Give better error code and reason for connection close 2022-10-12 14:12:40 -07:00
Lijun Wang a8d5731e5b Give the quic client and server thread the names 2022-10-06 16:55:21 -07:00
kirill lykov 63c00e7f5e
move readable inside the loop of packets (#27916)
* Add recv_mmsg_exact function

* update tests

* address PR comments
2022-10-05 22:20:26 +02:00
behzad nouri 9a57c64f21
patches clippy errors from new rust nightly release (#27996) 2022-09-22 22:23:03 +00:00
dependabot[bot] c4fa849844
chore: bump itertools from 0.10.3 to 0.10.5 (#27962)
* chore: bump itertools from 0.10.3 to 0.10.5

Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.3 to 0.10.5.
- [Release notes](https://github.com/rust-itertools/itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/commits)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-09-21 15:28:49 -06:00
Will Hickey c0e4379f43
Whickey/version v1.15 (#27739)
* Bump version to v1.13.0
* Bump version to v1.14.0
* Bump version to v1.15.0
2022-09-13 09:06:15 -05:00
kirill lykov 56de885dea
fix total_connections metric (#27603) 2022-09-06 18:36:55 +02:00
dependabot[bot] 7d17f423f3
chore: bump pem from 1.0.2 to 1.1.0 (#27514)
* chore: bump pem from 1.0.2 to 1.1.0

Bumps [pem](https://github.com/jcreekmore/pem-rs) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/jcreekmore/pem-rs/releases)
- [Changelog](https://github.com/jcreekmore/pem-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jcreekmore/pem-rs/compare/v1.0.2...v1.1.0)

---
updated-dependencies:
- dependency-name: pem
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-08-31 21:51:14 -06:00
Brennan Watt e4a7d01e10
Rust v1.63 (#27303)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

* Update quinn-udp crate

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-22 18:01:03 -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
Brennan Watt 7573000d87
Revert "Rust v1.63.0 (#27148)" (#27245)
This reverts commit a2e7bdf50a.
2022-08-19 09:19:44 +01:00
Brennan Watt a2e7bdf50a
Rust v1.63.0 (#27148)
* Upgrade to Rust v1.63.0

* Add nightly_clippy_allows

* Resolve some new clippy nightly lints

* Increase QUIC packets completion timeout

Co-authored-by: Michael Vines <mvines@gmail.com>
2022-08-17 15:48:33 -07:00
dependabot[bot] 0797810af4
chore: bump nix from 0.24.2 to 0.25.0 (#27179)
* chore: bump nix from 0.24.2 to 0.25.0

Bumps [nix](https://github.com/nix-rust/nix) from 0.24.2 to 0.25.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.2...v0.25.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-08-16 16:59:18 -06:00
dependabot[bot] 67d1628602
chore: bump libc from 0.2.129 to 0.2.131 (#27162)
* chore: bump libc from 0.2.129 to 0.2.131

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.129 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.129...0.2.131)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-08-16 13:01:37 -06:00
Lijun Wang 091d69d218
Update quinn lib to 0.8.4 (#27119) 2022-08-15 12:46:43 -07:00
dependabot[bot] a77131abce
chore: bump libc from 0.2.126 to 0.2.129 (#27063)
* chore: bump libc from 0.2.126 to 0.2.129

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.126 to 0.2.129.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.126...0.2.129)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-08-10 15:53:09 -06:00
Lijun Wang ceb8f099f2
Fixed a cargo warning on specifing quinn dependencies (#27057) 2022-08-10 11:54:13 -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
Lijun Wang a69470fd45
Set receive_window per quic connection (#26936)
This change sets the receive_window for non-staked node to 1 * PACKET_DATA_SIZE, and maps the staked nodes's connection's receive_window between 1.2 * PACKET_DATA_SIZE to 10 * PACKET_DATA_SIZE based on the stakes.

The changes is based on Quinn library change to support per connection receive_window tweak at the server side. quinn-rs/quinn#1393
2022-08-09 10:02:47 -07:00
Will Hickey ed8c224374
Bump version to v1.12 (#26967) 2022-08-06 13:20:30 -05:00
Tyera Eulberg 66919e5adb
Unpin tokio for non-rpc crates (#26957) 2022-08-05 20:50:45 -06: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
github-actions[bot] fbf1bf6d86
Bump Version to 1.11.6 (#26906)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-08-03 12:48:43 -05:00
Pankaj Garg fb922f613c
Compute maximum parallel QUIC streams using client stake (#26802)
* Compute maximum parallel QUIC streams using client stake

* clippy fixes

* Add unit test
2022-07-29 08:44:24 -07:00
github-actions[bot] 5d038b9d2a
Bump Version to 1.11.5 (#26758)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-25 13:05:14 -06:00
dependabot[bot] 9bd9d1e05a
chore: bump nix from 0.24.0 to 0.24.2 (#26725)
* chore: bump nix from 0.24.0 to 0.24.2

Bumps [nix](https://github.com/nix-rust/nix) from 0.24.0 to 0.24.2.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/v0.24.2/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.0...v0.24.2)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2022-07-22 11:02:53 -06:00
Pankaj Garg 27866aeab4
Fix transaction chunking on QUIC batch send (#26642)
* Fix chunking of transaction at batch transmit via QUIC

* clippy fixes
2022-07-22 08:56:15 -07:00
sakridge 9714cb3764
Remove some unchecked math from the quic chunk handling (#26408) 2022-07-16 17:03:31 +02: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
github-actions[bot] fd5df1cf25
Bump Version to 1.11.4 (#26578)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-11 23:30:38 -05: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
github-actions[bot] 9d937fb8a0
Bump Version to 1.11.3 (#26481)
Co-authored-by: willhickey <willhickey@users.noreply.github.com>
2022-07-07 14:39:46 -05:00
dependabot[bot] 83a73532b0
chore: bump indexmap from 1.8.1 to 1.9.1 (#26435)
* chore: bump indexmap from 1.8.1 to 1.9.1

Bumps [indexmap](https://github.com/bluss/indexmap) from 1.8.1 to 1.9.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.8.1...1.9.1)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-07-06 13:44:59 -06: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 e8ed7c1c46
Close QUIC connection before dropping the entry (#26269) 2022-06-28 13:46:56 -07:00
Pankaj Garg 31d870fe1b
Do not unwrap the oldest IP in QUIC connectiont table (#26272) 2022-06-28 00:17:08 +00:00
sakridge 2cc48a650b
Spawn for each stream (#26086) 2022-06-27 21:03:40 +02:00
Justin Starry 974db28e4d
Increase the QUIC stream timeout duration to improve perf (#26247) 2022-06-27 17:01:39 +01:00
Miles Obare b26c79b77b
[quic]Decrement total_streams correctly (#26158) 2022-06-23 14:09:43 -07:00
github-actions[bot] 5c2f819f99
Bump Version to 1.11.2 (#26159) 2022-06-22 21:16:18 -05:00
Pankaj Garg 17cf010ae6
Tune stream timeout and reading after timeouts (#26133)
* Tune stream timeout and reading after timeouts

* update sleep in test
2022-06-22 21:07:31 +00:00
Pankaj Garg d5dbfb67fd
QUIC stream timeouts if no data is received (#26116) 2022-06-21 18:56:47 -07:00
Pankaj Garg 4ad32eb412
Perform QUIC handshake asynchronously to allow parallel handshakes (#26043)
* Perform QUIC handshake asynchronously to allow parallel handhskaes

* address comments

* update cargo.lock

* change sleep to 1ms
2022-06-21 23:22:11 +00: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
Will Hickey 51f26dc96e
Bump version to 1.11.1 (#26104) 2022-06-21 12:07:46 -05:00
ryleung-solana 84a1aae555
Fix incorrect total connection table size in the quic server when removing multiple connections with the same IP:Port (#26073)
* Fix incorrect total connection table size in the quic server when removing multiple connections with the same IP:Port
2022-06-21 15:13:35 +08:00
Jon Cinque 061dc5322a
streamer: Add nonblocking quic server (#25806) 2022-06-07 18:22:46 +02:00
behzad nouri 5dbf7d8f91
removes raw indexing into packet data (#25554)
Packets are at the boundary of the system where, vast majority of the
time, they are received from an untrusted source. Raw indexing into the
data buffer can open attack vectors if the offsets are invalid.
Validating offsets beforehand is verbose and error prone.

The commit updates Packet::data() api to take a SliceIndex and always to
return an Option. The call-sites are so forced to explicitly handle the
case where the offsets are invalid.
2022-06-03 01:05:06 +00: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
dependabot[bot] 0c3639706b
chore: bump quinn from 0.8.2 to 0.8.3 (#25542)
* chore: bump quinn from 0.8.2 to 0.8.3

Bumps [quinn](https://github.com/quinn-rs/quinn) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/0.8.2...0.8.3)

---
updated-dependencies:
- dependency-name: quinn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-25 20:44:45 -06: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
Justin Starry cad1c41ce2 Add Packet::deserialize_slice convenience method 2022-05-24 17:31:14 +08: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
Michael Vines b05c7d91ed Fix derive_partial_eq_without_eq clippy lint 2022-05-22 22:22:21 -07:00
sakridge a56ce8283a
quic: Fix prune_oldest table size calculation (#25431) 2022-05-22 00:06:05 +02:00
Justin Starry 773b2f23f4
Fix flakey streamer_send_test (#25440) 2022-05-22 01:09:26 +08:00
Jon Cinque a5792885ca
streamer: Add nonblocking versions of sendmmsg / recvmmsg (#25415) 2022-05-20 22:40:40 +02:00
dependabot[bot] 6e5612dd55
chore: bump libc from 0.2.125 to 0.2.126 (#25332)
* chore: bump libc from 0.2.125 to 0.2.126

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.125 to 0.2.126.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.125...0.2.126)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-19 13:58:12 -06:00
sakridge 8c39648ec6
Give some tolerance to recv_mmsg test (#25299) 2022-05-19 18:54:39 +02:00
dependabot[bot] 5299038065
chore: bump rustls from 0.20.5 to 0.20.6 (#25331)
* chore: bump rustls from 0.20.5 to 0.20.6

Bumps [rustls](https://github.com/rustls/rustls) from 0.20.5 to 0.20.6.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.20.5...v/0.20.6)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-18 14:36:22 -06:00
dependabot[bot] 3bda895ea9
chore: bump rustls from 0.20.4 to 0.20.5 (#25243)
* chore: bump rustls from 0.20.4 to 0.20.5

Bumps [rustls](https://github.com/rustls/rustls) from 0.20.4 to 0.20.5.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.20.4...v/0.20.5)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-18 09:27:16 -06:00
sakridge 3d96a1ab76
Block packets in vote-only mode (#24906) 2022-05-14 17:53:37 +02:00
sakridge 5be138826b
Add sender stake to quic packets (#25054) 2022-05-07 16:45:03 +02:00
Tyera Eulberg c4aa082efc
Rollback tokio to LTS release v1.14 (#25028) 2022-05-06 06:34:49 +00:00
Justin Starry 7100f1c94b
Collect stats in streamer receiver and report fetch stage metrics (#25010) 2022-05-06 02:56:18 +08:00
dependabot[bot] bece7f32c8
chore: bump log from 0.4.16 to 0.4.17 (#24987)
* chore: bump log from 0.4.16 to 0.4.17

Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-05 01:49:18 +00:00
dependabot[bot] 8fa2913d08
chore: bump libc from 0.2.124 to 0.2.125 (#24914)
* chore: bump libc from 0.2.124 to 0.2.125

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.124 to 0.2.125.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.124...0.2.125)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-03 10:10:55 -06:00