fix(mix): pin logos-delivery clientMode mount + enable clientMode

Bump vendor/nwaku to 4a3db364 (feat/logos-testnetv02-mix) so
mountKademlia skips switch.mount when client=true. Enable clientMode
and disable XPR publish for fleet mix discovery (lookup-only). Link
mix librln in make tests so smoke_test links on Darwin.
This commit is contained in:
Prem Chaitanya Prathi 2026-07-09 18:59:36 +05:30
parent c6a35bf06e
commit 6b4d83a4b6
No known key found for this signature in database
6 changed files with 22 additions and 13 deletions

2
.gitmodules vendored
View File

@ -5,7 +5,7 @@
path = vendor/nwaku
url = https://github.com/logos-messaging/logos-delivery.git
ignore = untracked
branch = feat/cover-traffic
branch = feat/logos-testnetv02-mix
[submodule "vendor/nim-protobuf-serialization"]
path = vendor/nim-protobuf-serialization
url = https://github.com/status-im/nim-protobuf-serialization.git

View File

@ -136,9 +136,11 @@ build-waku-nat:
@echo "Completed building nat-libs"
.PHONY: tests
tests: | build-rust-bundle build-waku-nat logos_chat.nims
# smoke_test / all_tests pull mix + RLN symbols via waku_client; link mix librln
# the same way liblogoschat / examples do (cdylib on Darwin).
tests: | build-rust-bundle build-waku-nat mix-librln logos_chat.nims
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim tests $(NIM_PARAMS) \
$(ENV_SCRIPT) nim tests $(NIM_PARAMS) $(MIX_LIBRLN_NIM_PARAMS) \
--passL:$(RUST_BUNDLE_LIB) --passL:-lm \
logos_chat.nims

View File

@ -26,9 +26,9 @@
};
libchatDrv = pkgs.callPackage ./nix/libchat.nix {};
rustBundleDrv = pkgs.callPackage ./nix/rust_bundle.nix { src = self; };
# efafdfdc2's nwaku consumes its nim deps via nimble (nimbledeps/pkgs2),
# which isn't reproducible in the nix sandbox. Instead fetch them from
# vendor/nwaku's autogenerated deps.nix (mirrors logos-delivery's build).
# vendor/nwaku (logos-delivery) consumes its nim deps via nimble
# (nimbledeps/pkgs2), which isn't reproducible in the nix sandbox.
# Instead fetch them from vendor/nwaku's autogenerated deps.nix.
nwakuDeps = import (self + "/vendor/nwaku/nix/deps.nix") { inherit pkgs; };
in {
packages.default = pkgs.callPackage ./nix/default.nix {

View File

@ -1,7 +1,7 @@
{ lib, stdenv, nim, which, pkg-config, writeScriptBin, fetchurl,
openssl, miniupnpc, libnatpmp, rustPlatform, fetchFromGitHub, darwin ? {},
src, # logos-chat source (self from flake, with submodules=1)
nwakuDeps, # efafdfdc2 nim deps from vendor/nwaku/nix/deps.nix
nwakuDeps, # nim deps from vendor/nwaku/nix/deps.nix (logos-delivery pin)
rustBundleDrv }: # result of rust_bundle.nix
# NOTE: this build requires git submodules to be present in src.
@ -15,8 +15,8 @@ assert lib.assertMsg ((src.submodules or false) == true)
let
revision = lib.substring 0 8 (src.rev or "dirty");
# nwaku (efafdfdc2) nim deps on the path. Drop `ffi` — the chat ships its own
# vendor/nim-ffi (1-arg declareLibrary); nwaku's ffi (2-arg) would clash.
# nwaku (logos-delivery pin) nim deps on the path. Drop `ffi` — the chat ships
# its own vendor/nim-ffi (1-arg declareLibrary); nwaku's ffi (2-arg) would clash.
nwakuDepPaths = lib.concatStringsSep " " (builtins.concatMap
(p: [ "--path:${p}" "--path:${p}/src" ])
(builtins.attrValues (builtins.removeAttrs nwakuDeps [ "ffi" ])));

View File

@ -346,6 +346,13 @@ proc start*(client: WakuClient) {.async.} =
# conf-driven factory that would otherwise auto-mount it (mirrors apps/chat2mix).
# Discovered mix peers land in the peerManager and fill the pool waitForMixPool
# waits on.
#
# Light-client mix discovery: LOOK UP mix providers only.
# - servicesToDiscover = MixProtocolID (find fleet mix nodes)
# - servicesToAdvertise = empty (do NOT advertise as mix)
# - xprPublishing = false (do NOT publish self-signed XPR into the DHT)
# - clientMode = true (no inbound DHT handler / codec; logos-delivery
# mountKademlia skips switch.mount for clientMode as of 4a3db364)
if client.cfg.kadBootstrapNodes.len > 0:
var kadBootstrapPeers: seq[(PeerId, seq[MultiAddress])]
for nodeStr in client.cfg.kadBootstrapNodes:
@ -368,13 +375,13 @@ proc start*(client: WakuClient) {.async.} =
# via maintainBuckets + runServiceLookupLoop + runServicePeerTopUp.
kadDhtConfig: KadDHTConfig.new(disableBootstrapping = true),
discoConfig: sd_types.ServiceDiscoveryConfig.new(),
clientMode: false,
xprPublishing: true,
clientMode: true,
xprPublishing: false,
)
).isOkOr:
error "Failed to mount kademlia mix discovery", error = error
quit(QuitFailure)
info "Kademlia mix discovery mounted",
info "Kademlia mix discovery mounted (clientMode, no XPR/advertise)",
bootstrapPeers = kadBootstrapPeers.len
asyncSpawn client.waitForMixPool()

2
vendor/nwaku vendored

@ -1 +1 @@
Subproject commit efafdfdc24f369942951dd7ceeec37e5913b19eb
Subproject commit 4a3db364e7e90bc7fdfdd1eb7caa30fa7130d220