Chat-side integration of the LEZ-backed RLN mix protocol:
- src/chat/delivery/waku_client.nim: mount waku_mix with onchain
RLN spam protection wired to logos_core_client fetchers; gate
the first publish on (a) gifter status confirmation, (b)
cushion of 2 poll intervals after confirmation, and (c) proof
root stability in the local valid_roots window; wrap mix
lightpush in withTimeout so vanished SURB replies surface as
Err instead of pinning the send coroutine.
- src/chat/client.nim: surface sendBytes errors via asyncSpawn
wrapped try/except instead of discarding the future (was
hiding every mix-publish failure).
- chat-side gifter client invocation (RLN membership service
wire format, EIP-191 ethereum-allowlist auth).
- Background membership status watcher that reconciles the
optimistic leaf returned by the gifter against the chain's
authoritative leaf via the status RPC.
Simulation harness (simulations/mix_lez_chat/):
- Spin up sequencer + run_setup + 4 mix nodes (one of which
runs the gifter service) + chat sender + chat receiver.
- SIM_NETWORK={local,testnet}, SIM_SLIM for testnet (reuses
shipped config_account + cached payment_account), Docker
image + GHCR for cross-platform testing.
- Strict mix-pool readiness gate, kademlia + RLN root activity
checks, gifter EIP-191 auth fixture, slim-mode submodule
minimization.
- TREE_ID_HEX pinned to the canonical testnet deployment.
Submodule bumps:
- vendor/nwaku to 8e6ba04 (LEZ-backed RLN mix + 2-phase gifter).
- vendor/logos-lez-rln to 950f287 (SPEL RLN program + mix sim
infrastructure + canonical testnet deploy).
Docs:
- RUN_SLIM_TESTNET.md: slim sim recipe.
- cleanup/MODE_A_GIFTER_SLOT_BUG.md: per-signer nonce collision
postmortem driving the queue+worker fix.
rust-bundle
A minimal Rust staticlib crate that bundles libchat and rln into a single archive (liblogoschat_rust_bundle.a), suitable for static linking into the Nim application.
Motivation
libchat and rln are both Rust crates. Linking them as separate static archives (.a files) causes duplicate symbol errors at link time, because each archive would embed its own copy of the Rust standard library.
By declaring both as rlib dependencies of a single staticlib crate, rustc resolves and links everything in one pass. The resulting liblogoschat_rust_bundle.a exposes all #[no_mangle] pub extern "C" symbols from both crates without any stdlib duplication.
This approach follows the guidance in the official Rust Reference: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases.
Build
cargo build --release --manifest-path rust-bundle/Cargo.toml
Output: rust-bundle/target/release/liblogoschat_rust_bundle.a
From the project root, use the build-bundle Makefile target, which handles this after building librln from the nwaku vendor tree.
Dependencies
| Crate | Path |
|---|---|
libchat |
vendor/libchat/conversations |
rln |
vendor/nwaku/vendor/zerokit/rln |