MultiversX Tracker is Live!

How do the various Lightning implementations treat latency? How long do they wait for a peer to provide a signature before using unhappy path?

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 147 Views

This was discussed on the lightning-dev mailing list.

Christian Decker stated:

It is worth mentioning here that the LN protocol is generally not very latency sensitive, and from my experience can easily handle very slow signers (3-5 seconds delay) without causing too many issues, aside from slower forwards in case we are talking about a routing node. I'd expect routing node signers to be well below the 1 second mark, even when implementing more complex signer logic, including MuSig2 or nested FROST.

In particular remember that the LN protocol implements a batch mechanism, with changes applied to the commitment transaction as a batch. Not every change requires a commitment and thus a signature. This means that while a slow signer may have an impact on payment latency, it should generally not have an impact on throughput on the routing nodes.

That doesn't mean that routers shouldn't strive to be as fast as possible, but I think the MuSig schemes, executed over local links, is unlikely to be problematic when considering overall network latency that we have anyway. For edge nodes it's rather nice to have relaxed timings, given that they might be on slow or flaky connections, but routers are a completely different category.

Matt Corallo added:

In general, and especially for "edge nodes", yes, but if forwarding nodes start taking a full second to forward a payment, we probably need to start aggressively avoiding any such nodes - while I'd love for all forwarding nodes to take 30 seconds to forward to improve privacy, users ideally expect payments to complete in 100ms, with multiple payment retries in between.

This obviously probably isn't ever going to happen in lightning, but getting 95th percentile payments down to one second is probably a good goal, something that requires never having to retry payments and also having forwarding nodes not take more than, say, 150ms.

Of course I don't think we should ever introduce a timeout on the peer level - if your peer went away for a second and isn't responding quickly to channel updates it doesn't merit closing a channel, but its something we will eventually want to handle in route selection if it becomes more of an issue going forward.


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments