Comment by codedaway on 06/01/2018 at 22:13 UTC
2 upvotes, 0 direct replies (showing 0)
View submission: ⚡ Lightning Network Megathread ⚡
View parent comment
Do I need a constant connection to run a lightning node?
Not necessarily,
Example: A and B have a channel. 1 BTC each. A sends B 0.5 BTC. B sends back 0.25 BTC. Balance should be A = 0.75, B = 0.25. If A gets disconnected, B can publish the first Tx where the balance was A = 0.5 and B = 0.5. If the node B does in fact attempt to cheat by publishing an old state (such as the A=0.5 and B=0.5 state), this cheat can then be detected on-chain and used to steal the cheaters funds, i.e., A can see the closing transaction, notice it's an old one and grab all funds in the channel (A=1, B=0). The time that A has in order to react to the cheating counterparty is given by the **CheckLockTimeVerify (CLTV)** in the cheating transaction, which is adjustable. So if A foresees that it'll be able to check in about once every 24 hours it'll require that the CLTV is at least that large, if it's once a week then that's fine too. **You definitely do not need to be online and watching the chain 24/7, just make sure to check in once in a while before the CLTV expires**. Alternatively you can outsource the watch duties, in order to keep the CLTV timeouts low. This can be achieved both with trusted third parties or untrusted ones (watchtowers). In the case of a unilateral close, e.g., you just go offline and never come back, the other endpoint will have to wait for that timeout to expire to get its funds back. So peers might not accept channels with extremely high CLTV timeouts. -- Source
Replies
There's nothing here!