Matt Corallo [ARCHIVE] on Nostr: 📅 Original date posted:2020-08-04 📝 Original message:Hmm, apologies that little ...
đź“… Original date posted:2020-08-04
📝 Original message:Hmm, apologies that little context was provided - this was meant in the context of the current crop of relay-based attacks that have been discovered. As we learned in those contexts, “just handle it when it confirms” doesn’t provide the types of guarantees we were hoping for as placing commitment transactions in mempools can be used to prevent honest nodes from broadcasting the latest state. This implies that HTLC security may be at risk.
> On Aug 4, 2020, at 00:23, ZmnSCPxj <ZmnSCPxj at protonmail.com> wrote:
>
> Good morning Matt,
>
>> While I admit I haven’t analyzed the feasibility, I want to throw one additional design consideration into the ring.
>>
>> Namely, it would ideally be trivial, at the p2p protocol layer, to relay a transaction to a full node without knowing exactly which input transaction that full node has in its mempool/active chain. This is at least potentially important for systems like lighting where you do not know which counterparty commitment transaction(s) are in a random node’s mempool and you should be able to describe to that node that you are spending then nonetheless.
>>
>> This is (obviously) an incredibly nontrivial problem both in p2p protocol complexity and mempool optimization, but it may leave SIGHASH_NOINPUT rather useless for lighting without it.
>>
>> The least we could do is think about the consensus design in that context, even if we have to provide an external overlay relay network in order to make lighting transactions relay properly (presumably with miners running such software).
>
> Ah, right.
>
> A feasible attack, without the above, would be to connect to the fullnode of the victim, and connect to miners separately.
> Then you broadcast to the victim one of the old txes, call it tx A, but you broadcast to the miners a *different* old tx, call it B.
> The victim reacts only to tA, but does not react to B since it does not see B in the mempool.
>
> On the other hand --- what the victim needs to react to is *onchain* confirmed transactions.
> So I think all the victim needs to do, in a Lightning universe utilizing primarily `SIGHASH_NOINPUT`-based mechanisms, is to monitor onchain events and ignore mempool events.
>
> So if we give fairly long timeouts for our mechanisms, it should be enough, I think, since once a transaction is confirmed its txid does not malleate without a reorg and a `SIGHASH_NOINPUT` signature can then be "locked" to that txid, unless a reorg unconfirms the transaction.
> We only need to be aware of deep reorgs and re-broadcast with a malleated prevout until the tx being spent is deeply confirmed.
>
> In addition, we want to implement scorch-the-earth, keep-bumping-the-fee strategies anyway, so we would keep rebroadcasting new versions of the spending transaction, and spending from a transaction that is confirmed.
>
> Or are there other attack vectors you can see that I do not?
> I think this is fixed by looking at the blockchain.
>
> Regards,
> ZmnSCPxj
Published at
2023-06-07 18:26:09Event JSON
{
"id": "8a8de011a4f035c47120d773c1b8f8466041c74d0782affce47ca1ab94f2070d",
"pubkey": "cd753aa8fbc112e14ffe9fe09d3630f0eff76ca68e376e004b8e77b687adddba",
"created_at": 1686162369,
"kind": 1,
"tags": [
[
"e",
"b580beba13e993f0feaede9804bbc73901ee03ff94bf8b01329f909e32c379c0",
"",
"root"
],
[
"e",
"9f7bcb7bbff40b8cc4def28ec198aca6887eb5ab6314aabc39c2b2424380ca7e",
"",
"reply"
],
[
"p",
"72cd40332ec782dd0a7f63acb03e3b6fdafa6d91bd1b6125cd8b7117a1bb8057"
]
],
"content": "📅 Original date posted:2020-08-04\n📝 Original message:Hmm, apologies that little context was provided - this was meant in the context of the current crop of relay-based attacks that have been discovered. As we learned in those contexts, “just handle it when it confirms” doesn’t provide the types of guarantees we were hoping for as placing commitment transactions in mempools can be used to prevent honest nodes from broadcasting the latest state. This implies that HTLC security may be at risk.\n\n\u003e On Aug 4, 2020, at 00:23, ZmnSCPxj \u003cZmnSCPxj at protonmail.com\u003e wrote:\n\u003e \n\u003e Good morning Matt,\n\u003e \n\u003e\u003e While I admit I haven’t analyzed the feasibility, I want to throw one additional design consideration into the ring.\n\u003e\u003e \n\u003e\u003e Namely, it would ideally be trivial, at the p2p protocol layer, to relay a transaction to a full node without knowing exactly which input transaction that full node has in its mempool/active chain. This is at least potentially important for systems like lighting where you do not know which counterparty commitment transaction(s) are in a random node’s mempool and you should be able to describe to that node that you are spending then nonetheless.\n\u003e\u003e \n\u003e\u003e This is (obviously) an incredibly nontrivial problem both in p2p protocol complexity and mempool optimization, but it may leave SIGHASH_NOINPUT rather useless for lighting without it.\n\u003e\u003e \n\u003e\u003e The least we could do is think about the consensus design in that context, even if we have to provide an external overlay relay network in order to make lighting transactions relay properly (presumably with miners running such software).\n\u003e \n\u003e Ah, right.\n\u003e \n\u003e A feasible attack, without the above, would be to connect to the fullnode of the victim, and connect to miners separately.\n\u003e Then you broadcast to the victim one of the old txes, call it tx A, but you broadcast to the miners a *different* old tx, call it B.\n\u003e The victim reacts only to tA, but does not react to B since it does not see B in the mempool.\n\u003e \n\u003e On the other hand --- what the victim needs to react to is *onchain* confirmed transactions.\n\u003e So I think all the victim needs to do, in a Lightning universe utilizing primarily `SIGHASH_NOINPUT`-based mechanisms, is to monitor onchain events and ignore mempool events.\n\u003e \n\u003e So if we give fairly long timeouts for our mechanisms, it should be enough, I think, since once a transaction is confirmed its txid does not malleate without a reorg and a `SIGHASH_NOINPUT` signature can then be \"locked\" to that txid, unless a reorg unconfirms the transaction.\n\u003e We only need to be aware of deep reorgs and re-broadcast with a malleated prevout until the tx being spent is deeply confirmed.\n\u003e \n\u003e In addition, we want to implement scorch-the-earth, keep-bumping-the-fee strategies anyway, so we would keep rebroadcasting new versions of the spending transaction, and spending from a transaction that is confirmed.\n\u003e \n\u003e Or are there other attack vectors you can see that I do not?\n\u003e I think this is fixed by looking at the blockchain.\n\u003e \n\u003e Regards,\n\u003e ZmnSCPxj",
"sig": "d2f8eb95b5299d4f95b92adb06decbbb0aa98736044cb8c16f0bcf0f86ba472b93516a1f88ef58e235fe7148f0d1da42832172f65e2ecc7709ce8704abe6b9d1"
}