-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(peer-store): Remove addresses from peer store on dial failure #5926
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Daniel! Overall LGTM, left a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dknopik!
2c8f8f9
to
aa7c0c4
Compare
Pushed a new version that:
The only open question from my perspective is whether to reintroduce the "permanent address" mechanism as seen here: 2c8f8f9 EDIT: discussed in call - we'll differentiate by origin ( |
Co-authored-by: Elena Frank <[email protected]>
a731633
to
5184663
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Approvals have been dismissed because the PR was updated after the send-it
label was applied.
…to peer-store-remove-undialable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fr the patience Daniel! ❤️
Refactor the events emitted by the `peer_store::Behavior`: 1. Merge the current 3 event types (`behavior::Event`, `store::Event`, `memory_store::Event`) into a single type that is emitted by the `Store` implementation. 2. Use more descriptive event variants `AddressAdded`, `AddressRemoved` that also expose the specific `Multiaddr`. 3. Remove `Event::CustomDataUpdate` variant. Discussed in #5926 (comment) and #5926 (comment). Pull-Request: #6011.
Description
When the
MemoryStore
receives aFromSwarm::DialFailure
event, it will now modify the store appropriately:LocalPeerId
: Remove the peer from the store.WrongPeerId
: Remove the address for the dialed peer ID and readd it for the received peer ID.Transport
: Remove the failed addresses from the store.Furthermore, we group some repeated event logic in a new function
push_event_and_wake
for internal use.Follow-up to #5724
Notes & open questions
None.
Change checklist