waku_client.nim's adapter procs (copying logos_core_client's MerkleNode/
ExternalMerkleProof into the plugin's namesakes) are now trivial — the
types are unified via re-export. Collapse to direct callback assignments.
Replaces the duplicated watcher proc body with a single call to the
new gifter-client helper. Net change: 38-line inline watcher -> 10
lines invoking the helper. Bumps vendor/nwaku for the helper itself.
src/chat/delivery/waku_client.nim:
- After the gifter-client returns its optimistic leaf_index, spawn a
background watcher that polls the gifter's new membership-status
RPC (short-lived libp2p streams on /logos/rln/membership/status/
1.0.0) until the on-chain membership PDA materialises for our id.
If the authoritative leaf differs from the optimistic snapshot, the
watcher rewrites lezGm.membershipIndex. The OnchainLEZGroupManager's
poll loop picks up the corrected proof on its next iteration;
spam_protection's self-verify rejects bad proofs until then.
vendor/nwaku bump pulls in:
- New /logos/rln/membership/status/1.0.0 codec + handlers on the
gifter server.
- MembershipStatusRequest/Response RPC messages.
- WakuRlnGifterClient.queryMembershipStatus.
- Mix-node gifter-client watcher with the same pattern.
Replaces the blind 30s post-RLN-ready sleep in sendBytes with a
poll-based wait: capture our cachedProof's merkle root, then wait
until it has been present in our own rootTracker for ≥2 poll cycles
(cap 180s, warn-and-publish on cap). Adaptive to the underlying
chain's block cadence — solves the testnet RLN root-drift race
where a 30-42s sleep wasn't enough for mix-node verifiers to poll
the post-registration root, so proofs failed with
"Spam protection proof verification failed" at mix entry.
Non-OnchainLEZ group managers retain the 30s fallback.
Bumps vendor/nwaku to pick up the OnchainLEZGroupManager.proofRoot +
getPollInterval accessors this gate uses.
Also drops the deprecated logos-cpp-sdk override on the nix-fetched
LOGOSCORE: overriding the SDK breaks liblogos 7df6195's source
(stale requestObject/onEvent shape). Plugins via logos-module-builder
ship the newer SDK and are ABI-compatible with the native build.
Updates the chat-side gifter caller in waku_client.nim to the new
MembershipAllocationRequest / MembershipAllocationSuccess types:
* identity commitment is sent as bytes (not hex string)
* authentication_type='eth-allowlist' is set explicitly when signing
* rate limit is passed as proto3 optional
* configAccountId is read off success.configAccountId (the LEZ extension)
Bumps vendor/nwaku and vendor/logos-lez-rln to pull in the spec-aligned
wire format on both the gifter server and the auto-registering mix-node
client paths.
Wires the existing mix_lez_chat simulation to drive the gifter's
EIP-191 allowlist auth path end-to-end:
* bumps vendor/nwaku and vendor/logos-lez-rln (and, transitively,
logos-delivery-module and its bundled logos-delivery copy) to pick up
the auth plugin, the auto-registering client's EIP-191 signing, and
the new --mix-gifter-allowlist / --mix-gifter-auth-key CLI flags.
* adds a `gifterAuthKey` knob on WakuConfig + the JSON config bridge in
client_api so chat sender/receiver instances sign their gifter
requests too.
* commits 5 fixed test secp256k1 keys (one per non-gifter mix node and
per chat client) under simulations/mix_lez_chat/fixtures/gifter_auth/
along with their derived addresses.
* run_simulation.sh sources keys.env+addresses.env, sets
`mixGifterAllowlist` on mix node 0, and threads the matching
`mixGifterAuthKey` / `gifterAuthKey` into nodes 1-3 and the
receiver/sender configs.
Test fixtures only — keys must never be reused outside this sim.
Integrate logos-chat with the LEZ-backed mix network:
- Update vendor/nwaku to logos-delivery fork (feat/mix-rln-gifter-sim)
with mix protocol, OnchainLEZGroupManager, RLN gifter client, and
mix-rln-spam-protection-plugin
- Add vendor/logos-lez-rln submodule for reproducible LEZ module builds
- Add RLN FFI surface to liblogoschat: chat_set_rln_fetcher,
chat_set_rln_config, chat_push_roots, chat_push_proof, etc.
- Wire gifter client for RLN membership registration via mix network
- Switch to filter-based message reception (relay: false, filter: true)
- Send via lightpushPublish(mixify=true) for Sphinx onion routing
- Add mix-librln separate build + duplicate symbol resolution
- Exclude vendor/logos-lez-rln from nimble link creation
- Update nix build for mix-librln and cross-platform support
* chore: add smoke test and redesign CI workflow (#62)
Add a smoke test that validates the binary links all dependencies
at runtime by instantiating a client without networking. Redesign
CI into separate build and test jobs, with test gated on build.
* Add libchat module
* Add Context
* Add libchat
* Update to latest libchat
* Remove stale files
* Bump to latest Libchat
* Update imports
* Update client
* Update library to work with Libchat
* Fix examples
* Remove Tui Examples - Replace with logos-core
* Add Indentity Todo
* fix: add `build-libchat` as dependency for examples, tests, and library (#59)
The Rust liblogos_chat.so was not being built automatically, causing
runtime failures when loading the shared library.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add Todo for Sender data
* Updated error log
---------
Co-authored-by: osmaczko <33099791+osmaczko@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>