From aeea109fd3b9c775dab5e6c1cac92b412f035a08 Mon Sep 17 00:00:00 2001 From: Arseniy Klempner Date: Thu, 21 May 2026 17:47:51 -0600 Subject: [PATCH] cleanup(08-slop): compress session-narrative comments + bump nwaku --- simulations/mix_lez_chat/run_simulation.sh | 9 ++------- src/chat/delivery/waku_client.nim | 10 +++------- vendor/nwaku | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/simulations/mix_lez_chat/run_simulation.sh b/simulations/mix_lez_chat/run_simulation.sh index 7d59862..d5f6ad6 100755 --- a/simulations/mix_lez_chat/run_simulation.sh +++ b/simulations/mix_lez_chat/run_simulation.sh @@ -435,13 +435,8 @@ done # the kad-peer count is logged only for diagnostics. echo " Waiting for kademlia propagation + RLN convergence..." KADEMLIA_T0=$SECONDS -# Mix circuits drop sphinx packets at any hop whose RLN credentials aren't -# yet confirmed on-chain (Plugin not ready). Wait for ALL mix nodes to be -# fully registered before starting chat: -# - node0 (gifter) self-registers — logs "Gifter self-registered as mix relay" -# - node1..N-1 each register via gifter — node0 logs "RLN gifter -# registration succeeded" once per client. -# Required: 1 self-reg + (NUM_NODES - 1) client regs. +# Block chat startup until every mix hop has RLN credentials confirmed +# on-chain — unregistered hops drop sphinx packets (Plugin not ready). REQUIRED_CLIENT_REGS=$((NUM_NODES - 1)) while true; do ELAPSED=$((SECONDS - KADEMLIA_T0)) diff --git a/src/chat/delivery/waku_client.nim b/src/chat/delivery/waku_client.nim index 8bc554b..ef1a196 100644 --- a/src/chat/delivery/waku_client.nim +++ b/src/chat/delivery/waku_client.nim @@ -431,13 +431,9 @@ proc start*(client: WakuClient) {.async.} = leafIndex = success.leafIndex, configAccount = configAccountId - # Background watcher: gifter returns a PRE-SUBMIT leaf_index snapshot, - # which can be wrong if a concurrent register tx claimed the slot - # first. Poll the gifter over a SEPARATE short-lived libp2p stream - # (membership status codec) until the on-chain membership PDA - # materialises for our id; if the authoritative leaf differs, - # rewrite lezGm.membershipIndex so subsequent proofs are valid. The - # pre-publish self-verify rejects bad proofs in the meantime. + # Correct the optimistic leaf via the status codec if a concurrent + # registration tx beat ours to the slot. Pre-publish self-verify drops + # bad proofs in the meantime. let watcherLezGm = lezGm let watcherConfigAccount = configAccountId asyncSpawn gifterClient.watchMembershipConfirmation( diff --git a/vendor/nwaku b/vendor/nwaku index 618ce26..5e3bbeb 160000 --- a/vendor/nwaku +++ b/vendor/nwaku @@ -1 +1 @@ -Subproject commit 618ce267c0b1587e98808de7840bcad9fdbd5655 +Subproject commit 5e3bbeb499909218ff171d83f2b1c35c26e4ac3c