libp2p / hydra-booster

A DHT Indexer node & Peer Router
Other
87 stars 5 forks source link

Hydra nodes forward non bitswap provider records to Kubo nodes #172

Open Jorropo opened 2 years ago

Jorropo commented 2 years ago
$ ipfs dht findprovs bafybeibml5uieyxa5tufngvg7fgwbkwvlsuntwbxgtskoqynbt7wlchmfm | parallel -j32 ipfs id {}
{
    "ID": "12D3KooWSH5uLrYe7XSFpmnQj1NCsoiGeKSRCV7T5xijpX2Po2aT",
    "PublicKey": "CAESIPSTR/o7SFKWn1Xuj6Cic9hjUbHjxPcXHu/eXSoiL5Xo",
    "Addresses": [
        "/ip4/145.40.90.155/tcp/4001/p2p/12D3KooWSH5uLrYe7XSFpmnQj1NCsoiGeKSRCV7T5xijpX2Po2aT",
        "/ip4/145.40.90.155/tcp/4002/ws/p2p/12D3KooWSH5uLrYe7XSFpmnQj1NCsoiGeKSRCV7T5xijpX2Po2aT",
        "/ip6/2604:1380:45e1:2700::d/tcp/4001/p2p/12D3KooWSH5uLrYe7XSFpmnQj1NCsoiGeKSRCV7T5xijpX2Po2aT",
        "/ip6/2604:1380:45e1:2700::d/tcp/4002/ws/p2p/12D3KooWSH5uLrYe7XSFpmnQj1NCsoiGeKSRCV7T5xijpX2Po2aT"
    ],
    "AgentVersion": "go-ipfs/0.13.0-dev/aa5336f",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/floodsub/1.0.0",
        "/ipfs/bitswap",
        "/ipfs/bitswap/1.0.0",
        "/ipfs/bitswap/1.1.0",
        "/ipfs/bitswap/1.2.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/kad/1.0.0",
        "/ipfs/lan/kad/1.0.0",
        "/ipfs/ping/1.0.0",
        "/libp2p/autonat/1.0.0",
        "/libp2p/circuit/relay/0.1.0",
        "/libp2p/circuit/relay/0.2.0/hop",
        "/libp2p/circuit/relay/0.2.0/stop",
        "/libp2p/fetch/0.0.1",
        "/meshsub/1.0.0",
        "/meshsub/1.1.0",
        "/p2p/id/delta/1.0.0",
        "/x/"
    ]
}

Error: no good addresses
{
    "ID": "12D3KooWLDf6KCzeMv16qPRaJsTLKJ5fR523h65iaYSRNfrQy7eU",
    "PublicKey": "CAESIJqMXQzM/L0Gprj3KmrLCFy5wshdwL2+XOtjC1Bs+uAl",
    "Addresses": [
        "/ip4/141.138.64.21/tcp/11337/p2p/12D3KooWLDf6KCzeMv16qPRaJsTLKJ5fR523h65iaYSRNfrQy7eU"
    ],
    "AgentVersion": "lotus-1.15.3-rc2+mainnet+git.ddbcf1fc6",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/fil/datatransfer/1.2.0",
        "/fil/kad/testnetnet/kad/1.0.0",
        "/fil/retrieval/qry/0.0.1",
        "/fil/retrieval/qry/1.0.0",
        "/fil/storage/ask/1.0.1",
        "/fil/storage/ask/1.1.0",
        "/fil/storage/mk/1.0.1",
        "/fil/storage/mk/1.1.0",
        "/fil/storage/status/1.0.1",
        "/fil/storage/status/1.1.0",
        "/floodsub/1.0.0",
        "/ipfs/graphsync/1.0.0",
        "/ipfs/graphsync/2.0.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/ping/1.0.0",
        "/legs/head//indexer/ingest/mainnet/0.0.1",
        "/libp2p/autonat/1.0.0",
        "/meshsub/1.0.0",
        "/meshsub/1.1.0",
        "/p2p/id/delta/1.0.0"
    ]
}

{
    "ID": "12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
    "PublicKey": "CAESIORoCy+MjSEJDmqjJ/G7NCq459kjjx41gxpU1qj1yREk",
    "Addresses": [
        "/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip4/192.168.178.63/tcp/4001/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip4/192.168.178.63/udp/4001/quic/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip4/89.14.204.222/tcp/38789/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip4/89.14.204.222/udp/38789/quic/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip6/::1/tcp/4001/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK",
        "/ip6/::1/udp/4001/quic/p2p/12D3KooWRBy97UB99e3J6hiPesre1MZeuNQvfan4gBziswrRJsNK"
    ],
    "AgentVersion": "go-ipfs/0.13.0/c9d51bbe0",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/ipfs/bitswap",
        "/ipfs/bitswap/1.0.0",
        "/ipfs/bitswap/1.1.0",
        "/ipfs/bitswap/1.2.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/kad/1.0.0",
        "/ipfs/lan/kad/1.0.0",
        "/ipfs/ping/1.0.0",
        "/libp2p/autonat/1.0.0",
        "/libp2p/circuit/relay/0.1.0",
        "/libp2p/circuit/relay/0.2.0/hop",
        "/libp2p/circuit/relay/0.2.0/stop",
        "/libp2p/dcutr",
        "/p2p/id/delta/1.0.0",
        "/x/"
    ]
}

