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

use a random string for the mDNS peer-name #1222

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

marten-seemann
Copy link
Contributor

Fixes #1207. Closes #1211.

Corresponding specs PR: libp2p/specs#368.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Looks good to me from a protocol perspective, though I am not sure the varying size is needed.

p2p/discovery/mdns/mdns.go Show resolved Hide resolved
@marten-seemann marten-seemann merged commit eee7761 into master Oct 12, 2021
@marten-seemann marten-seemann deleted the random-mdns-peer-name branch October 12, 2021 13:31
mxinden added a commit to libp2p/rust-libp2p that referenced this pull request Nov 25, 2021
With libp2p/specs#368 the definition of the _peer name_
changed in the mDNS specification.

> peer-name is the case-insensitive unique identifier of the peer, and is less
> than 64 characters.
>
> As the this field doesn't carry any meaning, it is sufficient to ensure the
> uniqueness of this identifier. Peers SHOULD generate a random, lower-case
> alphanumeric string of least 32 characters in length when booting up their
> node. Peers SHOULD NOT use their Peer ID here because a future Peer ID could
> exceed the DNS label limit of 63 characters.

https://github.com/libp2p/specs/blob/master/discovery/mdns.md

This commit adjusts `libp2p-mdns` accordingly.

Also see libp2p/go-libp2p#1222 for the corresponding
change on the Golang side.

Co-authored-by: Max Inden <mail@max-inden.de>
vnermolaev pushed a commit to vnermolaev/rust-libp2p that referenced this pull request Nov 30, 2021
…p#2311)

With libp2p/specs#368 the definition of the _peer name_
changed in the mDNS specification.

> peer-name is the case-insensitive unique identifier of the peer, and is less
> than 64 characters.
>
> As the this field doesn't carry any meaning, it is sufficient to ensure the
> uniqueness of this identifier. Peers SHOULD generate a random, lower-case
> alphanumeric string of least 32 characters in length when booting up their
> node. Peers SHOULD NOT use their Peer ID here because a future Peer ID could
> exceed the DNS label limit of 63 characters.

https://github.com/libp2p/specs/blob/master/discovery/mdns.md

This commit adjusts `libp2p-mdns` accordingly.

Also see libp2p/go-libp2p#1222 for the corresponding
change on the Golang side.

Co-authored-by: Max Inden <mail@max-inden.de>
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
santos227 pushed a commit to santos227/rustlib that referenced this pull request Jun 20, 2022
With libp2p/specs#368 the definition of the _peer name_
changed in the mDNS specification.

> peer-name is the case-insensitive unique identifier of the peer, and is less
> than 64 characters.
>
> As the this field doesn't carry any meaning, it is sufficient to ensure the
> uniqueness of this identifier. Peers SHOULD generate a random, lower-case
> alphanumeric string of least 32 characters in length when booting up their
> node. Peers SHOULD NOT use their Peer ID here because a future Peer ID could
> exceed the DNS label limit of 63 characters.

https://github.com/libp2p/specs/blob/master/discovery/mdns.md

This commit adjusts `libp2p-mdns` accordingly.

Also see libp2p/go-libp2p#1222 for the corresponding
change on the Golang side.

Co-authored-by: Max Inden <mail@max-inden.de>
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.

flaky mDNS test
2 participants