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.
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.
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
1 Asked on March 5, 2021 by sachin-meier
1 Asked on February 20, 2021 by mcccs
5 Asked on February 18, 2021 by frdsbend
2 Asked on February 18, 2021 by jwinterm
1 Asked on February 12, 2021 by bbcdlearning
1 Asked on February 11, 2021 by framog
3 Asked on February 9, 2021 by tedy-s
1 Asked on January 29, 2021 by kisbitcoin
2 Asked on January 26, 2021 by rcfanboi
1 Asked on January 22, 2021 by katherine
1 Asked on January 20, 2021
5 Asked on January 16, 2021 by nmat
2 Asked on January 15, 2021 by erica-dawn
1 Asked on January 12, 2021 by eawf-bob
6 Asked on January 7, 2021 by neon-flash
2 Asked on January 7, 2021 by james-c
1 Asked on January 6, 2021 by johnsmiththelird
Get help from others!