Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
lightning-trampoline【部署与运维】Trampoline routing: outsource pathfinding to "trampoline" nodes for clients that lack full graph knowledge. Mobile-friendly. Eclair (ACINQ/Phoenix) is the reference deployment; LDK receives and forwards; still unmerged as BOLTs PR #836 (September 2026). USE WHEN: implementing trampoline-aware sender/receiver, evaluating trampoline vs full pathfinding…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Mobile / light Lightning clients can't sync the full public channel graph efficiently (~32,700 public channels, mempool.space, 30 August 2026). Trampoline lets them target trampoline-capable nodes, which then do their own pathfinding to the destination.
Pathfinding cost, order of magnitude (public graph ~32,700 channels, mempool.space, 30 August 2026):
For battery-constrained mobile, trampoline shifts this to a server.
Sender constructs a 2-layer onion:
When trampoline receives the outer-onion HTLC:
Multi-trampoline: multiple trampoline hops each doing their own pathfinding.
Trampoline node charges:
Sender selects trampolines based on offered service quality + cost.
Sender's onion:
hop 1: trampoline_A
- Trampoline payload (BOLT 4 TLV with type 20 trampoline_onion):
Embedded onion targeting trampoline_B or destination.
hop 2: trampoline_B (if any)
...
Trampoline embedded onion carries the actual onion to the next trampoline (or the final hop).
Still not in the BOLTs: the spec lives in unmerged
lightning/bolts#836
(trampoline_onion_packet TLV 20, feature bits 56/57), open since
January 2021 and still open as of September 2026. The earlier PR #654
("Trampoline Routing") was closed unmerged in 2021.
| Implementation | Trampoline send | Trampoline receive / relay | Feature bits |
|---|---|---|---|
| Eclair | yes | yes (relays for Phoenix) | 148/149 prototype |
| Phoenix | yes (uses ACINQ trampoline) | yes | 148/149 prototype |
| Electrum | yes | yes (endpoint only) | 148/149 + own 150/151 |
| LDK | partial (see below) | yes (receive + forward) | 56/57 (spec PR) |
| CLN | no | no | bit 56 named only |
| LND | no | no | none |
Status as of September 2026 (Eclair v0.14.3, 14 Sep 2026; LDK v0.2.6,
9 Sep 2026, plus main):
trampoline_payment_prototype). Its Features.scala
says outright that this version "does not match the latest spec PR"
and that a parallel version lands once the spec is accepted.TrampolineHop, BlindedTail::trampoline_hops)
exist, but LDK does not advertise trampoline sending.option_trampoline_routing only as a printable name for
bit 56 in common/features.c; there is no OPT_* define and it
advertises nothing. LND has no trampoline code at all.Sender splits a payment into multiple parts; each part can route via
different trampolines. Receiver assembles by payment_secret.
Phoenix wallet uses ACINQ as exclusive trampoline: