-
Notifications
You must be signed in to change notification settings - Fork 949
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
feat(identify)!: report what we pushed to a remote peer #4335
Conversation
I am not convinced that it is the responsibility of the identify protocol to emit this event. Every protocol has access to this information, why should identify specifically report this in this events? It has nothing to do with identify per-se. As suggested in #4332 (comment), we could extend the The fact that the user received a Pushed {
peer: PeerId,
info: Info,
trigger: WhatChanged
}
enum WhatChanged {
LocalProtocols,
ExternalAddresses
} This starts to get a bit involved though. As a first step, we could simply include |
This suggestion makes a lot of sense. Let me change my PR to be this. |
Signed-off-by: Dave Huseby <[email protected]>
e7f6ef2
to
a7ae23c
Compare
Signed-off-by: Dave Huseby <[email protected]>
b831237
to
4a0012b
Compare
Signed-off-by: Dave Huseby <[email protected]>
This pull request has merge conflicts. Could you please resolve them @dhuseby? 🙏 |
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 @dhuseby !
A few minor comments :)
Event::IdentificationPushed, | ||
)), | ||
future::Either::Right(()) => { | ||
let local_info = self.build_info(); |
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.
Is it guaranteed that this is actually the info we pushed? What if our state changed since we sent it to the other peer?
I'd prefer if we changed the OutboundUpgrade
implementation such that it emits the Info
that it sent over the wire so we can carry it forward here.
Co-authored-by: Thomas Eizinger <[email protected]>
Marking this as draft because it is a breaking change. |
Closing this broken PR (no force push!) and replacing with #4527 |
Description
Starting in #3980, we make more use of the identify push protocol by actively notifying the peer when our locally supported protocols change. We emit an event (
Pushed
) to the user in that case. This event however does not include what we pushed.Users might be interested in the internal changes that we push to remote peers. This patch adds the identify
Info
to thePushed
variant.Fixes #4332.
Notes & open questions
None
Change checklist