{
    "ID": "12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
    "PublicKey": "CAESICreFMj5TRvD7BcmouPoF8l/m4+OY9mxOnRBLM5o+G3l",
    "Addresses": [
        "/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip4/172.105.8.48/tcp/4001/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip4/172.105.8.48/udp/4001/quic/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip6/2600:3c04::f03c:92ff:feed:761d/tcp/4001/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip6/2600:3c04::f03c:92ff:feed:761d/udp/4001/quic/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip6/::1/tcp/4001/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt",
        "/ip6/::1/udp/4001/quic/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt"
    ],
    "AgentVersion": "go-ipfs/0.11.0/",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/floodsub/1.0.0",
        "/ipfs/bitswap",
        "/ipfs/bitswap/1.0.0",
        "/ipfs/bitswap/1.1.0",
        "/ipfs/bitswap/1.2.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/kad/1.0.0",
        "/ipfs/lan/kad/1.0.0",
        "/ipfs/ping/1.0.0",
        "/libp2p/autonat/1.0.0",
        "/libp2p/circuit/relay/0.1.0",
        "/libp2p/circuit/relay/0.2.0/hop",
        "/libp2p/circuit/relay/0.2.0/stop",
        "/libp2p/fetch/0.0.1",
        "/meshsub/1.0.0",
        "/meshsub/1.1.0",
        "/p2p/id/delta/1.0.0",
        "/x/"
    ]
}

{
    "ID": "12D3KooWAqjDEE3PTqp37YnjznYcTX5j2hu9oXwRa1kpuNAHWPfb",
    "PublicKey": "CAESIA81D5oEiNnPmed9IaxduBTan+ohcE+N0zSxMUtqDu4+",
    "Addresses": [
        "/ip4/145.40.80.135/tcp/10211/p2p/12D3KooWAqjDEE3PTqp37YnjznYcTX5j2hu9oXwRa1kpuNAHWPfb"
    ],
    "AgentVersion": "lotus-1.15.2+mainnet+git.518dc962e",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/fil/datatransfer/1.2.0",
        "/fil/kad/testnetnet/kad/1.0.0",
        "/fil/retrieval/qry/0.0.1",
        "/fil/retrieval/qry/1.0.0",
        "/fil/storage/ask/1.0.1",
        "/fil/storage/ask/1.1.0",
        "/fil/storage/mk/1.0.1",
        "/fil/storage/mk/1.1.0",
        "/fil/storage/status/1.0.1",
        "/fil/storage/status/1.1.0",
        "/floodsub/1.0.0",
        "/ipfs/graphsync/1.0.0",
        "/ipfs/graphsync/2.0.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/ping/1.0.0",
        "/legs/head//indexer/ingest/mainnet/0.0.1",
        "/libp2p/autonat/1.0.0",
        "/meshsub/1.0.0",
        "/meshsub/1.1.0",
        "/p2p/id/delta/1.0.0"
    ]
}

{
    "ID": "12D3KooWQUpdfNYyJNoJZyk6kqfrLePashLL15d6ti8ETdDjYy6d",
    "PublicKey": "CAESINndnFtqdhRyb31C8kbILp1RJmW5/sWY8sgi+QFUWFUe",
    "Addresses": [
        "/ip4/113.29.246.221/tcp/18375/p2p/12D3KooWQUpdfNYyJNoJZyk6kqfrLePashLL15d6ti8ETdDjYy6d"
    ],
    "AgentVersion": "lotus-1.15.2+mainnet+git.518dc962e",
    "ProtocolVersion": "ipfs/0.1.0",
    "Protocols": [
        "/fil/datatransfer/1.2.0",
        "/fil/kad/testnetnet/kad/1.0.0",
        "/fil/retrieval/qry/0.0.1",
        "/fil/retrieval/qry/1.0.0",
        "/fil/storage/ask/1.0.1",
        "/fil/storage/ask/1.1.0",
        "/fil/storage/mk/1.0.1",
        "/fil/storage/mk/1.1.0",
        "/fil/storage/status/1.0.1",
        "/fil/storage/status/1.1.0",
        "/floodsub/1.0.0",
        "/ipfs/graphsync/1.0.0",
        "/ipfs/graphsync/2.0.0",
        "/ipfs/id/1.0.0",
        "/ipfs/id/push/1.0.0",
        "/ipfs/ping/1.0.0",
        "/legs/head//indexer/ingest/mainnet/0.0.1",
        "/libp2p/autonat/1.0.0",
        "/meshsub/1.0.0",
        "/meshsub/1.1.0",
        "/p2p/id/delta/1.0.0"
    ]
}
guseggert commented 2 years ago

What is actionable here? What is the expected behavior?

Jorropo commented 2 years ago

@guseggert the indexer protocol allows to mark which protocols peers support. We should ensure that peers supports bitswap and only return thoses. (as a parameter in reframe ? filter code done in hydras ? other ? idk).

ribasushi commented 2 years ago

@guseggert as @Jorropo pointed out - currently kubo and other IPFS implementations expect the DHT to exclusively contain bitswap-dialable peers. This is starting to become a problem in more and more places as the Filecoin SP community is pushing more and more data into the indexer. Effectively the hydra is now actively poisoning the DHT, filling it up with records that will not respond to requests.

We need to fix this ASAP, it's a structural network concern at this stage.

cc @biglep @aschmahmann @mikeal

BigLep commented 2 years ago

2022-08-12 triage conversation: this isn't as bad as it seems because:

What needs to happen:

  1. Hydras should be deployed using the latest go-delegated-routing. This is covered in https://github.com/libp2p/hydra-booster/issues/162
  2. Ensure we're filtering out non-bitswap providers in the Hydra/client-side
  3. storetheindex should update its reframe endpoint to send all records (graphsync and bitswap).

There's a potential parallel track where reframe findProviders will take hints of what provider records the client wants (e.g., bitswap only). That's a future optimization that we don't have a backlog item right now but also aren't planning to prioritize.