Lightning Network state deprecation secret keeping

Bitcoin Asked by user107511 on October 24, 2021

When using a lightning channel, two sides are sending transactions representing the current state (or balance) between them, and for each state sent, they invalidate the previous state by sending a secret for a hash puzzle in a HTLC transaction.

For example, when Alice sends Bob the new state between them, it also sends a secret for the puzzle in the previous state. Bob can use it to redeem Bitcoin if Alice publishes the previous state transaction on the blockchain.

My question is – does Bob need to save all the secrets of all the previous states until the channel is settled and closed? Sounds like Bob might need to save a lot of data when having many channels.

One Answer

Unless bob uses a watchtower service where he outsources the storage of data Bob needs to know all previous revocation secrets. However he does not need to store and save all of them as the revocation secretes are derived in a deterministic way. This means whenever I know a revocation secret of a current state I will be able to derive all previous revocation secrets from it.

You can find the details of the key derivation in the key's section of BOLT 03

That being said revocation secrets are not the same as preimages of HTLCs (which I believe your question implies / confuses) The old preimages of settled HTLCs do never need to be stored or need to be reproduced. This is because in the penality transaction case from the second stage HTLCs the revocation secret is sufficient to access the funds before the timelock.

Answered by Rene Pickhardt on October 24, 2021

Add your own answers!

Related Questions

Plain text for the Bitcoin symbol

5  Asked on February 18, 2021 by frdsbend


Candle decimal places

1  Asked on February 15, 2021 by matheus


How to fix Bitcoin QT loading issue

1  Asked on February 11, 2021 by t-erry


What is a ‘Satoshi’?

5  Asked on January 16, 2021 by nmat


Old wallet from old phone

1  Asked on January 8, 2021 by r4c00n


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP