feat: static resolution of p2p-forge domains #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: go-libp2p is sending both A and AAAA no matter if explicit
/dns4or/dns6is present:go-multiaddr-dns/resolve.go
Lines 150 to 154 in 2cbddc7
This PR aims to mitigate this for the most popular dns addr type (AutoTLS ones) by adding support for static (deterministic) domains to reduce the number of DNS queries for A and AAAA a libp2p node needs to make. Yes, we can't avoid them in web browsers, but we can avoid them in non-browser contexts like Go.
TLDR:
libp2p.direct, it supports any domain suffix with valid libp2p peer IDs in second positioncc @sukunrt @aschmahmann