什么是 “通道拼接”?

btcstudy2025-08-04 tarihinde yayınlandı2025-08-05 tarihinde güncellendi

作者:Lorenzo

来源:https://www.voltage.cloud/blog/what-is-splicing-lightning-network-how-it-works

什么是 “通道拼接”?

一条闪电支付通道的局限性在于,它的总容量由锁定到这条支付通道的资金数量决定。也就是说,一条通道能够转移的数额最大的单笔支付,其数额不能超过该通道的注资交易的对应输出的数额。你可以把一条闪电通道想象成一个沙漏 —— 里面的沙子可以从一边流向另一边,但如果你要往里面加沙子,那就非打破它不可了。

有时候,这种局限性会导致糟糕的用户体验。同时支持比特币和闪电网络特性的钱包软件需要展示两个独立的余额:一个是链上的比特币余额,另一个是可以通过闪电网络来发送的余额。在引导新用户上手使用的时候,这可能会有些不好理解。

同样地,路由节点也需要重新调控自己的流动性,以持续地服务市场。因为无法向支付通道添加比特币、也无法从中拿出比特币,他们就只能先关闭现有的通道、再开设新的通道;这会产生两笔链上交易(以及相应的手续费),一笔用于关闭通道,另一笔是新通道的注资交易。除此之外,他们还需要存储一些闲置的资金,以备突然出现的需求。

如果不需要中断通道的运行、就能往里面添加资金,岂不是好事?这就是 “通道拼接” 做到的事情:重新调整通道的大小。有了通道拼接,钱包就只需展示一个余额、让终端用户的体验更好。同时,路由节点在需要重新分配流动性时,也不再需要先关闭再开启他们的通道,只需要向现有的闪电通道增加资金,或者从中移出资金。

(译者注:这个过程可以理解为是改变同一条通道的容量,也可以理解为在关闭一条通道的同时开设一条新的通道。他们对 “通道” 的理解侧重点不同:前者将通道理解为两个闪电节点之间的持续通信,后者认为双方在比特币网络中形成的未花费多签名输出就是通道本身。)

通道拼接的工作流程

在深入介绍通道拼接协议之前,请记住,闪电网络中的对等节点是靠相互发送消息来沟通的。这些在闪电网络中流动的数据包裹包含了关于节点想要实现的目标的信息。在接下来的段落中,我们就会介绍相关的信息。

从抽象的角度看,通道拼接是非常简单的:参与一条通道的双方需要签名一笔交易,花费通道的注资交易、将资金转移到一个新的 2-of-2 多签名输出中;在此过程中,可以为通道增加资金,也可以从通道中移出一部分资金。难的地方在于,要协调双方,并且要让整个过程是免信任的。

第一步是让通道进入一种静默模式、让通道暂停在当前的状态、发送 “基础性变更正在发生”(缩写为 “STFU”)的信号。这让双方进入通道拼接的准备状态,保证通道的状态不会在双方构造新的 2-of-2 多签名输出期间发生改变。这是通过让其中一个参与者发送一条 stfu 消息给对方来实现的。如果对方也同意,就会回复一条 stfu 消息。

通道进入 STFU 模式后,其中一方可以通过发送 splice 消息来启动一次拼接;这条消息的作用是表明 TA 想要向通道注入资金,或者从中移出资金。收到消息的另一方如果同意,就会回复一条 splice_ack 消息。

现在,通道参与者们可以开始协商通道拼接。这是通过闪电网络规范中的 “交互式交易构造(interactive tx)” 协议来实现的(“双向注资通道” 也使用同一套协议)。在协商期间,双方互相发送 tx_add_input 消息(给拼接交易添加一个输入)和 tx_add_output 消息(给拼接交易添加一个输出)。在这个过程中,拼接操作的发起方要承担一些义务。

有趣的是,双方都可以添加输入和输出,不论与发起方的拼接目的有没有关系,比如,通过添加输出,可以开启另一条通道;也可以运用另一个输入,实现另一个拼接;也可以把资金移动到别的地方。让其它活动参与拼接交易,本质上是让人们可以节约一些手续费。就相当于别的一些活动搭了一趟顺风车。

