You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
payments: an NWC wallet's fast reply is lost because the request is published after the subscription #1099
EVENT goes out before REQ, so the wallet can answer in the window where this client holds no subscription. NIP-47's reply is kind 23195, which is live-forwarded and not stored, so the reply is not delayed for us: it is gone, and the payment call blocks until the request times out.
The window is small but not theoretical: a self-hosted wallet on the same relay is one hop away, and the reply is published the moment the request is decrypted.
What a fix needs
Send request_frame first, then event_frame, then read. A regression test needs a relay double that publishes the reply as soon as it sees the EVENT, and asserts the client's REQ was already registered — a plain ordering assertion on the two frames would pass before the fix if it only checked both were sent.
PR open: #1104 — factory/026-nwc-req-before-event at cce07fb, base rewrite/main.
One round: code PASS, architecture PASS; security/performance/ux/ui stood down with checkable reasons (the production diff is one array literal, one line out and one line in).
Oracle red at base, green at head: left: ["EVENT"] / right: ["REQ", "EVENT"] at tests/nwc_relay.rs:229. The order assertion is the oracle — a tolerant double at base fails only on it, and with it deleted goes green.
The approver met every criterion and escalated on money-access-identity (payments transport); pr-open was authorised with /open_pr_026 (Telegram 792848).
Fixed by #1104, merged as 2c151f2aa4a9460d5f70ca89ee5ccdbf420f62d7 into rewrite/main (true merge of 4adaa42 + cce07fb; tree byte-identical to the reviewed head).
nwc_relay.rs now subscribes to the wallet's notification stream before publishing the request it is waiting on, so a fast reply cannot be sent while the subscription is still being set up. Three files: the processor fix (5/−1), an integration test that drives a fast wallet reply through the relay (120 lines), and a changeset.
Cost: $0.59 actual against $1.50 expected (−61%), one review round, zero resumes.
Activity
chappie-daemon commentedon Nov 10, 2026
PR open: #1104 —
factory/026-nwc-req-before-eventatcce07fb, baserewrite/main.left: ["EVENT"] / right: ["REQ", "EVENT"]attests/nwc_relay.rs:229. The order assertion is the oracle — a tolerant double at base fails only on it, and with it deleted goes green.money-access-identity(payments transport); pr-open was authorised with/open_pr_026(Telegram 792848).handle_exitthen clears #1096, import: an imported kind-5 with onlyatags leaves the article readable #1097, dvm: a worker that closes stdout can no longer be killed #1102, maintenance: a timed-out purge is detached, not stopped, so purges accumulate #1103.This issue stays open: the base is not the repository default branch, so no keyword can close it — it is closed by hand after the merge.
chappie-daemon commentedon Nov 10, 2026
Fixed by #1104, merged as
2c151f2aa4a9460d5f70ca89ee5ccdbf420f62d7intorewrite/main(true merge of4adaa42+cce07fb; tree byte-identical to the reviewed head).nwc_relay.rsnow subscribes to the wallet's notification stream before publishing the request it is waiting on, so a fast reply cannot be sent while the subscription is still being set up. Three files: the processor fix (5/−1), an integration test that drives a fast wallet reply through the relay (120 lines), and a changeset.Cost: $0.59 actual against $1.50 expected (−61%), one review round, zero resumes.