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

fix: do not overwrite addresses on identify push when none are sent #2192

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Nov 2, 2023

During identify-push in response to a protocol update go-libp2p does not send a signed peer record or the current list of listen addresses.

This manifests in intermittent interop test failures where we have no valid addresses for a dial, when we dial a peer ID after adding multiaddrs for it to the peer store.

Protobuf does not let us differentiate between an empty list and no list items at all because the field is just repeated - an absence of repeated fields doesn't mean the list was omitted.

@achingbrain achingbrain changed the title chore: debug interop fix: do not overwrite addresses on identify push when none are sent Nov 2, 2023
During identify-push in response to a protocol update go-libp2p does not send a signed peer record or the current list of listen addresses.

Protobuf does not let us differentiate between an empty list and no list items at all because the field is just repeated - an absence of repeated fields doesn't mean the list was omitted.

When the listen address list is empty, preserve any existing addresses.
@achingbrain achingbrain marked this pull request as ready for review November 2, 2023 18:42
@achingbrain achingbrain requested a review from a team as a code owner November 2, 2023 18:42
@achingbrain achingbrain merged commit 025c082 into master Nov 3, 2023
22 checks passed
@achingbrain achingbrain deleted the fix/debug-interop branch November 3, 2023 12:01
This was referenced Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant