Prem Chaitanya Prathi
eea07b1d47
feat(mix): adaptive service-peer discovery top-up via broker
...
Add a generic runServicePeerTopUp loop in waku_node that, while a service's provider count is below target, pulls more peers through the ServicePeersRequest broker; wired for mix in WakuNode.start(). Move the ServicePeersRequest provider registration into the startProvidersAndListeners/stopProvidersAndListeners lifecycle (gated on kademlia) so chat2mix gets it too, keeping WakuKademlia generic. Also fix pre-existing chat2mix build errors (toHashSet, valueOr, std/sets import).
2026-06-22 14:20:58 +05:30
Prem Chaitanya Prathi
bd65c116bb
feat(mix): DoS protection + libp2p v2.0.0 + stateless RLN + tests (rebased onto #3935 )
...
Squash of 13 commits from feat/mix-dos-protection-libp2p-v2.0.0 onto the
logos_delivery/ folder-restructure base from #3935 (build-messaging-folder).
Original commit history (squashed):
- d8e6dcef feat(mix): integrate mix protocol with extended kademlia + RLN spam protection
- fb72f18d refactor(mix): split DoS-protection self-registration into background retry
- d8bbef0c feat(mix): bump libp2p stack to v2.0.0 + adopt stateless RLN spam protection
- 2f24448a fix(tests): use HmacDrbgContext.new() instead of crypto.newRng()
- 5a21455c fix(ci): regen nimble.lock for v2.0.0 + disambiguate rng in wakucore
- 03ef02a2 fix(tests): wrap HmacDrbgContext via newBearSslRng for libp2p v2.0.0
- 167ab1df fix(nix): regenerate deps.nix from updated nimble.lock
- 97a27222 fix(tests): wrap or pass Rng correctly for 3-arg PrivateKey.random
- 5561fcb5 fix(tests): replace removed newStandardSwitch with SwitchBuilder
- ba39ee4a fix(tests): libp2p v2.0.0 API migrations across test suite
- 328e11df fix: gitignore test binaries + remove accidentally-committed binary
- cc712444 fix(tests): more v2.0.0 API migrations (rng template, PeerId.random, etc.)
- 412d97a9 fix(tests): unblock CI — nph, excise orphan waku_noise, complete v2.0.0 Rng migration
Conflict resolutions (#3935 → ours):
- 11 import-path migrations: waku/X → logos_delivery/waku/X
- waku_node/waku_node/relay.nim: dropped our `registerRelayHandler` proc
(relocated to subscription_manager.nim by #3935 ; see cascade fix below)
- factory/builder.nim: combined both sides' new imports (net_config + waku_switch)
- factory/conf_builder/mix_conf_builder.nim: libp2p_mix package (not libp2p/protocols/mix)
- waku_mix/protocol.nim: combined paths + our mix_rln_spam_protection/relay/nimchronos imports
- 3 test files: dropped noise_utils import (replicates noise excision from original PR)
- 2 UA file moves: option_shims.nim and waku_mix_coordination.nim added at new paths
Cascade fixes (#3935 lost our work, restored):
- subscription_manager.nim: added `mixHandler` to #3935 's `registerRelayHandler`,
and added `waku_mix` to its imports. Without this, mix messages were silently
dropped from the relay handler chain.
- config.nims: option_shims auto-import path migrated to logos_delivery/...
Validation:
- nph check on all 82 staged .nim files: clean (0 reformats needed)
- wakunode2 build: exit 0, 38 MB binary
- (sim PASS confirmed in earlier identical-state run: 5/5 mix init,
5 RLN proofs gen/verify, 0 errors)
Backup tag at original tip: backup/3931-pre-3935-rebase (412d97a9).
2026-06-22 14:20:58 +05:30
Simon-Pierre Vivier
a73035e28d
feat: integrate service discovery ( #3947 )
...
---------
Co-authored-by: Fabiana Cecin <fabiana@waku.org>
2026-06-18 12:51:27 -04:00
Fabiana Cecin
6837ae0c1f
feat: bump nim-libp2p to v2.0.0 ( #3929 )
...
* bump nim-libp2p pin to v2.0.0 tag
* bump json_rpc to v0.6.1, lsquic to v0.5.1, boringssl to v0.0.8 (latest tags)
* add libp2p_mix dep; repoint libp2p/protocols/mix -> libp2p_mix
* pin nimble.lock: websock / protobuf_serialization / npeg / jwt
* Makefile: add -d:libp2p_quic_support
* regenerate nix/deps.nix (adds libp2p_mix, refreshes pins)
* migrate rng ref HmacDrbgContext -> libp2p Rng across prod/channels/tests (interface-only; same DRBG)
* waku_switch: TransportConfig factory; unified 2.0.0 connection limits (withMaxInOut, withMaxConnections); local MaxConnections
* waku_relay/rendezvous/discv5/kademlia: v2.0.0 API (rng, config, ServiceDiscovery rename)
* call Service.setup() on post-build switch services (2.0.0 split setup/start)
* drop libp2p/utils/semaphore -> chronos AsyncSemaphore
* add logos_delivery/waku/compat/option_valueor shim (Option[T] valueOr/withValue, dropped upstream)
* add std/options where a transitive re-export was removed
* add newStandardSwitch shim (libp2p removed it in 2.0.0); mounts yamux+mplex to match prod muxer
* PeerId.random(rng); common.rng()/crypto.newRng(); hoist shared rng (instantiation cleanup)
* update expectations for 2.0.0 defaults: DEFAULT_PROTOCOLS += /ipfs/id/push/1.0.0; agent "nim-libp2p"
* drop relay reboot/reconnect test (asserted a Switch restart capability that is simply not supported)
* fix up a few tests that were flaking on MacOS (libp2p upgrade may have exposed these)
2026-06-15 09:56:15 -03:00
Ivan FB
3b03ca29b1
refactor: introduce proper logos_delivery layers folder structure ( #3935 )
...
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
2026-06-08 13:37:53 +02:00
Darshan
5e262badf7
chore: fixing daily ci ( #3878 )
2026-05-27 23:58:30 +05:30
Fabiana Cecin
614f171626
nim nph 0.7.0 formatting ( #3759 )
2026-03-17 14:15:35 +01:00
Prem Chaitanya Prathi
335600ebcb
feat: waku kademlia integration and mix updates ( #3722 )
...
* feat: integrate mix protocol with extended kademlia discovery
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
2026-02-19 10:26:17 +05:30
Prem Chaitanya Prathi
088e3108c8
use exit==dest approach for mix ( #3642 )
2025-11-22 08:11:05 +05:30
Prem Chaitanya Prathi
b0cd75f4cb
feat: update rendezvous to broadcast and discover WakuPeerRecords ( #3617 )
...
* update rendezvous to work with WakuPeeRecord and use libp2p updated version
* split rendezvous client and service implementation
* mount rendezvous client by default
2025-11-21 23:15:12 +05:30
Fabiana Cecin
7b580dbf39
chore(refactoring): replace some isErr usage with better alternatives ( #3615 )
...
* Closes apply isOkOr || valueOr approach (#1969 )
2025-10-27 14:07:06 -03:00
Prem Chaitanya Prathi
8be45180aa
removing mix repo as dependency and using mix from libp2p repo ( #3632 )
...
* use released version of libp2p 1.14.2
2025-10-23 10:00:11 +05:30
Ivan FB
7e5041d5e1
Move log level from debug to info ( #3622 )
...
* convert all debug logs to info log level
* waku_relay protocol mv notice spammy logs to debug
2025-10-15 10:49:36 +02:00
Fabiana Cecin
4d68e2abd5
chore(refactoring): results lib refactors (mostly replace isOk) ( #3610 )
...
* Changes isOk usage into better patterns with e.g. valueOr / isOkOr
* Some other refactoring included
* This PR partially addresses #1969
2025-10-08 19:14:54 -03:00
Prem Chaitanya Prathi
797370ec80
remove mixPubKey from ENR and provide config param to pass mix nodes statically ( #3587 )
2025-10-08 10:18:54 +05:30
Prem Chaitanya Prathi
7819a6e09a
use ipv4 address only for mix nodes, dogfooding fixes ( #3576 )
2025-10-01 13:12:08 +05:30
Prem Chaitanya Prathi
eb7a3d137a
feat: mix poc ( #3284 )
...
* feat: poc to integrate mix into waku and use lightpush to demonstrate
2025-09-11 20:40:01 +05:30