Skip to content

[GH-846] AddrInfo/AddrInfoSlice reworked #857

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

Un1oR
Copy link
Contributor

@Un1oR Un1oR commented Apr 24, 2025

Fixes

failed to call method GetBootstrapConfig on shard 0: failed to parse multiaddr "/ip4/127.0.0.1/tcp/30306/p2p/16Uiu2HAm6KAwV7PsgZosUmbzuLpCwzfrSRgKcSd5tD2Fnn6bfeWa,/ip4/172.31.22.127/tcp/30306/p2p/16Uiu2HAm6KAwV7PsgZosUmbzuLpCwzfrSRgKcSd5tD2Fnn6bfeWa": invalid value "16Uiu2HAm6KAwV7PsgZosUmbzuLpCwzfrSRgKcSd5tD2Fnn6bfeWa," for protocol p2p: failed to parse p2p addr: 16Uiu2HAm6KAwV7PsgZosUmbzuLpCwzfrSRgKcSd5tD2Fnn6bfeWa, input isn't valid multihash

AddrInfo.Set had a non-symmetric implementation with AddrInfo.String for the case of multiple addresses at the peer, and there was no test for this.

We now correctly handle multiaddresses for one peer. Both AddrInfo and AddrInfoSlice are always serialized by a flat list of all multiaddresses of all peers. During deserialization in case of AddrInfoSlice we group by PeerID.

@Un1oR Un1oR requested review from Zerg1996 and dmtrskv April 24, 2025 16:23
@Un1oR Un1oR changed the title [GH-846] AddrInfo/AddrInfoSlice reworked [GH-846] AddrInfo/AddrInfoSlice reworked Apr 24, 2025
Copy link
Contributor

@Zerg1996 Zerg1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for PR, lgtm! just small comment

Un1oR added 2 commits April 24, 2025 21:34
We now correctly handle multiaddresses for one peer. Both AddrInfo and AddrInfoSlice are always serialized by a flat list of all multiaddresses of all peers. During deserialization in case of AddrInfoSlice we group by PeerID.
@Un1oR Un1oR force-pushed the bugfix/GH-846-addr-info-marshalling-fix branch from 001e743 to c98d84a Compare April 24, 2025 17:34
@Un1oR Un1oR enabled auto-merge April 24, 2025 17:34
@Un1oR Un1oR added this pull request to the merge queue Apr 24, 2025
Merged via the queue into main with commit 480ea42 Apr 24, 2025
16 checks passed
@Un1oR Un1oR deleted the bugfix/GH-846-addr-info-marshalling-fix branch April 24, 2025 18:49
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.

2 participants