Open shunsukew opened 2 years ago
We have the custom MultiaddrWithPeerId
in Substrate. This requires that you have a multi-address that has a peer id attached. A lot of our code currently "requires" that we already know the peer id. We would probably need to change the code to first resolve the peer ids. However, I don't know how to do this actually. @kpp @tomaka do you maybe know if we can resolve a multiaddr that starts with dnsaddr
to some "normal" multiaddr? (I mean it is done somewhere in libp2p, I just don't know how complicated it is to do this from the outside)
This is an expected behavior. There could be multiple records associated with the provided dnsaddr, section #suffix-matching
says how to match against peer id in order to get the right record. Even ipfs has to specify p2p|ipfs peer id in their list of bootstrap nodes.
@bkchr do we need a different approach? Something like resolve -> get list of nodes -> add to bootstrap list
?
@bkchr do we need a different approach? Something like
resolve -> get list of nodes -> add to bootstrap list
?
Sounds correct to me.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
libp2p supports
/dnsaddr
multiaddr(s) by looking up TXT records in DNS. https://github.com/multiformats/multiaddr/blob/master/protocols/DNSADDR.md I assumed that https://github.com/paritytech/substrate/issues/7811 made it possible to use multiaddr. However, Substrate returns errors when/dnsaddr
is defined in chainspec's bootnodes list.Steps to reproduce
Register TXT record
_dnsaddr.{domain name}
and value isdnsaddr=/ip4/{ip address}/tcp/30333/p2p/{parachain node identity}
Make sure libp2p-lookup works
Add
/dnsaddr
to raw chain spec jsonPass json file to Substrate
--chain
args