协商过程会一直持续,直到双方对最终的交易达成一致、相互发送 tx_complete 消息。此后,他们运用双方原本在通道中的余额、新的输入、新的输出和拼接交易需要支付的手续费总额,计算出新的通道容量和双方的新余额。最后,将新的多签名输出(注资输出)的价值从零数额换成新的通道容量。

splice-tx

上图左边的原来的注资交易 ,右边的是拼接交易;原注资交易中以橙色边框标出的是通道原本的注资输出,它成为拼接交易的输入之一。注意,拼接交易给通道增加了 0.5 BTC 的容量,而且,一个第三方(Charlie)也利用这笔交易来移动资金。

最后,双方都为这笔新交易生成签名,以 tx_signatures 消息发给对方,协商过程可以认为完成了,然后这笔交易就会被双方广播到区块链网络中。从这一刻开始,双方可以退出 STFU 模式、继续通道操作。当拼接交易获得 6 次区块确认之后,双方就可以忘记(基于原注资输出的)旧的通道状态,这样可以节约大量存储空间。

退出 STFU 模式之后,双方就可以重新在通道中发送、接收和路由支付。但是,当拼接交易还在等待确认的时候,在更新状态时,双方必须同时对旧的注资输出和新的输出签名(也可以说是同步更新原通道的状态和新通道的状态)。

以下是对整个过程的简化图解:

splice-tx-dynamics

开发和研究

Core Lightning 客户端的开发者 Dusty Daemon 第一个提出了 “通道拼接” 的构想。他在 2021 年公开了这个提议,该提议要改变 BOLT 2、BOLT 7 和 BOLT 9 。Dusty 已经在主网上实现了一次拼接操作。多个闪电网络协议实现都在开发支持技术,包括 CLN 和 Eclair。通道拼接除了能够提升用户体验,还有提高比特币隐私性的潜能,因为拼接交易也可以用作 coinjoin 。你可以在这里了解更多。

Phoenix:第三代的自主保管闪电钱包

最近,Eclair 团队为其闪电节点实现添加了通道拼接技术的一个原型。这让自主保管的闪电钱包 Phoenix 可以退出其第三代版本。现在,Phoenix 不会再根据用户的使用模式创建多条通道;因为通道拼接技术,Phoenix 服务商跟一个用户只会开设一条(大小动态调整的)通道。这就消除了因为开设新通道而带来的流动性分散和不可预测性问题。

采用拼接技术极大地降低了通道管理的成本。此前,Phoenix 会对收款额度(入账流动性)收取 1% 的手续费(并且一次最少要收取 3000 聪)。而现在,获得收款额度的唯一费用就是相关链上交易的确认手续费;这是能够给现有通道 “拼入” 资金的能力的直接觉果。

如前文所提到的,拼接技术消除了链上资金与通道资金的隔阂。用户可以用自己的通道余额直接发起链上交易,无需额外使用互换服务。

最后,这种新技术还让用户能够更好地控制资金、提高可预测性。有了通道拼接,用户不必再为每一笔交易创建一个新通道,而可以将收款 “拼入” 现有的通道。这有助于准确预测闪电支付到来时、用户将要支付多少通道管理(流动性获取)手续费,而且这个手续费可以直接透明地提前显示给用户。

(完)

İlgili Okumalar

Both Suffer Massive Losses Exceeding $90 Billion, Which Is in Greater Peril: Strategy or Bitmine?

