<p>Short answer: Yes network Latency is should be the dominant factor here. (I have not profiled it and I am not aware of benchmarks) </p>

<p>If you look at bolt 02 <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#adding-an-htlc-update_add_htlc" rel="nofollow noreferrer">https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#adding-an-htlc-update_add_htlc</a> you will see that <code>update_add_htlc</code> message including the onion and <code>commitment-signed</code> message will have to be sent / exchanged. (<code>revoke_and_ack</code> is for settling the htlcs) while decrypting the onion and producing signatures are computationally rather expensive operations (we should not forget encrypting and decrypting the lightning messages themselves according to bolt 08 and noise_xk) these operations even on a local area network should not exceed the time for network I/O. </p>

CC BY-SA 4.0
2019-10-15T12:56:52.807Z
Do you have an understanding about the order of magnitude of these delays? Like, is it in single milliseconds?
Sergei Tikhomirov
CC BY-SA 4.0
2019-10-15T14:05:15.973Z
I always like the times given in this excellent article https://norvig.com/21-days.html this should hold perfectly as estimates. So depending on the location of your channel partner the network io could be a couple hundred milliseconds. Everything else should be in the order of microseconds. But again did not measure that myself. But take a local lap and pay with your phone. See how money arrived at the LAPP but your phone has not signaled a successful payment as preimage is being propagated back (which is also mainly network io)
Rene Pickhardt
CC BY-SA 4.0
2019-10-15T11:30:41.873Z
2019-10-15T11:30:41.873Z
Rene Pickhardt
<p>How much time passes between the moment an intermediary node receives an HTLC and the moment it forwards if to the next hop? At least what order of magnitude is it? Is it comparable with network-latency (tens to hundreds of milliseconds)?</p>

<lightning-network>
How much time does it take for a Lightning node to forward an HTLC?
Sergei Tikhomirov
# How much time does it take for a Lightning node to forward an HTLC?

(Asked by: username_0 on 2019-10-15)

How much time passes between the moment an intermediary node receives an HTLC and the moment it forwards if to the next hop? At least what order of magnitude is it? Is it comparable with network-latency (tens to hundreds of milliseconds)?

**Tags:** lightning-network


---

## 1 answers

### Answer by username_1 on 2019-10-15. Score: 1 | Accepted answer

Short answer: Yes network Latency is should be the dominant factor here. (I have not profiled it and I am not aware of benchmarks)

If you look at bolt 02 <https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#adding-an-htlc-update_add_htlc> you will see that `update_add_htlc` message including the onion and `commitment-signed` message will have to be sent / exchanged. (`revoke_and_ack` is for settling the htlcs) while decrypting the onion and producing signatures are computationally rather expensive operations (we should not forget encrypting and decrypting the lightning messages themselves according to bolt 08 and noise\_xk) these operations even on a local area network should not exceed the time for network I/O.

> **Comments:**
> **username_0**: Do you have an understanding about the order of magnitude of these delays? Like, is it in single milliseconds?  
> **username_1**: I always like the times given in this excellent article https://norvig.com/21-days.html this should hold perfectly as estimates. So depending on the location of your channel partner the network io could be a couple hundred milliseconds. Everything else should be in the order of microseconds. But again did not measure that myself. But take a local lap and pay with your phone. See how money arrived at the LAPP but your phone has not signaled a successful payment as preimage is being propagated back (which is also mainly network io)  

---

