-
Notifications
You must be signed in to change notification settings - Fork 5
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
Filter out un-actionable provider records #28
Comments
Agree, it sounds like a sensible default to reduce response size. Only ask is that there should be a flag+env for controlling this behavior, as people may want to use someguy in private swarms, where they DO want private provider addrs. Maybe |
I don't think we can filter out returning just peerIDs unless we also attempt to resolve those peerIDs within someguy. DHT FindProviders queries may sometimes return just peerIDs and require a FindPeer query to follow up. Note: While this is a bunch of extra work, it's not necessarily a bad idea since if someguy is tracking peerIDs it can also do things like check on if the peers are alive and sort response records accordingly (which will help clients be more efficient, and potentially workaround webtransport issues in chromium). |
Triage notes:
|
One thing I'd like to point out is that based on experience, in most cases the the peers returned without any addresses from the |
I just made a call to the delegated routing endpoint that returned me a loopback address:
I suspect that it may be related to Cloudflare caching because it's not easy to reproduce |
Re-opening this, as I keep on seeing some results with private IPs. I still haven't figured out why exactly, so I'll just share my findings: For example, taking the following Curl command from the browser returns private IPs:
The response is a cache hit:
and contains the following payload {"Addrs":["/ip6/::1/udp/4001/quic-v1/webtransport/certhash/uEiAyim-vGUCGwqt1zJhFMyiqK-AgfZ16jfepJYNDY7NEDw/certhash/uEiAJKSgEXLMI1RZwYZmpEcNgpZ_F2Kit3rV5peMxEz2ldw","/ip4/192.168.1.140/udp/4001/quic-v1","/ip6/fd9f:3dd0:6bc2:0:bf9d:49af:51d9:2d17/tcp/4001","/ip4/213.171.213.29/udp/4001/quic-v1/webtransport/certhash/uEiB5T6G9Nf_21RTajh4LhmOrqh4Fh7nPUQiqe8-yjoNogg/certhash/uEiDVzZmI2sOeARG-6o8wto-cItetAENvWOQlKrck1jNDkw/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip6/2a00:da00:1800:103::2/udp/4001/quic-v1/webtransport/certhash/uEiB5T6G9Nf_21RTajh4LhmOrqh4Fh7nPUQiqe8-yjoNogg/certhash/uEiDVzZmI2sOeARG-6o8wto-cItetAENvWOQlKrck1jNDkw/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip6/::1/udp/4001/quic-v1","/ip4/127.0.0.1/udp/4001/quic","/ip6/2a00:da00:1800:103::2/tcp/4001/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip4/213.171.213.29/tcp/4001/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip6/::1/udp/4001/quic","/ip4/127.0.0.1/udp/4001/quic-v1","/ip6/fd9f:3dd0:6bc2:0:1e3e:6614:da82:dc6b/udp/4001/quic-v1","/ip6/fd9f:3dd0:6bc2:0:1e3e:6614:da82:dc6b/udp/4001/quic","/ip4/213.171.213.29/udp/4001/quic-v1/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip4/127.0.0.1/tcp/4001","/ip6/fd9f:3dd0:6bc2:0:bf9d:49af:51d9:2d17/udp/4001/quic-v1/webtransport/certhash/uEiAyim-vGUCGwqt1zJhFMyiqK-AgfZ16jfepJYNDY7NEDw/certhash/uEiAJKSgEXLMI1RZwYZmpEcNgpZ_F2Kit3rV5peMxEz2ldw","/ip6/::1/tcp/4001","/ip6/fd9f:3dd0:6bc2:0:bf9d:49af:51d9:2d17/udp/4001/quic","/ip4/192.168.1.140/tcp/4001","/ip4/23.94.202.252/udp/4001/quic/p2p/12D3KooWHwwULwN7WjMCy85ZQZgACiRv6o42Yp3WSiGFTaTgGr1o/p2p-circuit","/ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiAyim-vGUCGwqt1zJhFMyiqK-AgfZ16jfepJYNDY7NEDw/certhash/uEiAJKSgEXLMI1RZwYZmpEcNgpZ_F2Kit3rV5peMxEz2ldw","/ip6/fd9f:3dd0:6bc2:0:1e3e:6614:da82:dc6b/udp/4001/quic-v1/webtransport/certhash/uEiAyim-vGUCGwqt1zJhFMyiqK-AgfZ16jfepJYNDY7NEDw/certhash/uEiAJKSgEXLMI1RZwYZmpEcNgpZ_F2Kit3rV5peMxEz2ldw","/ip6/fd9f:3dd0:6bc2:0:1e3e:6614:da82:dc6b/tcp/4001","/ip6/2a00:da00:1800:103::2/udp/4001/quic-v1/p2p/12D3KooWRgWYDt7QHvcETkN6YR3BUzoNGuo4pZNKPpXDH5RsKUaM/p2p-circuit","/ip4/192.168.1.140/udp/4001/quic-v1/webtransport/certhash/uEiAyim-vGUCGwqt1zJhFMyiqK-AgfZ16jfepJYNDY7NEDw/certhash/uEiAJKSgEXLMI1RZwYZmpEcNgpZ_F2Kit3rV5peMxEz2ldw","/ip4/192.168.1.140/udp/4001/quic","/ip6/fd9f:3dd0:6bc2:0:bf9d:49af:51d9:2d17/udp/4001/quic-v1","/ip4/23.94.202.252/udp/4001/quic-v1/webtransport/certhash/uEiAEKl96gHrjYZrePVozMNgmcVKWPmZRAsFcgTtvf6Ww0w/certhash/uEiDNw97_EHVQ_kGhivLgd1r4yXvdBcX0TORgz7we2xi5XQ/p2p/12D3KooWHwwULwN7WjMCy85ZQZgACiRv6o42Yp3WSiGFTaTgGr1o/p2p-circuit","/ip4/23.94.202.252/udp/4001/quic-v1/p2p/12D3KooWHwwULwN7WjMCy85ZQZgACiRv6o42Yp3WSiGFTaTgGr1o/p2p-circuit"],"ID":"12D3KooWNfTW176i7oAEyY9yQQfSnfvyjFH9ytjBAh1rQxpFmkon","Schema":"peer"} If I add a query param to the url to bust the cache, I get the following:
However, someguy still returns private IPs:
Removing the I suspect that this bug might be related to how ndjson responses are streamed. |
Current situation
There are two scenarios in which someguy could filter out responses to reduce traffic and ensure higher success rates of clients relying on this:
Scenario one
The delegated providers endpoint contains a provider record with only private IPs or no addresses at all.
For example source had:
Or
Suggestion:
These provider record should not be returned, i.e. filtered out
scenario 2
The delegated providers endpoint contains a provider record with some private/loopback addrs and some public ones, e.g.
Suggestion
Filter out the private IPs addresses in the Addrs array, i.e. all addresses except for
/ip4/84.158.140.90/udp/4001/quic-v1
should be filtered out.The text was updated successfully, but these errors were encountered: