-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lightning Specification Meeting 2025/01/27 #1221
Comments
rbf coop close:
announcement conf follow up:
splice locked reconnection:
splicing+taproot:
txn v3 stuff:
bolt 12 contacts:
storage back up:
|
@morehouse I re-read https://delvingbitcoin.org/t/lightning-transactions-with-v3-and-ephemeral-anchors/ to refresh my memory and figure out what to do with HTLC txs for v3 commitments, and my proposal is to simply make pre-signed HTLC txs v3 without changing anything else (ie don't introduce pre-signed transactions for spending HTLC outputs from the remote commit, as this creates non-trivial changes to exchange more signatures, for which I think we should wait for PTLCs). By doing only that, we should have the following properties (please double-check to make sure I'm not missing something):
Does that sound like a good plan? |
@t-bast: If all implementations are going to prioritize TRUC channels over the next couple years, it would really be a shame to go through all the effort and not fix pinning, especially when we're this close to it. If we have to wait for PTLCs, the roadmap becomes:
Do we really want to leave the network vulnerable to theft via pinning for that long?
This all sounds right.
Pinning "only" HTLC outputs is sufficient to steal funds!
Because by pinning you can delay confirmation long enough that the upstream HTLC times out. You can then successfully steal the HTLC by claiming the refund upstream and the preimage downstream.
Right. In general HTLC pinning is only effective using the preimage.
Right, under your proposal the broadcaster of the commitment transaction cannot pin, but the non-broadcaster can.
They can pin HTLC outputs, as explained above.
Yep, again here the broadcaster of the revoked commitment cannot pin. And the non-broadcaster has no reason to pin because they can claim all funds via the revocation key. |
I don't understand this attack. Can you provide a detailed attack scenario where that's exploited? I don't think this works, which is why I don't think there is any pinning risk related to HTLCs. |
Mallory has succeeded in stealing the the value of the original payment from Bob. |
Ok, so this is the standard attack that assumes eclipsing the victim in step 4, I was afraid you had found something else. As far as I know, nobody has been able to demonstrate that they can successfully perform this kind of network partitioning. If Bob sees Mallory's preimage claim in his mempool, or if his HTLC-timeout transaction reaches at least some miners, the attack fails. On top of that, the amount that can be stolen is bounded by the I honestly don't think this very-hard-to-pull-off attack is worth the extra complexity required for adding half a round-trip to exchange more HTLC signatures during commitment updates, but we'll discuss it during a spec meeting to see what others think. We had already discussed this attack a long time ago, and decided that if we thought it was a credible attack, we could trivially mitigate it by having nodes monitor all preimage claims in their mempool (even those that aren't for their own channels) and share them with their direct peers in Note that we had indeed already discussed this in the delving post (https://delvingbitcoin.org/t/lightning-transactions-with-v3-and-ephemeral-anchors/418/17). |
This kind of network partitioning should be really trivial. Last I saw anyone run numbers, > 50% of the lightning nodes with IP addresses have a Bitcoin full node running on the same IP. If you have that info the attack only requires that you send a transaction directly to that node while connecting to as many other public nodes as possible and sending them other transactions. Even if you don't have that info, figuring it out by doing previous passes which partition the network as they close channels is likely also very powerful.
Sadly most nodes default to the full channel value here still. I don't think this is a strong argument :( |
That's doesn't seem as simple as that to me. Even if you know the target bitcoin core node, you must:
How do you achieve that? Is there some bitcoin core behavior that I don't know of that makes this easy? |
It doesn't have to be to every peer of the target node, just enough nodes on the network that miners see Mallory's transaction first. I don't see why this isn't trivial.
Sure, but you're connected to them, you can see when they do this cause they'll tell you. I don't mean to imply that this attack is 100% successful, but Mallory isn't risking any money in trying it (as long as she learns that Bob's timeout tx confirmed in a timely manner, which she can by looking at the chain), and there's not really any reason to think the success rate would be fairly good. |
Yes but by the time they tell you, they're also telling all of their other bitcoin peers, which means you're already late: the honest node has a head-start to broadcast their HTLC-timeout widely before you can start broadcasting your preimage claim?
I honestly don't see how you can achieve that with a good enough success percentage, given the timing requirements described above...that's why I'd love for someone to try it out on mainnet and report back on whether it's working or not!
Mallory needs to create channels for this attack, which has a cost and creates delays in setting it up again, right? So far I'm still not convinced that this attack is realistic. And even if it is, I think that implementing trivial preimage sharing with your lightning peers fixes it? I'd rather implement this preimage sharing than re-work the full commitment update protocol to allow using pre-signed transactions on remote commit txs, because this is a much more complex change which means that it will take a much longer time to ship 0-fee commitments... |
There's a nontrivial timelag (on purpose, not just like Bitcoin Core is slow) between when a node receives a transaction and when it broadcasts it, even if the node sends it out to 20 peers, you still have plenty of time to send it to literally every single other (listening) full node on the network before anyone but those 20 nodes see the conflict (and you can probably still beat the transaction to some of the 20, as broadcasts are staggered from the victim). There's no race here, the honest victim has an additional delay in their relay that you don't have to bother with (and even if that weren't there, the internet is not flat, you can pretty easily win a latency race with a bit of effort).
Further than the fundamental latency issues that totally screw Bob, the vast, vast majority of hashrate is identifiable. If you can identify, lets say, 50% of the nodes of the top 3 pools (you definitely can!) then this attack will work about 31% of the time for you. That's a really huge success rate with relatively minimal effort.
Sure, but paying an on-chain fee to set up a 10M sat channel in order to steal 10M sats with some non-zero probability is still pretty damn high positive EV :). |
Got it, that's the Bitcoin Core behavior I was missing that makes the attack easier than I thought, thanks!
That means the preimage sharing via ping/pong I was referring to wouldn't work, right? Because a clever attacker would send his preimage claim only to miners, so that most of the network sees the HTLC-timeout and only a few miners (but enough to guarantee a non negligible attack success rate) see the preimage claim, so most likely no lightning node will see the preimage claim? |
Funnily enough, I tried to do this the other weekend... I ran a series of mainnet mempool partitioning tests as a weekend project. The motivation here was to assess in a general way, how easy it would be for a pretty unsophisticated attacker to pull off mempool partitioning. All tests were run on my weak 8gb ram home laptop and the amount of bitcoin involved was $30 total (one $10 deposit and a separate $20 one). Methodology:
![]()
Results:
I think further analysis is needed for mempool partitioning. My test harness is buggy and has some connectivity issues with some of the other nodes since I wrote a hacky client for the p2p network. The data suggests that unsophisticated partitioning (i.e. not identifying mining nodes, no simultaneous network-wide tx injection, etc) is node-dependent / centrality-dependent with variable success. I think by identifying the miners with the methodology in CoinScope Section 5 (https://www.cs.umd.edu/projects/coinscope/coinscope.pdf), I think the numbers can get much better. Potentially just running a node that collects inbound connections could give an attacker edge in tx-relay. Also, I went through some Core issues and stumbled upon this after the fact bitcoin/bitcoin#30572 which might? fix the method used here of network-spamming to partition. Additional data:
|
I thought that as part of the v3 rules, anything that spends from a v3 transaction also needs to be v3? |
That's the case only while the parent is unconfirmed. In this attack, Mallory's preimage claim is spending the confirmed commitment transaction, so it is not required to be v3. |
Ahhh, that makes sense. Enforcing that would require an actual consensus change. |
This is quite annoying, because adding pre-signed transactions for claiming HTLCs from the remote commit requires:
I would very much prefer a 0-fee commitment type that has minimal changes compared to existing anchor output channels and "simply" switches to v3 with an ephemeral anchor. But on the other hand, it isn't very satisfying that HTLCs can still be pinned until we migrate to PTLCs... |
This comment has been minimized.
This comment has been minimized.
fwiw I was unable to come up with anything nicer myself when I was mulling this over a couple years ago. This is where ANYPREVOUT(or similar) would make things trivial |
The meeting will take place on Monday 2025/01/13 at 7pm UTC (5:30am Adelaide time) on Libera Chat IRC #lightning-dev. It is open to the public.
A video link is available for higher bandwidth communication: https://meet.jit.si/Lightning-Spec-Meeting
Recently Updated Proposals / Seeking Review
This section contains changes that have been opened or updated recently and need feedback from the meeting participants.
option_simple_close
(features 60/61) #1205channel_announcement
handling #1220commit_sig
retransmission Do not unnecessarily retransmitcommitment_signed
in dual funding #1214splice_locked
retransmission Improvesplice_locked
retransmission logic #1223Liquidity ads Extensible Liquidity Ads #1153Channel jamming draft: HTLC Endorsement to Mitigate Channel Jamming #1071 Project Updates: Hybrid Channel Jamming Mitigation #1218Trampoline routing Trampoline Routing (2021 edition) (Feature 56/57) #829 and Trampoline onion format (Feature 56/57) #836Async payments Support async payments in BOLT 12 #1149Stale Proposals
This section contains pending changes that may not need feedback from the meeting participants, unless someone explicitly asks for it during the meeting. These changes are usually waiting for implementation work to happen to drive more feedback.
Inbound fees Inbound routing fees blips#18 and Add a bLIP for backwards-compatible inbound fees blips#22Waiting for interop
This section contains changes that have been conceptually ACKed and are waiting for at least two implementations to fully interoperate.
They most likely don't need to be covered during the meeting, unless someone asks for updates.
Zero reserve Addoption_zero_reserve
(FEATURE 64/65) #1140 (follow-up on bolt2: relax channel_reserve_satoshis requirements #1133 to include a feature bit)Attributable errors Attributable errors (feature 36/37) #1044Don't force close until error is received afterchannel_reestablish
Nodes shouldn't publish their commitment when receiving outdatedchannel_reestablish
#934Long Term Updates
This section contains long-term changes that need review, but require a substantial implementation effort.
Simplified commitment Feature 106/107: option_simplified_update. #867lnprototest (https://github.com/rustyrussell/lnprototest)The text was updated successfully, but these errors were encountered: