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

net/libp2p: Enforce outbound request-response timeout limits #7222

Merged
merged 24 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9f8ca21
net/req-resp: Introduce a new `ProtocolDetails` to hold protocol details
lexnv Jan 17, 2025
190fe89
net/req-resp: Evict timeout requests
lexnv Jan 17, 2025
c3b01da
Add prdoc
lexnv Jan 17, 2025
48f0127
net/req-resp: Fix cargo docs
lexnv Jan 17, 2025
f8e89f4
net/req-resp: Adjust logs
lexnv Jan 17, 2025
050c166
Adjust PRdoc
lexnv Jan 17, 2025
13d0094
req-resp/tests: Add test to ensure timouts are forced
lexnv Jan 20, 2025
e862829
req-resp: Remove debug asserts as libp2p might respond later
lexnv Jan 20, 2025
1ec4657
req-resp/tests: Refactor basic_request_response_works to use tokio
lexnv Jan 20, 2025
caa335d
req-resp/tests: Refactor max_response_size_exceeded to use tokio
lexnv Jan 20, 2025
f992c9c
req-resp/tests: Refactor request_id_collision to use tokio
lexnv Jan 20, 2025
25891cc
req-resp/tests: Refactor request_fallback to use tokio
lexnv Jan 20, 2025
06e3b5c
Merge remote-tracking branch 'origin/master' into lexnv/enforce-timeouts
lexnv Jan 20, 2025
4fff0f5
Merge branch 'master' into lexnv/enforce-timeouts
lexnv Jan 20, 2025
d505321
req-resp: Fix old libp2p warn to distinguish between response and
lexnv Jan 20, 2025
7cdd47a
Merge remote-tracking branch 'origin/lexnv/enforce-timeouts' into lex…
lexnv Jan 20, 2025
1e5edb2
Merge remote-tracking branch 'origin/master' into lexnv/enforce-timeouts
lexnv Jan 20, 2025
7a7ee48
req-resp: Log elapsed time since request started
lexnv Jan 20, 2025
b640010
Update substrate/client/network/src/request_responses.rs
lexnv Jan 21, 2025
053d8ca
req-resp: Introduce Option to wrap the oneshot::Sender
lexnv Jan 21, 2025
4d33dfc
req-resp/tests: Lower test time to 2s by stopping first swarm + reduce
lexnv Jan 22, 2025
296156d
req-resp/tests: Fix clippy
lexnv Jan 22, 2025
d13f9d7
req-resp: Downgrade warnings to debug to not pollute validator logs
lexnv Jan 22, 2025
79ee2d8
Merge branch 'master' into lexnv/enforce-timeouts
lexnv Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions prdoc/pr_7222.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: Enforce libp2p outbound request-response timeout limits

doc:
- audience: Node Dev
description: |
This PR enforces that outbound requests are finished within the specified protocol timeout.
The stable2412 version running libp2p 0.52.4 contains a bug which does not track request timeouts properly
/~https://github.com/libp2p/rust-libp2p/pull/5429.

The issue has been detected while submitting libp2p to litep2p requests in Kusama.
This aims to check that pending outbound requests have not timed out.
Although the issue has been fixed in libp2p, there might be other cases where this may happen.
For example, /~https://github.com/libp2p/rust-libp2p/pull/5417.

For more context see /~https://github.com/paritytech/polkadot-sdk/issues/7076#issuecomment-2596085096.

crates:
- name: sc-network
bump: patch
Loading
Loading