mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-06-24 12:49:41 +00:00
Tests built on `runNodes` (Store, Filter single-node, etc.) start a single nwaku container and a js-waku LightNode. LightNodes never join the gossipsub mesh, so the nwaku ends up with zero mesh peers on the test topic. After nwaku PR #3669 (Jan 2026) the REST endpoint `POST /relay/v1/auto/messages` now returns HTTP 400 with `NoPeersToPublish` instead of silently succeeding in that state, which causes `ServiceNode.sendMessage()` to return `false` and fails every test that seeds the store via REST publish. That broke ~50/56 of the failing assertions in the nwaku `js-waku-node` CI job and the job has been red on every master run since. Fix the test harness rather than reverting the (correct) nwaku change: - `runNodes` now starts a second relay-only `ServiceNode` chained to the primary via `--staticnode`, subscribed to the same shards/topics. Once the gossipsub mesh GRAFTs, REST publishes on the primary have a real mesh peer and succeed. - The peer's lifecycle is bound to the primary through a new private `companion` field + `setCompanion()` getter; existing `tearDownNodes` calls keep working unchanged. - Add `ServiceNode.waitForMeshPeers(pubsubTopics, {timeoutMs})` polling `/admin/v1/peers/mesh`, called before `runNodes` returns so the first publish doesn't race the heartbeat. Doesn't touch `ServiceNodesFleet` (already multi-node); doesn't address the Filter Multiple-Service-Nodes duplication or Peer Exchange compliance timeouts surfaced in the same run — those are separate bugs.
js-waku
A TypeScript implementation of the Waku v2 protocol.
Documentation
API Documentation can also be generated locally:
git clone https://github.com/waku-org/js-waku.git
cd js-waku
npm install
npm run doc
Using Nix shell
git clone https://github.com/waku-org/js-waku.git
cd js-waku
nix develop
npm install
npm run doc
Bugs, Questions & Features
If you encounter any bug or would like to propose new features, feel free to open an issue.
For general discussion, get help or latest news, join us on Vac Discord or the Waku Telegram Group.
Roadmap
You can track progress on the project board.
Contributing
See CONTRIBUTING.md.
License
Licensed and distributed under either of
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHE-v2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. These files may not be copied, modified, or distributed except according to those terms.
Description
Languages
TypeScript
95.1%
JavaScript
4.6%
Dockerfile
0.1%
Shell
0.1%