Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(request-response): don't use upgrade infrastructure #3914

Merged
merged 34 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1db7fc3
Never close connections in request-response
thomaseizinger May 11, 2023
10508d6
Log error instead
thomaseizinger May 11, 2023
f4f1e58
Refactor `request-response` to not use upgrade mechanism
thomaseizinger May 11, 2023
4afc9d3
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Jun 5, 2023
30f53b3
Don't panic on timeouts
thomaseizinger Jun 5, 2023
50e6207
Remove unnecessary comment
thomaseizinger Jun 5, 2023
aea1027
Use `mpsc` channel for sending inbound requests
thomaseizinger Jun 5, 2023
6e5f76d
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Jul 31, 2023
d41f44b
Fix keep-alive TODO
thomaseizinger Jul 31, 2023
796780e
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Jul 31, 2023
791220c
Fix MSRV issue
thomaseizinger Jul 31, 2023
eaf1d97
Introduce `futures-bounded` for time and space bounded workers
thomaseizinger Aug 3, 2023
be64f0d
Add changelog
thomaseizinger Aug 3, 2023
9a9fd79
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Aug 3, 2023
bdd95f7
Add description
thomaseizinger Aug 3, 2023
51ef639
Add test for backpressure
thomaseizinger Aug 3, 2023
a250457
Allow configuration of max capacity for worker streams
thomaseizinger Aug 6, 2023
7127463
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Sep 18, 2023
0723c2f
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Sep 20, 2023
701d288
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Sep 20, 2023
f8c42de
Fix compile errors
thomaseizinger Sep 20, 2023
7960117
Update swarm/CHANGELOG.md
thomaseizinger Sep 20, 2023
671b90f
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 16, 2023
3810cac
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 19, 2023
4b24287
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 20, 2023
302c920
Move changelog entry
thomaseizinger Oct 20, 2023
dfa3a58
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 20, 2023
53b9abd
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 20, 2023
d812e1c
Merge branch 'refactor/req-res-on-upgrade' of github.com:libp2p/rust-…
thomaseizinger Oct 20, 2023
71354b2
Report IO failures
thomaseizinger Oct 20, 2023
feccbc2
fix(request-response): Report failures (#4701)
oblique Oct 26, 2023
beb8863
Merge branch 'master' into refactor/req-res-on-upgrade
thomaseizinger Oct 26, 2023
c6603a1
Add further changelog entry
thomaseizinger Oct 26, 2023
1599f8f
Merge branch 'master' into refactor/req-res-on-upgrade
mergify[bot] Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/file-sharing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ either = "1.8"
env_logger = "0.10"
futures = "0.3.28"
libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] }
multiaddr = { version = "0.17.1" }
multiaddr = { version = "0.17.1" }
void = "1.0.2"
4 changes: 2 additions & 2 deletions examples/file-sharing/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use libp2p::{
multiaddr::Protocol,
noise,
request_response::{self, ProtocolSupport, RequestId, ResponseChannel},
swarm::{NetworkBehaviour, StreamUpgradeError, Swarm, SwarmBuilder, SwarmEvent},
swarm::{NetworkBehaviour, Swarm, SwarmBuilder, SwarmEvent},
tcp, yamux, PeerId, Transport,
};

Expand Down Expand Up @@ -216,7 +216,7 @@ impl EventLoop {

async fn handle_event(
&mut self,
event: SwarmEvent<ComposedEvent, Either<StreamUpgradeError<io::Error>, io::Error>>,
event: SwarmEvent<ComposedEvent, Either<void::Void, io::Error>>,
) {
match event {
SwarmEvent::Behaviour(ComposedEvent::Kademlia(
Expand Down
5 changes: 5 additions & 0 deletions protocols/request-response/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
These variants are no longer constructed.
See [PR 3605].

- Don't close connections if individual streams fail.
Log the error instead.
See [PR XXXX].

[PR 3605]: https://github.com/libp2p/rust-libp2p/pull/3605
[PR 3715]: https://github.com/libp2p/rust-libp2p/pull/3715
[PR 3702]: https://github.com/libp2p/rust-libp2p/pull/3702
[PR XXXX]: https://github.com/libp2p/rust-libp2p/pull/XXXX

## 0.24.1

Expand Down
3 changes: 3 additions & 0 deletions protocols/request-response/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ libp2p-swarm = { workspace = true }
libp2p-identity = { workspace = true }
rand = "0.8"
smallvec = "1.6.1"
void = "1.0.2"
log = "0.4.17"
futures-timer = "3.0.2"

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
Expand Down