注:原文来自@hu_zhiwei发布长推。
“All your mempool are belong to us”,上周的闪电网络这个问题得到了很多关注。我也去学习了一下,但发现很多理解似乎并不准确,在这里做一个整理。
1-到底什么问题?
简单来说,是攻击者利用 RBF(手续费替换)使得闪电网络上的受害者没办法在主网上提交 timeout 交易,使其损失了转发的资金。
2-大体的流程是:
- 共谋的攻击者 A 和 C,分别和受害者 B 建立了闪电网络通道,然后 A 通过受害者 B 转发付款给 C。
- 攻击者在这里利用了两次 RBF(手续费替换),第一次是阻止 B 去 timeout B<>C的通道;第二次是隐藏HTLC的原像,阻止B去向 A claim 收款。
具体的:
- 在第一次 RBF 前,攻击者要提前准备了一系列低费率的链式交易
- 第一次RBF是C利用这个交易作为其中一个输入加上自己的原像把 B 的 timeout 交易替换掉
- 还要再做第二次 RBF 是因为B看到原像后,就可以向A去claim收款。所以这时候,C会立即再做一笔替换,把这个链式交易中的最后一笔替换掉
因为原像的交易依赖于这笔链式交易,因此这时候也会被替换掉,也就无法从 mempool 里观察到了。
C 重复这两个 RBF 过程,让B无法在B<>C的通道上发送timeout(如果受害者 B 不关注 mempool,无法注意到C短暂发出的原像),直到 A<>B 的通道也过期,让 B 彻底无法获得这笔转发的资金。
这里涉及到两个概念:timeout 交易和RBF(手续费替换)
1)timeout 交易。闪电网络为了转发交易,设置了HTLC 来协调通道间的转发付款。当有一笔付款的每一跳在付款人(如上例中的 B)发给收款人(如 C)时,通道会在原有基础上增加一个 HTLC 的条件,要求必须在限定时间内给出原像,以此“结算”这笔付款。
如果超时后收款人(C)还给不出原像,可能存在欺诈行为,需要将当前的通道状态发布到主链上来把转发的资金收回来;如果能给出原像,就可以结算当前的付款(通道也不必关闭),同时还可以和上一跳的付款人(A)来结算。
2)RBF(手续费替换)。这个其实不是像以太坊链上 MEV 用更高 gas 去抢跑,但也是在 mempool 里的操作。RBF 的设计背景是用户发送了一个低费率(BTW 请不要把比特币链上的费率称为“gas”)交易,可能会在mempool里一直未得到确认;RBF 允许用户重新发一个新的高费率交易来替换掉原交易。
具体的攻击过程可以参考,这个非常直观的解释: https://twitter.com/mononautical/status/1715736832950825224…
这里也有原报告者的Paper: https://github.com/ariard/mempool-research/blob/2023-10-replacement-paper/replacement-cycling.pdf
3-会有哪些影响?
值得注意的是,这个问题不是上周才发现的,而报告者 Antoine 已经在去年年底发现,告知了 Core 的维护者和闪电网络主要实现的开发团队。报告过程和其他开源项目都类似,都是通过“负责任的披露过程”,而不是在发现的当时就在公开渠道里对所有人直接说。
因此在过去的闪电网络主要版本里已经“mitigate”了这种攻击,例如在今年4月份发布的 lnd v0.16.1-beta。 根据和 LN 的开发者交流:“现在lnd会一直观察mempool,所以一旦preimage出现了,B可以直接从mempool里拿到preimage然后settle;另外是lnd会一直rebroadcast,防止tx从mempool里消失”。
不过,想完全解决,可能要依赖于 Core 等协议层面的实现,例如把 mempool 里的信息保存更久一些等等。
目前为止,没有在主网上(包括 Bitcoin 网络和闪电网络)观察到此类攻击。 但并不意味着以后不会出现,因为可能有更高级的攻击者会更精心策划攻击,例如和矿工合谋从而让更细心的节点也会遭受攻击。
4-开发者因此感到失望、退出开发了?
Antoine 关注到目前一些媒体报道上出现偏差后,还专门又写了一封邮件说,这不是"intentional backdoor",并且建议媒体可以等更专业的报告者提供更多信息后再发布报道…… https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-October/004157.html…
尽管不知道他个人的未来计划,但 Antoine 在之前的邮件里也提到他计划在30号再开始在公开邮件列表上进行回复,并且之后会专注在 Core 的开发上。
可以在邮件列表看到更详细的讨论:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-October/021999.html…
如果没时间的话,每周中更新的 Bitcoin Optech 在本周会有汇总:
https://bitcoinops.org
因为讨论还在进行中,我也没有读完所有的邮件。如有错误或不准确的地方,请指正。
长推:简单理解闪电网络所涉资金丢失风险问题
MarsBitPublished on 2023-10-24Last updated on 2023-10-27
Abstract
Antoine 在去年年底发现了一种闪电网络的“All your mempool are belong to us”攻击,并在今年4月份发布的 lnd v0.16.1-beta中“mitigate”了这种攻击。目前为止,没有在主网上观察到此类攻击,但Antoine计划在30号再开始在公开邮件列表上进行回复,并且之后会专注在 Core 的开发上。
Related Reads
Trading
Hot Articles
What is $BITCOIN
DIGITAL GOLD ($BITCOIN): A Comprehensive Analysis Introduction to DIGITAL GOLD ($BITCOIN) DIGITAL GOLD ($BITCOIN) is a blockchain-based project operating on the Solana network, which aims to combine the characteristics of traditional precious metals with the innovation of decentralized technologies. While it shares a name with Bitcoin, often referred to as “digital gold” due to its perception as a store of value, DIGITAL GOLD is a separate token designed to create a unique ecosystem within the Web3 landscape. Its goal is to position itself as a viable alternative digital asset, although specifics regarding its applications and functionalities are still developing. What is DIGITAL GOLD ($BITCOIN)? DIGITAL GOLD ($BITCOIN) is a cryptocurrency token explicitly designed for use on the Solana blockchain. In contrast to Bitcoin, which provides a widely recognized value storage role, this token appears to focus on broader applications and characteristics. Notable aspects include: Blockchain Infrastructure: The token is built on the Solana blockchain, known for its capacity to handle high-speed and low-cost transactions. Supply Dynamics: DIGITAL GOLD has a maximum supply capped at 100 quadrillion tokens (100P $BITCOIN), although details regarding its circulating supply are currently undisclosed. Utility: While precise functionalities are not explicitly outlined, there are indications that the token could be utilized for various applications, potentially involving decentralized applications (dApps) or asset tokenization strategies. Who is the Creator of DIGITAL GOLD ($BITCOIN)? At present, the identity of the creators and development team behind DIGITAL GOLD ($BITCOIN) remains unknown. This situation is typical among many innovative projects within the blockchain space, particularly those aligning with decentralized finance and meme coin phenomena. While such anonymity may foster a community-driven culture, it intensifies concerns about governance and accountability. Who are the Investors of DIGITAL GOLD ($BITCOIN)? The available information indicates that DIGITAL GOLD ($BITCOIN) does not have any known institutional backers or prominent venture capital investments. The project seems to operate on a peer-to-peer model focused on community support and adoption rather than traditional funding routes. Its activity and liquidity are primarily situated on decentralized exchanges (DEXs), such as PumpSwap, rather than established centralized trading platforms, further highlighting its grassroots approach. How DIGITAL GOLD ($BITCOIN) Works The operational mechanics of DIGITAL GOLD ($BITCOIN) can be elaborated on based on its blockchain design and network attributes: Consensus Mechanism: By leveraging Solana’s unique proof-of-history (PoH) combined with a proof-of-stake (PoS) model, the project ensures efficient transaction validation contributing to the network's high performance. Tokenomics: While specific deflationary mechanisms have not been extensively detailed, the vast maximum token supply implies that it may cater to microtransactions or niche use cases that are still to be defined. Interoperability: There exists the potential for integration with Solana’s broader ecosystem, including various decentralized finance (DeFi) platforms. However, the details regarding specific integrations remain unspecified. Timeline of Key Events Here is a timeline that highlights significant milestones concerning DIGITAL GOLD ($BITCOIN): 2023: The initial deployment of the token occurs on the Solana blockchain, marked by its contract address. 2024: DIGITAL GOLD gains visibility as it becomes available for trading on decentralized exchanges like PumpSwap, allowing users to trade it against SOL. 2025: The project witnesses sporadic trading activity and potential interest in community-led engagements, although no noteworthy partnerships or technical advancements have been documented as of yet. Critical Analysis Strengths Scalability: The underlying Solana infrastructure supports high transaction volumes, which could enhance the utility of $BITCOIN in various transaction scenarios. Accessibility: The potential low trading price per token could attract retail investors, facilitating wider participation due to fractional ownership opportunities. Risks Lack of Transparency: The absence of publicly known backers, developers, or an audit process may yield skepticism regarding the project's sustainability and trustworthiness. Market Volatility: The trading activity is heavily reliant on speculative behavior, which can result in significant price volatility and uncertainty for investors. Conclusion DIGITAL GOLD ($BITCOIN) emerges as an intriguing yet ambiguous project within the rapidly evolving Solana ecosystem. While it attempts to leverage the “digital gold” narrative, its departure from Bitcoin's established role as a store of value underscores the need for a clearer differentiation of its intended utility and governance structure. Future acceptance and adoption will likely depend on addressing the current opacity and defining its operational and economic strategies more explicitly. Note: This report encompasses synthesised information available as of October 2023, and developments may have transpired beyond the research period.
363 Total ViewsPublished 2025.05.13Updated 2025.05.13

Meet ZetaChain: The Universal L1 for Apps That Work Everywhere — Even on Bitcoin
ZetaChain is the first ever Universal Blockchain to enable native connection across all blockchain ecosystems.
48.3k Total ViewsPublished 2025.06.16Updated 2025.06.16

Fractal Bitcoin: Scaling Bitcoin as a Recursive System
Fractal Bitcoin is a Layer-1 scalability solution built on the Bitcoin core code, enabling infinite scalability through a recursive approach.
47.8k Total ViewsPublished 2025.06.30Updated 2025.06.30

Discussions

Top Questions
- What are analysts predicting for Bitcoin’s next support level?01/16 19:13
- Is Ethereum’s on-chain surge challenging Bitcoin’s dominance?11/07 02:18
- How do traditional markets like stocks and gold influence Bitcoin trends?11/07 02:18
- What are Elon Musk’s predictions for the next Bitcoin all-time high?11/07 02:17
- What indicators should traders watch to predict Bitcoin’s next move?11/07 02:17