Facing massive paper losses exceeding $90 billion each amidst a sharp market downturn, "Digital Asset Treasury" (DAT) giants Strategy and Bitmine find themselves in a precarious position, but with different underlying risks. Strategy, heavily invested in Bitcoin (BTC), faces significant financial strain. Its strategy relies heavily on debt, including convertible notes and preferred stock (STRC) requiring substantial dividend payments. With its cash reserves dwindling and BTC offering no staking yield for cash flow, Strategy's high leverage makes it vulnerable. A continued price decline could force asset sales to meet obligations, potentially creating a negative feedback loop. Its market value has already fallen sharply. In contrast, Bitmine, an Ethereum (ETH) holder, appears on firmer financial ground. It primarily funds its purchases through equity offerings (like ATM programs), avoiding debt pressure. It also generates income by staking a large portion of its ETH holdings. While not immune to market drops and shareholder dilution concerns, Bitmine maintains more flexibility, recently announcing a new preferred share offering to raise further capital. The core divergence lies in their financing: Bitmine uses equity (investor money), while Strategy uses debt (borrowed money). Consequently, Bitmine currently faces less immediate liquidity pressure than Strategy, which must navigate the dual challenge of servicing debt/dividends and a declining core asset (BTC) price.

marsbit5 dk önce

Both Suffer Massive Losses Exceeding $90 Billion, Which Is in Greater Peril: Strategy or Bitmine?

marsbit5 dk önce

Where the AI Bubble Really Is: Which Layer of Players Are Naked

AI Bubble: Where It Really Is and Who's Swimming Naked This analysis dissects the AI industry not as a single entity but as a five-layer pyramid, arguing that bubbles are concentrated in specific tiers, not uniformly distributed. **Key Distinction from the 2000 Dot-com Bubble:** Unlike 2000, where companies had stock prices before revenue, today's leading AI players have massive, contract-backed revenue driving their valuations. Core infrastructure demand is real, with every GPU running at full capacity for paying customers. **The Five-Layer Pyramid & Bubble Assessment:** * **L0 (Fab/Manufacturing) & Top L4 (Leading AI Apps): NO BUBBLE.** Companies like TSMC, NVIDIA, major cloud providers (Microsoft, Google, Meta, Amazon), and top AI labs have real revenues and orders. Supply is tightly constrained by TSMC's disciplined capacity control and physical limits like power/land for data centers, preventing a supply glut. * **L1 (Memory): BATTLEGROUND.** Sky-high HBM margins could signal a new structural cycle or a classic "boom before bust." The oligopoly of three major players may enforce supply discipline, making this a high-stakes bet. * **L2 (Interconnect/Optical Modules): BUBBLE TERRITORY.** Companies like Lumentum and AAOI have seen stock surges (4-10x) far outpacing revenue growth. This hardware segment has lower physical barriers to expansion than fabs, allowing speculation. It mirrors the 2000 bubble's epicenter—optics. * **L3 (Infrastructure/"GPU Landlords"): VULNERABLE.** GPU leasing companies profit from the current compute shortage but own no long-term moat. Their business model relies on a temporary bottleneck that will ease as big tech expands and new tech (e.g., potential space-based data centers) emerges. * **L4 Long Tail (VC-backed Startups): STRONG BUBBLE SIGNALS.** VC funding concentration in AI is twice that of the 1999 peak. Many startups with little revenue use the valuation logic of successful giants to justify their own, creating high risk of a "valuation crunch" when funding dries up. **Critical Risks to Monitor:** 1. **GPU Depreciation & Accounting:** Companies extending the assumed useful life of GPUs artificially boost profits. The true economic life depends on future generational leaps from NVIDIA. 2. **"GPU Credit" & Off-Balance-Sheet Leverage:** Emerging structures where shell companies borrow to buy GPUs and lease them out (with chipmakers sometimes investing) move debt off major balance sheets. This echoes the "vendor financing" of 2000 and the securitization risks of 2008, though currently small-scale. 3. **TSMC Abandoning Caution:** If the primary supply bottleneck (TSMC's conservative capacity planning) breaks, runaway supply could trigger a bust. 4. **Algorithmic Efficiency Breakthrough:** A major leap in software efficiency could drastically reduce the need for raw compute hardware, undermining the investment thesis. **Conclusion:** The AI boom is expensive and has frothy areas, but its core is underpinned by real demand and physical supply constraints. The bubble risk is layered: most present in optical components, GPU leasing, and the long-tail startup ecosystem, while the foundational chip manufacturing and leading application layers remain relatively solid—for now.

marsbit18 dk önce

Where the AI Bubble Really Is: Which Layer of Players Are Naked

marsbit18 dk önce

Standing in the Light: A Comprehensive Guide to the Optical Module and CPO Supply Chain

"Standing in the Light: Understanding the Optical Module and CPO Industry Chain" This article analyzes the critical role of optical communication technology, specifically optical modules and Co-Packaged Optics (CPO), as the "nervous system" for modern AI data centers. With exponential growth in AI computational demands (e.g., NVIDIA's Vera Rubin architecture), traditional electrical interconnects using copper cables face severe bottlenecks in bandwidth, power consumption, and signal integrity over distance. The core function of an optical module is to act as a "translator," converting electrical signals from chips into optical signals for transmission over fiber (and vice-versa). Key internal components include lasers, modulators, photodetectors, drivers, and DSP chips. The industry is currently transitioning from 800G to 1.6T modules. However, the future lies in CPO. This next-generation technology integrates the optical engine directly with the switch ASIC/XPU on the same package substrate, drastically reducing power consumption (by ~3.5x according to NVIDIA), overcoming bandwidth density limits, and minimizing signal attenuation compared to traditional pluggable modules. Key challenges for CPO include advanced packaging capacity (dominated by TSMC), thermal management, repairability, and standardization. The article details the broader technology landscape, including Near-Packaged Optics (NPO, a pragmatic intermediate step), Linear-drive Pluggable Optics (LPO), Optical I/O (OIO for chip-level integration), and Optical Circuit Switches (OCS). A comprehensive CPO industry chain is mapped, highlighting shifting power dynamics: * **Architecture Definers:** NVIDIA, Broadcom, and Marvell now hold greater influence. * **Advanced Packaging & Manufacturing:** TSMC is central; Fabrinet is a key EMS player. * **Lasers ("The Heart"):** A strategic bottleneck. EML lasers are led by Lumentum and Coherent (both receiving major NVIDIA investments). CW lasers, favored for CPO/silicon photonics, see strong Chinese players like Source Photonics and Sicoya. * **Silicon Photonics Chips:** The mainstream path for CPO engines, with key players like Broadcom, Intel, Marvell, and China's Accelink. * **Fiber Connectivity Components:** A major new, high-growth market created by CPO, including Fiber Array Units (FAU), Polarization-Maintaining Fiber (PMF), and MPO connectors. Companies like Tianfu Communication and US Conec are leaders. * **Fiber & Cable:** Experiencing a super-cycle (e.g., Corning, Yangtze Optical Fiber). * **PCB/Substrates:** Requiring advanced materials (e.g., Shengyi Tech). * **DSP & SerDes:** Functions are integrated into switch ASICs in the CPO era (e.g., Broadcom, Astera Labs). * **Optical Module Makers:** Transitioning from standalone module suppliers to providers of optical engines and NPO/LPO solutions while riding the current pluggable boom (e.g., Zhongji Innolight, Eoptolink). The investment timeline is segmented: Short-term (2026-2027) features the "last feast" for pluggable modules and CPO's initial rollout. Medium-term (2027-2029) will see CPO expand and NPO peak. Long-term (2029-2032+) involves CPO/OIO penetration into intra-rack scaling. In conclusion, optical interconnects are fundamental to AI infrastructure. The competitive landscape sees US firms leading in architecture and high-end chips, TSMC in advanced packaging, and Chinese firms holding strong positions in modules, connectivity components, CW lasers, and fiber/cable. The future belongs to companies that can navigate the technological shift from "selling shovels" (modules) to "building highways" (CPO/OIO infrastructure).

marsbit27 dk önce

Standing in the Light: A Comprehensive Guide to the Optical Module and CPO Supply Chain

marsbit27 dk önce

İşlemler

Spot
Futures
活动图片