<<  >> (p.39)
    Author Topic: The Lightning Network FAQ  (Read 34999 times)
    This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic. (37 posts by 1+ user deleted.)
    Rath_ (OP)
    aka BitCryptex
    Legendary
    *
    Offline Offline

    Activity: 1876
    Merit: 3147



    View Profile
    June 15, 2021, 03:03:37 PM
    Merited by LoyceV (4), JayJuanGee (1)
     #761

    Is it really possible for a LN user to lose his revocation keys or the commitment transactions? Has it ever happened in the past to you?

    Yes, it's possible. It has never happened to me, though. You should be fine as long as you have a decent backup strategy.

    Can you really lose your money if the node goes offline? I haven't fully understood this:

    You can lose money in two ways if you go offline for too long:

    1) A malicious third-party can force-close a channel using an old commitment transaction. If you come back online before the timelock expires, you can publish a penalty transaction. The timelock is negotiated before you fund the channel. I believe that LND and c-lightning allow you to modify it when the channel is active. Most nodes accept timelocks up to 2016 blocks by default.

    2) If you are in the middle of forwarding a payment which reaches the payee successfully, eventually, the node to which you offered an HTLC is going to claim it through an HTLC-success transaction. Since you are offline, you cannot use your HTLC-success transaction to claim the HTLC offered by the node which asked you to route the payment, and you can't sign a new commitment transaction with them.

    Shouldn't Bob update Charlie's balance after Alice confirms that she got the money?

    Payment routing is a little bit more complex than what most people think. It is possible thanks to HTLC (Hash Time Locked Contracts). HTLCs in commitment transactions are divided into HTLC-success and HTLC-timeout transactions. There is hardly any information about them and yet they are crucial.

    In this case, Charlie generated a secret and made a hash of it. The hash was included in the payment invoice which Alice paid. Alice offered an HTLC to Bob. Then, Bob offered another HTLC to Charlie and let's say he lost power at the same time. Normally, Charlie would spend his HTLC-success transaction (payment secret is needed for that) and he would sign a new commitment transaction with Bob. Bob would do exactly the same with Alice.

    Since Bob could have sent HTLC-timeout to Charlie after the timelock of Bob's HTLC had expired, Charlie had to force-close their channel (he didn't know if Bob would come back online before the timelock expired). Alice simply retrieved her coins through an HTLC-timeout transaction after the timelock of the HTLC she had offered expired.

    Note: This is my current understanding of the HTLC-timeout and HTLC-success transactions. I am still doing a thorough research on them. I might be missing something here or be completely wrong. Please, let me know if something sounds wrong or confuses you.

    needing to run a full LN node to use LN is like telling someone they need to take their desktop computer with them when they go buy a coffee at starbucks

    You don't need to run your own Lightning Network node at all. There are a few non-custodial light wallets (Eclair Wallet, Phoenix Wallet, Blixt Wallet) which should be good enough for most people.
Page 38
Viewing Page: 39