We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
If I set up my own delegated routing client, gossip sub doesn’t use it to query peers of the pubsub topic. Here is my config
export const pubsubTopicToDhtKey = async (pubsubTopic) => { // pubsub topic dht key used by kubo is a cid of "floodsub:topic" https://github.com/libp2p/go-libp2p-pubsub/blob/3aa9d671aec0f777a7f668ca2b2ceb37218fb6bb/discovery.go#L328 const string = `floodsub:${pubsubTopic}`; // convert string to same cid as kubo https://github.com/libp2p/go-libp2p/blob/024293c77e17794b0dd9dacec3032b4c5a535f64/p2p/discovery/routing/routing.go#L70 const bytes = new TextEncoder().encode(string); const hash = await sha256.digest(bytes); const cidVersion = 1; const multicodec = 0x55; const cid = CID.create(cidVersion, multicodec, hash); return cid.toString(base32); }; const pubsubTopic = "random-topic"; const topicPeersCidInRouter = await pubsubTopicToDhtKey(pubsubTopic); const delegatedRoutingClient = createDelegatedRoutingV1HttpApiClient( "https://myownrouter.com" ); // https://myownrouter.com/routing/v1/providers/<topicPeersCidInRouter> exists and is 200 const helia = await createHelia({ libp2p: { peerId: await getPeerId(), addresses: { listen: [], // Empty for browser environment }, services: { identify: identify(), pubsub: gossipsub(), delegatedRouting0: () => delegatedRoutingClient, }, peerDiscovery: undefined, }, blockstore: new MemoryBlockstore(), blockBrokers: [bitswap()], }); helia.libp2p.services.pubsub.subscribe(pubsubTopic, () => {}); // this never connects to the peers from https://myownrouter.com/routing/v1/providers/<topicPeersCidInRouter> // libp2p is not querying the router for gossip sub peers // no dial or connection attempts are being made
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If I set up my own delegated routing client, gossip sub doesn’t use it to query peers of the pubsub topic. Here is my config
The text was updated successfully, but these errors were encountered: