算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
lightning-taproot-channels【设计与创意】Simple Taproot Channels (feature bits 80/81): MuSig2-aggregated funding output, Tapscript commitment leaves, taproot-native HTLCs. USE WHEN: enabling taproot channels in your impl, evaluating cooperative-spend privacy gains, designing taproot HTLC scripts.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Replaces the legacy 2-of-2 P2WSH funding output with a P2TR + MuSig2 aggregated key. Cooperative spends (the common case) are indistinguishable from single-sig outputs on chain.
Status: the extension BOLT bolt-simple-taproot.md was merged into
lightning/bolts on 2026-05-04 (PR #995), so the scripts and feature
bits are final. Taproot channels still cannot be announced on the
public network — that needs the separate taproot gossip extension
(lightning/bolts#1059), still an open draft as of September 2026 — so
every taproot channel today is a private (unannounced) one.
Pre-taproot:
P2WSH(MULTI 2 <pk1> <pk2> 2 CHECKMULTISIG)
Taproot channel:
P2TR(MuSig2(pk1, pk2))
Both parties run MuSig2 KeyAgg → single 32-byte x-only pubkey, which is the Taproot output key (potentially with empty taptree, or with emergency-script leaf).
Outputs:
to_local — Tapscript with revocation + delay.to_remote — simple P2TR(remote_static_pubkey) — looks like
single-sig!to_local_anchor / to_remote_anchor — small-value Taproot.Cooperative close in taproot channels:
closing_complete and rotating
the closee's nonce in closing_sig per iteration.| Tx type | Pre-taproot | Taproot channel |
|---|---|---|
| Funding tx | P2WSH 2-of-2 (visible) | P2TR (looks single-sig) |
| Cooperative close | P2WSH spend (visible script) | P2TR keypath spend (single-sig look) |
| Force close | P2WSH commitment | P2TR keypath spend, Tapscript only on revealed branch |
Force-close with Tapscript reveals the script branch used; the other branches stay private.
HTLC offered (Tapscript leaf):
<remote_htlc_pk> CHECKSIG
<local_htlc_pk> CHECKSIGADD 2 NUMEQUAL ; 2-of-2
HASH160 <RIPEMD160(payment_hash)> EQUALVERIFY CHECKSIG
Simpler than legacy because:
OP_CHECKSIGADD cleaner than OP_CHECKMULTISIG.Each party generates:
funding_pubkey (will be aggregated via MuSig2).revocation_basepoint, delayed_payment_basepoint, htlc_basepoint,
payment_basepoint (per-commitment-derivation basepoints).MuSig2 KeyAgg of funding_pubkey_local + funding_pubkey_remote →
funding output key.
option_simple_taproot (bits 80/81) negotiated in init. The bits are
defined in the extension BOLT bolt-simple-taproot.md, not in BOLT 9;
option_simple_taproot_staging (180/181, the +100 staging pair) is the
pre-finalization variant older deployments still speak. If only one
side supports, channel falls back to legacy.
The feature bit is also a defined channel type. The spec says it
SHOULD only be used with explicit channel negotiation — it cannot be
an interchangeable default, because open_channel for this type MUST
NOT set the announce_channel bit.
| Implementation | Status |
|---|---|
| LND | Production — v0.21.0-beta (June 2026), final scripts, bits 80/81 |
| Eclair | Production — v0.14.0 (May 2026), final spec, LND-interoperable |
| CLN | No support — common/features.c on master has no taproot entry |
| LDK | No simple-taproot channels shipped — main still carries only the older option_taproot (bit 30/31) feature definition |
LND requires the type explicitly; bare taproot now means the
production variant, taproot-staging opens the staging variant and
taproot-final is a deprecated alias:
lncli openchannel --channel_type=taproot ...
Eclair enables the feature by default (disable with
eclair.features.option_simple_taproot = disabled) and opens with:
eclair-cli open --channelType=simple_taproot_channel --announceChannel=false ...