mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
Bound CLN alias resolution on peers and route lookups (#1501)
RTL resolves peer aliases by calling listnodes once per peer. A prior fix
(1cec7b1) bounded this to 20 concurrent calls plus a cache for the channel
list, but the peers list and route lookup still used an unbounded Promise.all,
firing one request per peer at once. On nodes with many peers this overwhelms
clnrest and fails with 'Resource temporarily unavailable (os error 11)'
(EAGAIN), so aliases fall back to raw node IDs.
- peers.ts and network.ts getRoute now resolve aliases via
runWithConcurrencyLimit(tasks, 20, ...), matching the channel list.
- Harden runWithConcurrencyLimit to call done() immediately for an empty task
list; otherwise an empty peers/route set would never send a response.
- Give the alias cache a 6h TTL and a max size (evicting oldest) so aliases
refresh without an RTL restart and the cache can't grow unbounded.
This commit is contained in:
parent
75dba90fae
commit
fbd336a89b
7 changed files with 68 additions and 13 deletions
|
|
@ -70,6 +70,19 @@ this release should add its entry under the appropriate section below.
|
|||
(WCAG 2.4.3) that produced an inconsistent keyboard order; these were removed so focus follows
|
||||
natural DOM order across the LND, Core Lightning, Eclair and shared modals.
|
||||
|
||||
- **Core Lightning: bound alias resolution on the peers and route lookups to stop clnrest
|
||||
"Resource temporarily unavailable" errors** ([#XXXX](https://github.com/Ride-The-Lightning/RTL/pull/XXXX),
|
||||
fixes [#1501](https://github.com/Ride-The-Lightning/RTL/issues/1501)).
|
||||
RTL resolves peer aliases by calling `listnodes` once per peer. A prior fix bounded this to 20
|
||||
concurrent calls (plus a cache) for the channel list, but the **peers list** and **route lookup**
|
||||
still fired an unbounded `Promise.all` — one request per peer at once — which overwhelms clnrest
|
||||
on nodes with many peers and fails with `Resource temporarily unavailable (os error 11)`
|
||||
(`EAGAIN`), leaving raw node IDs instead of aliases. Both paths now use the same 20-way
|
||||
concurrency limit. The limiter was also hardened to resolve immediately for an empty list (an
|
||||
empty peers/route set would previously never send a response), and the alias cache gained a
|
||||
6-hour TTL and a max size so aliases refresh without an RTL restart and the cache can't grow
|
||||
unbounded.
|
||||
|
||||
## Enhancements
|
||||
|
||||
- **Add a Disable Authentication option**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue