Rusty Russell [ARCHIVE] on Nostr: 📅 Original date posted:2015-12-15 📝 Original message: Denis Gorbachev ...
📅 Original date posted:2015-12-15
📝 Original message:
Denis Gorbachev <denis.d.gorbachev at gmail.com> writes:
> Assuming a simple case of "Consumer - Relay - Provider" (2 hops), how long
> should it take for provider to receive the payment?
Assuming established channels already (assuming CPU is instant, so we're
just paying for network latency):
Consumer offers Relay a contract:
C -> R: update_add_htlc
R -> C: update_accept
C -> R: update_signature
R -> C: update_complete*
Relay offers Provider a contract:
R -> P: update_add_htlc
P -> R: update_accept
R -> P: update_signature
P -> R: update_complete*
Provider closes contract with relay:
P -> R: update_fulfill_htlc
R -> P: update_accept
P -> R: update_signature
R -> P: update_complete*
Relay closes contract with Client:
R -> C: update_fulfill_htlc
C -> R: update_accept
R -> C: update_signature
C -> R: update_complete*
You don't need to wait for the update_complete packets to arrive, so
that works out to 3 RTTs per hop. You might expect up to 10 hops in a
large lightning network, so 30 RTTs.
I'm in Australia, and my bitcoin node latency averages 330ms (ouch!).
So that would be 10 seconds.
Hope that helps!
Rusty.
📝 Original message:
Denis Gorbachev <denis.d.gorbachev at gmail.com> writes:
> Assuming a simple case of "Consumer - Relay - Provider" (2 hops), how long
> should it take for provider to receive the payment?
Assuming established channels already (assuming CPU is instant, so we're
just paying for network latency):
Consumer offers Relay a contract:
C -> R: update_add_htlc
R -> C: update_accept
C -> R: update_signature
R -> C: update_complete*
Relay offers Provider a contract:
R -> P: update_add_htlc
P -> R: update_accept
R -> P: update_signature
P -> R: update_complete*
Provider closes contract with relay:
P -> R: update_fulfill_htlc
R -> P: update_accept
P -> R: update_signature
R -> P: update_complete*
Relay closes contract with Client:
R -> C: update_fulfill_htlc
C -> R: update_accept
R -> C: update_signature
C -> R: update_complete*
You don't need to wait for the update_complete packets to arrive, so
that works out to 3 RTTs per hop. You might expect up to 10 hops in a
large lightning network, so 30 RTTs.
I'm in Australia, and my bitcoin node latency averages 330ms (ouch!).
So that would be 10 seconds.
Hope that helps!
Rusty.