Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

One chat REQ per trade trips nos.lol's 'too many concurrent REQs'

Open
#523 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
dart, rust

Research direction

Start with resubscribe_active_chats and the subscription helpers in rust/src/api/messages.rs, then read docs/RELAYS.md and the existing bulk kind-14 DM subscription pattern. The issue offers two possible approaches but does not choose between them, so clarify the intended scope before implementing. Done should mean active trade chats no longer exceed the relay's concurrent-REQ limit and refused subscriptions do not silently leave messages unreceived.

Written by the indexing model from the issue text.

Description

area: relays bug priority: medium

Problem

resubscribe_active_chats (rust/src/api/messages.rs ~l. 1569) opens one subscription per trade that can still chat (chat_still_relevant: any non-terminal status with a counterparty), id mostro-chat-<order> (chat_subscription_id). With a few dozen such trades plus mostro-dm, mostro-orders, mostro-orders-recent, mostro-relay-list and the per-trade mostro-daemon-*, the app exceeds nos.lol's concurrent-REQ limit.

Observed

After a seed import, a log report shows ~30 mostro-chat-* subscriptions and, on wss://nos.lol, repeated:

[WARNING] relay: notice relay=wss://nos.lol msg=ERROR: too many concurrent REQs

Any REQ the relay refused does not exist there — peer chat, dispute chat or daemon messages for those trades are silently not received from that relay (live_subs re-issues on connect, not on a NOTICE refusal; see docs/RELAYS.md).

Contributing factor

Rows recovered from history that never reach a terminal status keep a chat REQ open forever. A seller's completion only arrives through the public Kind 38383 success (the daemon sends PurchaseCompleted to the buyer only), so restored seller trades parked at SettledHoldInvoice / Pending qualify as "live" — tracked separately (restored orders shown as in progress).

Options

  • Merge the chat filters into one (or a few) subscriptions: a single REQ whose #p lists every pub(K_conv), replaced through live_subs::replace as trades come and go — the same pattern as the bulk kind-14 DM filter.
  • Treat a too many concurrent REQs NOTICE as a failed REQ and back off / consolidate, rather than assuming it exists.

Related: #182 (subscription lifecycle: leaks and deterministic ids — not the count).

🤖 Generated with Claude Code

Dominant language
Dart
Stars
11
Forks
9
Avg merge
12h 41m
Merged PRs (30d)
265

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MostroP2P/app

All issues in MostroP2P/app

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.