Published on: 2020-03-24T16:15:21+00:00
In an email conversation between Subhra Mazumdar and ZmnSCPxj, various scenarios related to the Lightning Network were discussed. The conversation began with a discussion on the BOLT 04 specification and the possible errors that could occur during transactions. It was mentioned that the intermediate hop should not fail the HTLC, but the final node should fail it if the payment_secret does not match the expected value or if the payment hash is unknown. However, they questioned what should be done if the final node denies revealing the secret.The issue of unresolved HTLCs while probing was also discussed. This can lead to escrowing funds in these HTLCs and causing a DOS attack on the probe route, forcing nodes to wait until the HTLCs time out before being able to forward other payments. To avoid this problem, channels leading up to the final target are chosen to have a much higher balance. The locktimes of different channels in the route were also discussed, with the understanding that every contract has an implicit branch allowing both parties to spend the contract funds any way they want if they agree. Even if the receiver grieves up to 143 blocks, at the 144th block, the sending node can report a failure mechanism, allowing the funds to be reused in a different payment in the future.The issue of unresolved HTLCs while probing was further elaborated in a paper available on arxiv.org. Running multiple probes over the same channels causes a surge of irredeemable HTLCs and DOSes the probe route, forcing nodes to wait until the HTLCs time out before forwarding other payments. To address this, channels leading up to the final target are chosen to have a higher balance.In the conversation, Subhra also sought clarification on c-lightning's HTLC acceptance process. ZmnSCPxj explained that irrevocably committed incoming HTLCs follow different paths depending on the result returned by the hook. Delaying the default "continue" result can lead to griefing payments.The conversation also touched upon the scenario where B refuses to release the preimage in LND. ZmnSCPxj suggested modifying LND code or asking the developers if there are hooks available. In C-Lightning, a plugin can be installed to handle htlc_accepted and wait for the target block height to grief before returning from the function.In summary, the conversation between Subhra Mazumdar and ZmnSCPxj revolved around various scenarios related to the Lightning Network, including the BOLT 04 specification and error possibilities, unresolved HTLCs while probing, locktimes of different channels, and mimicking griefing attack scenarios in LND. They discussed potential solutions and methods for handling these issues, including modifying code and using plugins.
Updated on: 2023-07-31T22:45:14.508446+00:00