7 Commits

Author SHA1 Message Date
Prem Chaitanya Prathi
4365df4b56
fixup(mix): address PR #3807 review + sim alignment
- waku/waku_mix/protocol.nim: drop the magic-2 cover-traffic fallback
  and the hardcoded 10s epoch. Source cover-traffic totalSlots and
  epochDuration from spamProtectionConfig when RLN is on (so cover
  emission can't outpace proof minting), and from named waku
  constants (WakuCoverTrafficTotalSlots=40, WakuCoverTrafficEpochDuration=60s,
  ~10 emissions/min/node) when RLN is disabled. Single ConstantRate
  CoverTraffic.new call site at the end of the block; the if/else
  only sets up spam protection. Addresses PR review comment on
  protocol.nim line 102.
- waku.nimble: bump mix-rln plugin to 8ec5dc24 (latest on
  feat/cover-traffic-epoch-support: messageId guard + drift-corrected
  epoch timer) and pin nim-lsquic to #6d2bc489 (v0.2.0) so libp2p
  1.15.3's certificate_ffi keeps finding EVP_PKEY in lsquic_ffi.nim.
- waku/common/option_shims: explain in a header comment that the file
  exists because libp2p 1.15.3 dropped Option[T] overloads of
  valueOr/withValue from libp2p/utility; can be removed once those are
  restored upstream. Addresses PR review comment.
- simulations/mixnet/setup_credentials: drop the unused
  SpammerUserMessageLimit constant (the "Higher" comment was wrong
  since 3 < DefaultUserMessageLimit=4, and zerokit blocks proof-gen
  past the per-user limit anyway, so it could never simulate a
  spammer). Addresses PR review comment.
- simulations/mixnet/run_chat_mix{,1}.sh: pass --rln-user-message-limit=4
  so the chat client's RLN budget matches the keystores baked at
  limit=4, otherwise cover-traffic totalSlots vs RLN-budget mismatch
  jams the sim.

Sim verified end-to-end:
  - RLN-on (default sim config): PASS, ≥2 proof-verified per node,
    cover-traffic metrics non-zero.
  - RLN-off (mix nodes only, ad-hoc config): cover-traffic emits at
    ~13/min/node from the new waku defaults (target ~10/min); the
    no-RLN code path is exercised correctly.
2026-06-05 12:34:08 +05:30
Prem Chaitanya Prathi
d8e6dcef22
feat(mix): integrate mix protocol with extended kademlia + RLN spam protection
Rebased poc/mix-spam-protection onto origin/master. Bundles:

- Extended kademlia discovery integration for mix node pool
  (waku/discovery/waku_kademlia.nim, tools/confutils/cli_args.nim)
- RLN spam protection plugin (vacp2p/mix-rln-spam-protection) wired in:
  WakuMix gains mixRlnSpamProtection + publishMessage callback,
  per-hop proof generation / verification, membership coordination
  via /mix/rln/metadata/v1 content topic
- chat2mix sim app: filter-subscribes to spam-protection coordination
  topic, defers publishing until mix node pool is populated
- Makefile: automated librln_mix_v2.0.0.a build via
  scripts/build_rln_mix.sh and mix-librln target
- simulations/mixnet: 5-node mixnet sim infrastructure
  (config1-4.toml, run_*.sh, build_setup.sh, setup_credentials.nim,
  README, roundtrip_check.sh automated round-trip verification)

Rebase fixes:
- Plugin previously vendored as submodule; now a nimble requires entry
  pinned to logos-co/mix-rln-spam-protection-plugin@037f8e10
- waku.nimble: zlib < 0.2 pin to keep nimble lock resolution stable
  (upstream zlib HEAD bumped to 0.2.0)
- apps/chat2mix/config_chat2mix.nim: replace
  `defaultValue: parseIpAddress("...")` with IpAddress literal,
  works around confutils macro generating
  `defaultValueHelpName(): string {.raises: [].}` that violates the
  raises pragma when stringifying a parseIpAddress call
- config.nims: nimble setup --noNimblePath reordering

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 16:53:05 +05:30
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
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
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