Picks up logos-rln-module C++ change to extract validRoots from the
same mainData buffer used to build the merkle proofs, embedding them
into each returned proof object as "valid_roots". Eliminates the
two-RPC race where chain state could advance between get_merkle_proofs
and a follow-up get_valid_roots, leaving the proof's root absent from
the polled window.
simulations/mix_lez_chat/run_simulation.sh:
- Strict mix-pool readiness wait: now requires NUM_NODES-1 client
registrations succeeded on the gifter (one per non-gifter mix node)
AND a "Gifter self-registered as mix relay" log line on node0 —
not just GR>=3 which could pass while node0 itself hadn't yet
finished its own membership flow. Lets every mix node actually be
ready to generate forward proofs before sender starts.
- Bumps testnet KADEMLIA_HARD_CAP to 1800s (30 min). Testnet block
times + finality lag put 4 sequential mix-node registrations well
beyond the old 600s ceiling.
vendor/nwaku bump pulls in:
- unified get_merkle_proofs that returns valid_roots atomically;
- self-verify in spam_protection.generateProof;
- ExternalMerkleProof.validRoots field + pollLoop refresh from it;
- proofRoot/getPollInterval accessors on OnchainLEZGroupManager;
- confirmMembershipLeafIndex helper (unused — wiring foundation for a
follow-up background watcher to close the slot-allocation race).
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.
Cascades the chain-wide SDK pin bump (a4bd66c → 1468180b) into:
- simulations/mix_lez_chat/run_simulation.sh: logoscore nix-build
override-input
- vendor/logos-lez-rln submodule pointer
All override-inputs in the build chain now agree on rev 1468180b, which
provides invokeRemoteMethodAsync. Avoids the mixed-rev ABI hazard where
a plugin compiled against one SDK rev would silently segfault against
a libsdk compiled against a different rev.
Picks up the upstream-master rebase + std::promise/future async trampoline
pattern for both chat_module and delivery_module plugins. The Qt thread
is no longer blocked during long-running RLN RPCs (register_member can
take 5-60s on testnet), eliminating cascading QtRO timeouts on unrelated
host CLI commands.
Also pulls in the new hand-written liblogos_rln_module_api.h typed
client header consumed by both plugins.
Nim-side FFI (library/declare_lib.nim) and gifter logic (vendor/nwaku)
unchanged — fix is entirely C++/build-system side.
The on-chain Register submit and the membership-PDA confirmation
poll are now two separate Q_INVOKABLEs (register_member +
is_member_registered) so the RPC thread isn't blocked during the
on-chain wait. The Nim gifter closure owns the confirmation loop
and yields cleanly via async sleepAsync between polls.
Pulls in:
- vendor/logos-lez-rln: rln_ffi_decode_membership FFI helper +
logos_rln_module::register_member idempotency + PDA-appearance
confirmation poll.
- nested logos-delivery + nwaku: gifter closure simplified to a thin
wrapper around the now-robust register_member; gifter self-register
retry loop removed (the inner FFI handles transient drops via
PDA-appearance polling instead of trusting tx submission).
Net: -120 lines of Nim ad-hoc retry/poll logic, +60 lines of C++
extracted into a single canonical entry point used by all three
register-paths (Nim gifter, chat-module selfRegisterRln, delivery-
module selfRegisterRln).
Pulls in across the chain:
- vendor/logos-lez-rln: FFI alignment with SPEL ConfigState +
4-field Register; canonical testnet deployment seed + slim-mode
artifacts; nested logos-delivery-module bumped for gifter.
- vendor/nwaku: parity gifter self-register + cross-thread fix.
These were ~5 separate "chore: bump X" commits across submodule
revisions during the session; consolidated to one bump that
matches the consolidated feature commits below.
Pulls in two commits that together unblock the public testnet deploy:
- feat(rln-registration): split Initialize into 3 transactions
- build(methods): strip user_elf in R0BF to fit testnet tx-size cap
Verified end-to-end on https://testnet.lez.logos.co/ -- registration
program deploys (422 KB stripped < 511,800 B cap), all three init txs
land within the 32M-cycle session ceiling, full run_setup pipeline
through Step 7 (user account funding) green.
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.
Multi-stage Dockerfile pre-builds all heavy nix dependencies. Runtime
image (~8.5GB) at ghcr.io/adklempner/logos-chat-sim:latest includes
nix store closure + Rust + cargo-risczero/r0vm + system clang.
run_in_docker.sh pulls from GHCR, symlinks pre-built modules, builds
sequencer + run_setup from source (~10 min per run).
Update vendor/logos-lez-rln to a591645 (rebased onto main with
member-expiry merged, single squashed commit).
Add INSTRUCTIONS.md with macOS, Linux (native), and Docker instructions.
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
Add rust-bundle, a single staticlib crate that depends on both libchat
and rln as rlibs. This ensures rustc links Rust std exactly once,
eliminating duplicate symbol errors on all platforms. Nim targets link
against liblogos_chat_bundle.a; Nix uses a bundleDrv instead of
separate libchat and rln derivations.
Reference: https://doc.rust-lang.org/reference/linkage.html#mixed-rust-and-foreign-codebases
* fix: mac build
- fix error: `error: darwin.apple_sdk_11_0 has been removed as it was a legacy compatibility stub`
- fix librln hash
- bumped nim-ffi
* fix: typo
`requires` in the nimble file alone is not sufficient, NBS never calls
`nimble install` or clones URLs from the `requires` block at build time.
The package must be present as a git submodule for NBS to discover and
link it.
Migrating to `nimble install` is a separate task.
* 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>