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

litep2p/peerset: Do not disconnect all peers on SetReservedPeers command #6016

Merged
merged 30 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3b98cd4
litep2p/peerset: Reserved peers are already inserted by
lexnv Oct 10, 2024
3bb1b99
litep2p/peerset: Disconnect only different reserved peers
lexnv Oct 10, 2024
6f0dd71
litep2p/peerset: Preserve previously reserve nodes if slots
lexnv Oct 10, 2024
c6fe294
litep2p/peerset: Preserve reserve peer state
lexnv Oct 10, 2024
513e183
litep2p/peerset: Exclude reserved peers from connection candidates
lexnv Oct 10, 2024
513b042
litep2p/peerset: Adjust reserved state and more documentation
lexnv Oct 10, 2024
1bceba0
litep2p/peerset: Simplify PeerState::Connected transition from rm
lexnv Oct 10, 2024
89d2f28
litep2p/peerset: Simplify PeerState::Opening transition from rm reserved
lexnv Oct 10, 2024
b9b7331
litep2p: Fix build
lexnv Oct 10, 2024
8ea7cb1
litep2p/peerset: Preserve direction of reserved peers
lexnv Oct 11, 2024
db73cda
peerset/tests: Adjust testing to new implementation
lexnv Oct 11, 2024
036e58d
peerset/tests: Ensure SetReserved moves peers if capacity
lexnv Oct 11, 2024
587bcde
peerset/tests: Ensure reserved peers are disconnected if no capacity
lexnv Oct 11, 2024
ecf2c1c
litep2p/peerset: Remove unneeded fn
lexnv Oct 11, 2024
3eb80d4
peerset/tests: Double check peer numbers
lexnv Oct 11, 2024
df8e802
Add Prdoc
lexnv Oct 11, 2024
9db9a09
Merge branch 'master' into lexnv/litep2p-peerset
lexnv Oct 11, 2024
f430f6d
Update prdoc/pr_6016.prdoc
lexnv Nov 4, 2024
cb02320
Update substrate/client/network/src/litep2p/shim/notification/peerset.rs
lexnv Nov 4, 2024
d78a860
Update substrate/client/network/src/litep2p/shim/notification/peerset.rs
lexnv Nov 4, 2024
8dd82d0
Merge remote-tracking branch 'origin/master' into lexnv/litep2p-peerset
lexnv Nov 4, 2024
b2159a1
Update prdoc
lexnv Nov 4, 2024
04f2d3a
Fix build
lexnv Nov 4, 2024
0d7a2a3
Update substrate/client/network/src/litep2p/shim/notification/peerset.rs
lexnv Nov 5, 2024
35cfbff
peerset/tests: Adjust comment outbound peers -> reserved peers
lexnv Nov 5, 2024
215e522
peerset/litep2p: Ensure common peer is not disconnected
lexnv Nov 5, 2024
7dbf1f0
peerset: Move duplicated check for disconnection to fn
lexnv Nov 5, 2024
4ee26a3
peerset: Increment slot count based on direction
lexnv Nov 5, 2024
280cc87
Merge remote-tracking branch 'origin/master' into lexnv/litep2p-peerset
lexnv Nov 5, 2024
0a34ad1
Merge branch 'master' into lexnv/litep2p-peerset
lexnv Nov 6, 2024
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
15 changes: 15 additions & 0 deletions prdoc/pr_6016.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: Litep2p network backend do not disconnect all peers on SetReservedPeers command

doc:
- audience: [ Node Dev, Node Operator ]
description: |
Previously, when the `SetReservedPeers` was received, all peers except the new
reserved peers were disconnected.
This PR ensures that previously reserved nodes are kept connected as regular nodes if
enough slots are available.
While at it, this PR excludes reserved peers from the candidates of peers obtained from
the peerstore.

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