Skip to content

Use MDNS implementation github.com/libp2p/go-libp2p/p2p/discovery/mdns #2993

@qdm12

Description

@qdm12

Our current implementation (before PR #2794) is based on https://github.com/libp2p/go-libp2p/tree/644dadc30bcc712ea13ad730f50b5e8ec1b949f2/p2p/discovery/mdns_legacy

Unfortunately, mdns_legacy got removed in libp2p/go-libp2p@707100a so all releases since v0.21.0 do not have it anymore. The only alternative since is https://github.com/libp2p/go-libp2p/blob/4c74181d0dada0b4d600885285b96afee74e223d/p2p/discovery/mdns/mdns.go

Unfortunately again, this new mdns implementation will not work with our RPC test TestStableNetworkRPC with 3 nodes.

MODE=rpc go test -run ^TestStableNetworkRPC$ github.com/ChainSafe/gossamer/tests/rpc -v

This issue may be related to libp2p/go-libp2p#1333 (or not).

After #2794 is merged, we should try upgrading to the new mdns package https://github.com/libp2p/go-libp2p/blob/4c74181d0dada0b4d600885285b96afee74e223d/p2p/discovery/mdns/mdns.go and remove the code in internal/mdns (based on mdns_legacy, in order to be able to upgrade libp2p dependencies).

Metadata

Metadata

Assignees

Labels

P-lowthis is mostly nice to have.S-networkissues related to the dot/network package.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions