Closed fryorcraken closed 1 year ago
See for (1) how railgun currently uses the API:
const bootstrapNodes = getPredefinedBootstrapNodes(fleet, 2);
const peers = [...new Set([...bootstrapNodes, ...this.directPeers])];
const waku: Waku = await createRelayNode({
libp2p: {
peerDiscovery: [bootstrap({ list: peers })],
},
});
Update: TODOs 1-3 have been addressed. TODO 4 is blocked by https://github.com/waku-org/js-waku/issues/1309#issuecomment-1567175094 TODO5 is to be done post TODO4.
Is it now possible to easily pass wakuv2.test + wakuv2.prod entrees + some static multaddrs? IF so, how?
Above has been resolved;
Blocked by https://github.com/libp2p/js-libp2p/issues/1904 and https://github.com/waku-org/js-waku/issues/1415
Is it now possible to easily pass wakuv2.test + wakuv2.prod entrees + some static multaddrs? IF so, how?
@danisharora099 I'd like this to be documented in docs.waku.org to encourage developers to run their own node while still being part of the public network. Can you point to a test or snippet that demonstrates it so we can add it to the docs? cc @LordGhostX
Is it now possible to easily pass wakuv2.test + wakuv2.prod entrees + some static multaddrs? IF so, how?
@danisharora099 I'd like this to be documented in docs.waku.org to encourage developers to run their own node while still being part of the public network. Can you point to a test or snippet that demonstrates it so we can add it to the docs? cc @LordGhostX
Apologies for delay in the response, missed this message.
Yes, it is already possible to do pass multiple enrtrees + static multiaddrs as follows:
waku = await createLightNode({
libp2p: {
peerDiscovery: [
bootstrap({ list: [multiAddrWithId.toString()] }),
wakuDnsDiscovery(
[enrTree["PROD"], enrTree["TEST"]],
NODE_REQUIREMENTS,
),
],
},
});
I would suggest to remove point (5) from here and track it under ~https://github.com/waku-org/js-waku/issues/914~ https://github.com/waku-org/js-waku/issues/1463 instead.
Also note that for (5) see https://github.com/waku-org/js-waku/issues/914#issuecomment-1668882251
I would suggest to remove point (5) from here and track it under ~#914~ #1463 instead.
Also note that for (5) see #914 (comment)
Sounds good, thanks. Marking this issue as complete for now.
Future work to be tracked with the above mentioned issues.
This is a feature request
Problem
The reported problem is that js-waku fails to connect to nodes in the wakuv2.prod fleet. This is because some nodes have reached maximum connection number (confirmed, 150 connection for wakuv2.prod and 300 for wakuv2.test, all maxed out).
Currently, RAILGUN tries to use wakuv2.prod, if it fails, it tries to wakuv2.test. They also run their own nwaku node, ensure yet how they pass this.
Proposed Solution
maxBootstrapPeerAllowed
. Note that this is not the observed behaviour. Reproducible with https://examples.waku.org/relay-js/. Once fixed, we may want to cap the number of peers we dial in parallel: https://github.com/waku-org/js-waku/pull/13805. Persist peers/peer store in browser local storage so that at next start, it tries first to connect to known peers (retrieved via peer exchange) instead of bootstrap, still using bootstrap at backup.https://github.com/waku-org/js-waku-examples/pull/262Will be tackled with https://github.com/waku-org/js-waku/issues/1463Notes
(4) Need to be careful with usage of peer exchange as we do not want the traffic to spill over the Status fleet. The Status fleet will be moved to separate sharded pubsub topics, so peer management on nwaku side needs to ensure that connections to relay nodes that do not subscribes to same topic are dropped.