fryorcraken d27db21ba5
fix: do not use waku test fleet as default bootstrap (#2312)
The waku test fleet is unstable and should not be used as boostrap.

The issue is that DNS Discovery looks for "2" nodes and stop there. Meaning that if those "discovered" nodes are not reachable (ie, coming from test suite). js-waku does not connect.
2025-03-20 16:32:27 +01:00

23 lines
593 B
TypeScript

import type { PeerDiscovery } from "@libp2p/interface";
import {
enrTree,
wakuDnsDiscovery,
wakuLocalPeerCacheDiscovery,
wakuPeerExchangeDiscovery
} from "@waku/discovery";
import { type Libp2pComponents, PubsubTopic } from "@waku/interfaces";
export function defaultPeerDiscoveries(
pubsubTopics: PubsubTopic[]
): ((components: Libp2pComponents) => PeerDiscovery)[] {
const dnsEnrTrees = [enrTree["SANDBOX"]];
const discoveries = [
wakuDnsDiscovery(dnsEnrTrees),
wakuLocalPeerCacheDiscovery(),
wakuPeerExchangeDiscovery(pubsubTopics)
];
return discoveries;
}