协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
lightning-bolts【开发与工程】BOLT (Basis of Lightning Technology) specification index. Wire format, channel management, onion routing, gossip, invoices, feature bits. Quick refs: BOLT-by-BOLT summary, message-type tables, feature-bit registry. USE WHEN: implementing/reading Lightning protocol, looking up message types, debugging interop between implementations.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Quick refs: bolt-summary.md, feature-bits.md
The Lightning Network's specs live in github.com/lightning/bolts.
There are 11 numbered BOLTs plus several "BLIPs" (BOLT improvement
proposals) for in-progress extensions.
| BOLT | Title |
|---|---|
| 1 | Base Protocol — wire format, init, ping, error |
| 2 | Peer Protocol — channel open/close/update |
| 3 | Bitcoin Transaction and Script Formats — funding, commitment, HTLC, anchor |
| 4 | Onion Routing Protocol — Sphinx packet, payment forwarding |
| 5 | Recommendations for On-chain Transaction Handling |
| 7 | P2P Node and Channel Discovery — gossip |
| 8 | Encrypted and Authenticated Transport — Noise XK handshake |
| 9 | Assigned Feature Flags — feature bit registry |
| 10 | DNS Bootstrap and Assisted Node Location (deprecated) |
| 11 | Invoice Protocol — BOLT11 |
| 12 | Flexible Protocol for Lightning Payments — BOLT12 offers |
Lightning's wire protocol is append-only with feature bits:
Merge dates below are commits on lightning/bolts master, read at repo
HEAD 1528972 (2026-08-26) in September 2026.
option_anchor_outputs (20/21) and renamed the
zero-fee-HTLC variant at 22/23 to option_anchors.closing_complete / closing_sig, merged 2025-02-12.update_fail_htlc / update_fulfill_htlc, merged 2025-11-14;
fulfillment_payload added 2026-07-27 (#1344) and return fields capped
at 32 KiB 2026-08-26 (#1349).bolt-simple-taproot.md (#995), outside the numbered
BOLTs; a staging variant sits at 180/181.offer_id on invoice notifications and a createproof RPC for
BOLT 12 payer proofs). LND carries BOLT 12 code but its release notes
through v0.21 announce no offers support as of September 2026.ldk-node v0.7.0 (2025-12-03) added serving and paying static
invoices, and LDK's "Async Payments: Getting Paid While Your Node Is
Offline" (2026-06-26) still labels it beta — the sender-side HTLC hold
is unmerged and the flow is LDK-to-LDK only. It is unrelated to
trampoline routing.| Feature | LND | CLN | LDK | Eclair |
|---|---|---|---|---|
| Static channels (legacy) | yes | yes | yes | no |
| Anchor commitment | yes | yes | yes | yes |
| Dual-funded | no | yes | partial | yes |
| MPP / AMP | yes | yes | yes | yes |
| Trampoline | no | no | partial | yes |
| BOLT12 offers | partial | yes | yes | yes |
| Taproot channels (80/81) | yes | no | no | yes |
| Splicing | no | yes | yes | yes |
(Status as of September 2026. Each column was read off the project's own
feature registry on master — lnwire/features.go (lnd v0.21.3-beta,
2026-09-02), common/features.c (CLN v26.06.7, 2026-08-28),
lightning-types/src/features.rs (rust-lightning v0.2.6, 2026-09-09) and
Features.scala (Eclair v0.14.3, 2026-09-14) — plus ldk-node v0.7.0 for
what LDK ships end to end. Notes on individual rows: lnd defines no
option_dual_fund (28/29) bit at all, so it has no dual funding, while
LDK gates its own behind enable_dual_funded_channels; Eclair v0.14.0
removed support for non-anchor channels; trampoline is still an unmerged
BOLTs proposal, PR #836 (bits 56/57), with rust-lightning defining
Trampoline at those bits and handling receives (#3670, merged
2025-03-28), Eclair advertising only its own pre-spec
trampoline_payment_prototype at 148/149, and neither lnd nor CLN
defining any trampoline bit; lnd v0.21.0 (2026-06-05) shipped
production simple taproot channels at bits 80/81 and describes splice
work as groundwork only — v0.21.3-beta defines no option_splice
(62/63) bit and exposes no splice RPC; CLN lists OPT_SPLICE (62) and
enabled splicing by default in v26.04 (2026-04-20) but has no taproot
option; rust-lightning has shipped splicing since v0.2 (2025-12-03),
with SplicePrototype realigned onto bit 63 in v0.2.2 (2026-02-06) to
match Eclair; LDK's only Taproot feature is bit 31 option_taproot,
not simple taproot channels. Check current docs for latest.)
Lightning has test vector files (bolt03-tx-test-vectors.json,
bolt04-onion-test-vectors.json, etc.) that all impls verify
against. Used as part of CI.
For new implementers: