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

Routing-v1 gateway endpoint not returning enough information #10195

Closed
3 tasks done
aschmahmann opened this issue Nov 2, 2023 · 2 comments · Fixed by #10337
Closed
3 tasks done

Routing-v1 gateway endpoint not returning enough information #10195

aschmahmann opened this issue Nov 2, 2023 · 2 comments · Fixed by #10337
Assignees
Labels
kind/bug A bug in existing code (including security flaws) status/blocked Unable to be worked further until needs are met

Comments

@aschmahmann
Copy link
Contributor

Checklist

Installation method

ipfs-update or dist.ipfs.tech

Version

❯ ipfs version --all
Kubo version: 0.23.0
Repo version: 15
System version: amd64/windows
Golang version: go1.21.1

Config

No response

Description

When running against a node with "ExposeRoutingAPI": true and otherwise default routing I get less data than I can get by querying the underlying routing sources.

Example:

❯ curl -H "Accept: application/x-ndjson" http://127.0.0.1:8080/routing/v1/providers/bafkreifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4
{"ID":"12D3KooWFkR8nsG5pzffoAfMzmwBcSakXxnogVa6inRxUbpfN5ua","Schema":"peer"}
{"ID":"12D3KooWMqSiDukubKNKrK7J4PaF3mfNnZFVAd3Lh7qj3Y3e5bcN","Schema":"peer"}
{"Addrs":["/ip6/64:ff9b::357:4c09/tcp/4001","/ip4/3.87.76.9/udp/4001/quic","/ip4/3.87.76.9/tcp/4001"],"ID":"QmSaXJRZVyKJNE1tN6hjFtKWSkmfzWWCEzbbnWmu6LJM7h","Schema":"peer"}
{"Addrs":["/ip4/54.237.232.109/tcp/4001","/ip4/54.237.232.109/udp/4001/quic"],"ID":"QmWboxuLjnFvZMErSbuGLZ3VLxZgWKDBX75AV8sZYacQTV","Schema":"peer"}
{"Addrs":["/ip6/64:ff9b::36e2:aa17/tcp/4001","/ip4/54.226.170.23/udp/4001/quic","/ip4/54.226.170.23/tcp/4001"],"ID":"QmaB2ZWdnsycNJnCCNSY6QWPfXnuiorKJFQaSdTv7V7e31","Schema":"peer"}
{"Addrs":["/ip4/35.171.88.213/tcp/4001","/ip4/35.171.88.213/udp/4001/quic","/ip6/64:ff9b::23ab:58d5/tcp/4001"],"ID":"Qmc6VMicD94JUeJXGFR75y3J1Da6fQsJSLCoU3wMffDSiK","Schema":"peer"}
{"Addrs":["/ip4/15.204.183.212/tcp/4001"],"ID":"12D3KooWB6RAWgcmHAP7TGEGK7utV2ZuqSzX1DNjRa97TtJ7139n","Schema":"peer"}
{"Addrs":["/ip4/141.95.66.35/tcp/4001"],"ID":"12D3KooWNRsVgwCE4jsWS7ZSGjRfkiiSdy5rmtyWvGnCENpevfoZ","Schema":"peer"}
{"Addrs":["/ip4/141.95.66.25/tcp/4001"],"ID":"12D3KooWL5rvBiZBE9NDWYfbCGSTfQpbScQPxDTfutLbVBjUot9R","Schema":"peer"}
{"Addrs":["/ip4/198.244.201.187/tcp/4001"],"ID":"12D3KooWC9L4RjPGgqpzBUBkcVpKjJYofCkC5i5QdQftg1LdsFb2","Schema":"peer"}
{"Addrs":["/ip4/15.204.183.214/tcp/4001"],"ID":"12D3KooWH2m5yQJtQeTbJ3Q4pSuXKgKkrwn282cJrefM5p9bMFEW","Schema":"peer"}
{"ID":"12D3KooWNy2SmgY384B9EHVHdbSkvXEADwxjzd4ejXQqicxWpxxT","Schema":"peer"}
{"Addrs":["/ip4/72.52.65.165/tcp/8888"],"ID":"12D3KooWLirG3i3uZicCBFK4b6oCVwDDc8mZUpuZwGJbLrTLnC7U","Schema":"peer"}
{"Addrs":["/dns4/elastic.dag.house/tcp/443/wss"],"ID":"QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC","Schema":"peer"}
{"Addrs":["/ip4/108.89.91.150/tcp/8888"],"ID":"12D3KooWAEs8Zm3XMaTmk3b1jb9NTJzGE1KYpy4mdPiwiSAo9QJH","Schema":"peer"}
{"Addrs":["/ip4/109.199.233.7/tcp/8888"],"ID":"12D3KooWB6fUFjjLSYcWfM2iAd5ScgknqVP1Dbe6pff4Kqq64CLM","Schema":"peer"}
{"Addrs":["/dns/f010479.twinquasar.io/tcp/8888"],"ID":"12D3KooWDK1TfLegcZ2Gg3aZaZwiRFvL9pUCSYXKXWVznPBBXypZ","Schema":"peer"}
{"Addrs":["/ip4/76.219.232.45/tcp/24888"],"ID":"12D3KooWSoSgVaUvoguDQZu1doytze9RgnnANwJoiLw7KUcAXq8i","Schema":"peer"}
{"Addrs":["/ip4/163.47.51.218/tcp/28131"],"ID":"12D3KooWEfL19QqRGGLraaAYw1XA3dtDdVRYaHt6jymFxcuQo3Zm","Schema":"peer"}
{"Addrs":["/ip4/195.167.147.43/udp/8888/quic","/ip4/195.167.147.43/tcp/8888"],"ID":"12D3KooWK53GAx2g2UUYfJHHjxDbVLeDgGxNMHXDWeJa5KgMhTD2","Schema":"peer"}
{"ID":"12D3KooWFtNWJWT3UgqeGDiyz41zCuoWQ3BUfGRr32i9hNYFR9dr","Schema":"peer"}
{"Addrs":["/ip4/198.244.178.172/tcp/4001"],"ID":"12D3KooWENiDwDCPnbEQKHHsDnSsE5Y3oLyXnxuyhjcCEBK9TvkU","Schema":"peer"}
{"ID":"12D3KooWNWgNz5QSL2D2YxfKcYo6HyEpFuRnW2fRYewrDmjWJECi","Schema":"peer"}

However, when I query cid.contact (doesn't support streaming):

> curl https://cid.contact/routing/v1/providers/bafkreifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4
{"Providers":[{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWM6EzWmykHykwaY5c4Hqb3N5rvQxY5up4bEAzSonSEvHN","Addrs":["/ip4/72.52.65.165/tcp/26101"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgy7IT/MOwcCyUccemaIDnRetumrFaqbLQGv23aPZcRitsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWLirG3i3uZicCBFK4b6oCVwDDc8mZUpuZwGJbLrTLnC7U","Addrs":["/ip4/72.52.65.165/tcp/8888"],"Metadata":"gBI="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC","Addrs":["/dns4/elastic.dag.house/tcp/443/wss"],"Metadata":"gBI="},{"Protocol":"transport-ipfs-gateway-http","Schema":"unknown","ID":"QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp","Addrs":["/dns4/dag.w3s.link/tcp/443/https"],"Metadata":"oBIA"},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSsaFCtzDJUEhLQYDdwoFtdCMqqfk562UMvccFz12kYxU","Addrs":["/ip4/108.89.91.150/tcp/46717"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgy7IT/MOwcCyUccemaIDnRetumrFaqbLQGv23aPZcRitsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWAEs8Zm3XMaTmk3b1jb9NTJzGE1KYpy4mdPiwiSAo9QJH","Addrs":["/ip4/108.89.91.150/tcp/8888"],"Metadata":"gBI="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAguWQTnuQkhG5DluR57GTeH41uc2tYxYcpH0dV2OJifQRsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWB6fUFjjLSYcWfM2iAd5ScgknqVP1Dbe6pff4Kqq64CLM","Addrs":["/ip4/109.199.233.7/tcp/8888"],"Metadata":"gBI="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgRmpe0ImZ7XR5nFsmFQSus5L3FOgMDDHQXFrfFjhSnidsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgwSNQojyrV3+VNBw89Hybo8kkLlEWoBFSkTYX/QXRSztsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgU91/bZqJFVPw1pvzNqU0oKya8Pv7uPIrCMrT1mHdiQhsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAghNs18Mse+b6mNSN5PGePBwsdQ2Do+3Pp60kkAXAJQBFsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgeTUyRa+sHw1MWcbeYxmoR/Q8nai5Vhgx7pcL1lBULgdsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgdUsiEdxwHkkTkiFM6LnPNckEDLTypN3CK1td+pfdFidsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAggKdxg2zdLBECv8NYZon3FNBh0wRzhttFu4qFBRHPwx9sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4","Addrs":["/ip4/109.199.233.7/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgbIgHHAkYiHkdT/QtqoLBijLws7rtenHgGeeo1hZzPi9sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWBwUERBhJPtZ7hg5N3q1DesvJ67xx9RLdSaStBz9Y6Ny8","Addrs":["/dns4/yablufc.ddns.net/tcp/4567"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgBWeRvg/Htvxnq2hfU7+wurEJ0IC6jkSbVrFklb0crA9sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWBwUERBhJPtZ7hg5N3q1DesvJ67xx9RLdSaStBz9Y6Ny8","Addrs":["/dns4/yablufc.ddns.net/tcp/4567"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgLuoFVB3WZSfjJ5gZpmqHGdRqM6X9hYNqhPCSI5wWWQRsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWHKeaNCnYByQUMS2n5PAZ1KZ9xKXqsb4bhpxVJ6bBJg5V","Addrs":["/dns/f010479.twinquasar.io/tcp/42002"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgLuoFVB3WZSfjJ5gZpmqHGdRqM6X9hYNqhPCSI5wWWQRsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWDK1TfLegcZ2Gg3aZaZwiRFvL9pUCSYXKXWVznPBBXypZ","Addrs":["/dns/f010479.twinquasar.io/tcp/8888"],"Metadata":"gBI="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWHEzPJNmo4shWendFFrxDNttYf8DW4eLC7M2JzuXHC1hE","Addrs":["/ip4/212.6.53.91/tcp/24002"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAg08xTYQgoOmPfipGQm5jJSKgRTmzh7ySGjz+aaxCWkRJsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWHEzPJNmo4shWendFFrxDNttYf8DW4eLC7M2JzuXHC1hE","Addrs":["/ip4/212.6.53.91/tcp/24002"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAg3S+DvUE2jCNv/OPdAMv24tJ0qPKBDWGE7gWVscXeMRZsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWEkQFhSUc17MNC4gimbRYakSSCmDiQwMLhcvToh7bsXbN","Addrs":["/ip4/112.216.168.43/tcp/8999"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgwSNQojyrV3+VNBw89Hybo8kkLlEWoBFSkTYX/QXRSztsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9A=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSXEgHSetvDyB6S9xYwKs8ruYNkimUiSrjMvQ7ZkrZWQW","Addrs":["/ip4/213.109.236.18/tcp/0"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgqxzwCSQ/OORzI3kbZQGMntmLqxuhZNdGPscYy5eK2jNsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSXEgHSetvDyB6S9xYwKs8ruYNkimUiSrjMvQ7ZkrZWQW","Addrs":["/ip4/213.109.236.18/tcp/0"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgby7kMrbNGejluYLzuW2/hkONmoe5rAi+bZOXr1XTFCFsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSXEgHSetvDyB6S9xYwKs8ruYNkimUiSrjMvQ7ZkrZWQW","Addrs":["/ip4/213.109.236.18/tcp/0"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgy7IT/MOwcCyUccemaIDnRetumrFaqbLQGv23aPZcRitsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSXEgHSetvDyB6S9xYwKs8ruYNkimUiSrjMvQ7ZkrZWQW","Addrs":["/ip4/213.109.236.18/tcp/0"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgNjnhqwnJ9ypZ691taYzXOAxQnaOjeVGZfcQNsK7U1x5sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWGiYSQSRfyifPkny5n82xrue7ZZBon3M2cVJxeash9doC","Addrs":["/ip4/136.144.57.65/tcp/10211"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgjvagTFNDUD+Ae2U7ofCe1qhM0PLk+EebdWHJtrhz4RdsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9A=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWBwUERBhJPtZ7hg5N3q1DesvJ67xx9RLdSaStBz9Y6Ny8","Addrs":["/dns4/yablufc.ddns.net/tcp/4567"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAg3S+DvUE2jCNv/OPdAMv24tJ0qPKBDWGE7gWVscXeMRZsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys","Addrs":["/ip4/76.219.232.45/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgVFs7U2Qg25T0HbDBoD1m0RpzwK8EzGTpZK5oSJDKmTZsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWSoSgVaUvoguDQZu1doytze9RgnnANwJoiLw7KUcAXq8i","Addrs":["/ip4/76.219.232.45/tcp/24888"],"Metadata":"gBI="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys","Addrs":["/ip4/76.219.232.45/tcp/24001"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgRAscqIBZNdq78Rp2Fudc24hBJ1TMIbb7HhA95rjxgxFsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWM6EzWmykHykwaY5c4Hqb3N5rvQxY5up4bEAzSonSEvHN","Addrs":["/ip4/72.52.65.165/tcp/26101"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgby7kMrbNGejluYLzuW2/hkONmoe5rAi+bZOXr1XTFCFsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWSsaFCtzDJUEhLQYDdwoFtdCMqqfk562UMvccFz12kYxU","Addrs":["/ip4/108.89.91.150/tcp/46717"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgby7kMrbNGejluYLzuW2/hkONmoe5rAi+bZOXr1XTFCFsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWHcDGQUa1NeaTHcV68XQBJxCcRAty2sN8pWcj8xVSCQsy","Addrs":["/ip4/163.47.51.218/tcp/28031"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAg25Tsl3gNI9NWDGMoNxPpn7OZg1XyrnLTPVxRKkIMcA9sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWEfL19QqRGGLraaAYw1XA3dtDdVRYaHt6jymFxcuQo3Zm","Addrs":["/ip4/163.47.51.218/tcp/28131"],"Metadata":"gBI="},{"Protocol":"transport-graphsync-filecoinv1","Schema":"graphsync-filecoinv1","ID":"12D3KooWDtiA9w5c37MnFpGWr2M12m8neoUqDroHEMsJVuf3ELi7","Addrs":["/ip4/195.167.147.43/tcp/9999"],"Metadata":"kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAg25Tsl3gNI9NWDGMoNxPpn7OZg1XyrnLTPVxRKkIMcA9sVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q=="},{"Protocol":"transport-bitswap","Schema":"bitswap","ID":"12D3KooWK53GAx2g2UUYfJHHjxDbVLeDgGxNMHXDWeJa5KgMhTD2","Addrs":["/ip4/195.167.147.43/udp/8888/quic","/ip4/195.167.147.43/tcp/8888"],"Metadata":"gBI="}]}

# This is a mess so, some basics
$provs = curl https://cid.contact/routing/v1/providers/bafkreifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4
❯ $provs | jq -r '[.Providers[] | .["ID"]] | unique | sort'
[
  "12D3KooWAEs8Zm3XMaTmk3b1jb9NTJzGE1KYpy4mdPiwiSAo9QJH",
  "12D3KooWB6fUFjjLSYcWfM2iAd5ScgknqVP1Dbe6pff4Kqq64CLM",
  "12D3KooWBwUERBhJPtZ7hg5N3q1DesvJ67xx9RLdSaStBz9Y6Ny8",
  "12D3KooWDK1TfLegcZ2Gg3aZaZwiRFvL9pUCSYXKXWVznPBBXypZ",
  "12D3KooWDtiA9w5c37MnFpGWr2M12m8neoUqDroHEMsJVuf3ELi7",
  "12D3KooWEfL19QqRGGLraaAYw1XA3dtDdVRYaHt6jymFxcuQo3Zm",
  "12D3KooWEkQFhSUc17MNC4gimbRYakSSCmDiQwMLhcvToh7bsXbN",
  "12D3KooWGiYSQSRfyifPkny5n82xrue7ZZBon3M2cVJxeash9doC",
  "12D3KooWHEzPJNmo4shWendFFrxDNttYf8DW4eLC7M2JzuXHC1hE",
  "12D3KooWHKeaNCnYByQUMS2n5PAZ1KZ9xKXqsb4bhpxVJ6bBJg5V",
  "12D3KooWHcDGQUa1NeaTHcV68XQBJxCcRAty2sN8pWcj8xVSCQsy",
  "12D3KooWK53GAx2g2UUYfJHHjxDbVLeDgGxNMHXDWeJa5KgMhTD2",
  "12D3KooWLirG3i3uZicCBFK4b6oCVwDDc8mZUpuZwGJbLrTLnC7U",
  "12D3KooWM6EzWmykHykwaY5c4Hqb3N5rvQxY5up4bEAzSonSEvHN",
  "12D3KooWNfaZqw9DD7mTkyfzudR3vFT9HcdBnaSNLGcuaANMFTh4",
  "12D3KooWPNbkEgjdBNeaCGpsgCrPRETe4uBZf1ShFXStobdN18ys",
  "12D3KooWSXEgHSetvDyB6S9xYwKs8ruYNkimUiSrjMvQ7ZkrZWQW",
  "12D3KooWSoSgVaUvoguDQZu1doytze9RgnnANwJoiLw7KUcAXq8i",
  "12D3KooWSsaFCtzDJUEhLQYDdwoFtdCMqqfk562UMvccFz12kYxU",
  "QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC",
  "QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp"
]

Note: Some peers like QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp and 12D3KooWEkQFhSUc17MNC4gimbRYakSSCmDiQwMLhcvToh7bsXbN are missing. These peers have return data like:

Protocol : transport-ipfs-gateway-http
Schema   : unknown
ID       : QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp
Addrs    : {/dns4/dag.w3s.link/tcp/443/https}
Metadata : oBIA

Protocol : transport-graphsync-filecoinv1
Schema   : graphsync-filecoinv1
ID       : 12D3KooWSsaFCtzDJUEhLQYDdwoFtdCMqqfk562UMvccFz12kYxU
Addrs    : {/ip4/108.89.91.150/tcp/46717}
Metadata : kBKjaFBpZWNlQ0lE2CpYKAABgeIDkiAgy7IT/MOwcCyUccemaIDnRetumrFaqbLQGv23aPZcRitsVmVyaWZpZWREZWFs9W1GYXN0UmV0cmlldmFs9Q==

Which seems to indicate that some less familiar schemas that might not be helpful to kubo itself (e.g. anything but peer and bitswap) might be getting dropped. This is likely not what's intended when the API is used directly vs when it's been processed inside kubo for its use (i.e. internally kubo should of course drop the routing records it has no use for).

Note: cid.contact may also have some bugs here in both emitting legacy record types and not handling metadata correctly.

@aschmahmann aschmahmann added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Nov 2, 2023
@BigLep BigLep mentioned this issue Nov 9, 2023
11 tasks
@BigLep
Copy link
Contributor

BigLep commented Nov 28, 2023

2023-11-28 conversation: going to get this working in someguy first, then can port it over here to Kubo.

@lidel lidel added status/blocked Unable to be worked further until needs are met and removed need/triage Needs initial labeling and prioritization labels Dec 11, 2023
@lidel
Copy link
Member

lidel commented Feb 8, 2024

Quick status update:

If someone needs a pass-through that does no filtering, that is solved by https://github.com/ipfs-shipyard/someguy, which is deployed at https://delegated-ipfs.dev/routing/v1/ and returns DHT+IPNI(cid.contact) results, and supports streaming responses:

$ curl -H "Accept: application/x-ndjson" https://delegated-ipfs.dev/routing/v1/providers/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi -s | jq

Due to this, this issue is now a lower priority, and there is no ETA when/if Kubo will do the same. I've opened #10337 with a proposal to close this and say filtering is a feature of Kubo. We can always revisit in the future.

lidel added a commit that referenced this issue Feb 8, 2024
hacdias added a commit that referenced this issue Feb 9, 2024
* docs: clarify Gateway.ExposeRoutingAPI

Closes #10195

* Apply suggestions from code review

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Henrique Dias <mail@hacdias.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) status/blocked Unable to be worked further until needs are met
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants