This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Split Peerset into reputation store & ProtocolControllers
#13611
Merged
Merged
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
143bc98
WIP: Introduce `ProtocolController`
dmitry-markin 5256f19
Code review suggestions: docs and `trace`->`info`
dmitry-markin c333aac
Apply suggestions from code review
dmitry-markin b50f134
Rename `ConnectionState`->`PeerState` and reduce states to `Connected…
dmitry-markin 2670615
Get rid of `Peer` abstraction
dmitry-markin f6b9bca
Apply suggestions from code review
dmitry-markin 6c6fb75
Rework peer management + implement `alloc_slots`
dmitry-markin 7d7d1d8
minor: naming
dmitry-markin de8e6d2
Apply suggestions from code review
dmitry-markin 4ab043d
Apply review suggestions
dmitry-markin 770a38a
Refactor `on_peer_dropped()`
dmitry-markin f4401cf
minor: fix docs
dmitry-markin 91a66ec
Add more docs
dmitry-markin fd43963
Don't put connected peers into the list of regular nodes
dmitry-markin 63385ff
minor: docs
dmitry-markin 368eaed
WIP: add tests
dmitry-markin 4c95216
minor: take no more connection candidates than slots available
dmitry-markin d09dc00
Test both connect/accept for reserved nodes
dmitry-markin 7a25e8a
Test banned reserved nodes, fix `alloc_slots`
dmitry-markin 9747eaf
Add more tests
dmitry-markin 0b4a4c2
minor: remove unneded tokio dev dependecy
dmitry-markin 29d6e35
Add test for disconnecting reserved peers
dmitry-markin d95562f
minor: clean `PeerSet` from `PeerStore` methods
dmitry-markin 7a58b7e
Pass ignored nodes as hash set of references to `PeerStore`
dmitry-markin c1bb601
minor test fixes
dmitry-markin 013ee1d
Better validation of `PeerStore` output
dmitry-markin 7551cd0
Rename trait `PeerStore`->`PeerReputationProvider`
dmitry-markin 4fb10a1
WIP: introduce `PeerStore` reputation storage
dmitry-markin 67ae9cb
Apply suggestions from code review
dmitry-markin 57d7ebd
minor: rustfmt
dmitry-markin 7ac4180
Remove `DropReason` from peer dropped events
dmitry-markin 4636536
Fix handling of invalid `PeerStore` output in `alloc_slots`
dmitry-markin e865c19
Implement `PeerStore`
dmitry-markin 2587cdc
minor: docs
dmitry-markin 06f8fdf
minor: TODO
dmitry-markin 56d380b
minor: another TODO
dmitry-markin 85bdadb
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 9c69f2d
Retain peer info for one hour after it was last updated
dmitry-markin 554dbf8
Construct `PeerStore` from the list of bootnodes
dmitry-markin 72ec71f
WIP: plug `PeerStore` and `ProtocolController` into `Peerset`
dmitry-markin 086fb5b
WIP: implement `PeerStore` and `ProtocolController` polling via `Peer…
dmitry-markin 7e370d9
Apply suggestions from code review
dmitry-markin 64ee662
minor: improve error reporting
dmitry-markin c9109d7
Apply review suggestions
dmitry-markin 8677480
WIP: update `PeerSet` use to match `PeerStore` and `ProtocolControlle…
dmitry-markin ff43c19
WIP: try to make `sc-network` compile
dmitry-markin f53e1a1
Restore the original API of `Peerset`
dmitry-markin 4e1b773
docs: apply review suggestions
dmitry-markin 23bf89b
Make substrate compile
dmitry-markin d74f8b9
Get rid of `PeersState`
dmitry-markin bfb9c7f
Fix bug with removing reserved node in `ProtocolController`, improve …
dmitry-markin c7aaf9f
minor: comment
dmitry-markin 14c4f53
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 82c3351
Apply suggestions from code review
dmitry-markin 90b018c
Apply more code review suggestions
dmitry-markin d839590
minor: use boxing instead of generics for `PeerStoreHandle` reference…
dmitry-markin 7c8ac45
Test `PeerInfo::decay_reputation`
dmitry-markin 06cb192
Make concurrency issues slightly milder
dmitry-markin bc4f608
Improve situation a little more
dmitry-markin 8ed59d3
Try to make it work using rendezvous channels
dmitry-markin a2b9ca4
Make fuzz test skip over commands between `incoming` and `accept`/`re…
dmitry-markin 14315a0
Update comment re concurrency issues with `ProtocolController`<->`Not…
dmitry-markin 27178f8
Clean things up and fix warnings
dmitry-markin 1ef145c
Fix error with assigning to local variable instead of reference
dmitry-markin 535410b
Update tests with new incoming request handling logic
dmitry-markin 1065fc6
Make `Notifications` skip over `Peerset` commands between `incoming` …
dmitry-markin 9730a41
Fix `reconnect_after_disconnect` test
dmitry-markin 92001f6
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 42f14b9
Fix rustdoc
dmitry-markin 752d70b
Remove unused `ProtocolHandle::disconnect_peer`
dmitry-markin 2fbfe6c
Add logging of reputation changes
dmitry-markin dc85f1f
Fix warnings
dmitry-markin 9b33297
minor: change log level
dmitry-markin 198504f
minor: remove unused import
dmitry-markin 9e86b38
Apply suggestions from code review
dmitry-markin b3a72ad
minor: add more logging
dmitry-markin e03f852
Document event prioritization requirements in `ProtocolController`
dmitry-markin 9a51e22
Rename `PeerReputationProvider` -> `PeerStoreProvider`
dmitry-markin a4e32a6
Add comment re dropped entries and `num_known_peers`
dmitry-markin 0322d3d
Revert "Remove unused `ProtocolHandle::disconnect_peer`"
dmitry-markin 0944c8e
Disconnect peers with reputation below `BANNED_THRESHOLD`
dmitry-markin fba6f2d
Switch to `parking_lot::Mutex`
dmitry-markin c94ea21
WIP: introduce outstanding events/actions handling
dmitry-markin 34b2d1b
WIP: defer/process outstanding `SetReservedPeers` and `SetReservedOnly`
dmitry-markin ace2dd0
WIP: implement ACKing of `ProtocolController` messages
dmitry-markin 76d4132
WIP: ACKs in `ProtocolController` (mostly done, but fuzz fails)
dmitry-markin 4066995
minor: remove debugging logging
dmitry-markin 80d3ff6
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 1fc523d
Fix failed merge of `master`
dmitry-markin ccdde89
minor: revert number of iterations in `fuzz` test
dmitry-markin 2415e2a
Relax event order requirements in fuzz test
dmitry-markin 4ee2a32
Relax `ProtocolController` message order requirements in `Notifications`
dmitry-markin 6fcd68c
Get rid of ACKs
dmitry-markin 8a268b2
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 9dfd6fe
Update docs to match the implementation
dmitry-markin 4a2257f
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 601e4f6
Fix `Notifications` tests
dmitry-markin a99847c
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin 263db27
Delete `Peerset` test duplicating `ProtocolController` tests
dmitry-markin 47edf31
minor: add issue references in TODOs
dmitry-markin b50d998
Apply suggestions from code review
dmitry-markin 2cd0188
rustfmt
dmitry-markin a0dcac4
monor: format after `rustfmt`
dmitry-markin 6960b8f
Add in/out slot counters logging
dmitry-markin b7a5a48
Merge remote-tracking branch 'origin/master' into dm-peerset-splitting
dmitry-markin a03b9a0
Make clippy happy
dmitry-markin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.