Author

Topic: How lightning network store user data? (Read 161 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
February 11, 2023, 09:54:23 PM
#5
I see many implementations like lnd, c-lightning, is using local database (redis) for user data storage. I think it introduces the problem of a single point of failure.

Is there any implementation is based on distributed storage? Just like DHT or somehow?
'User data' is a vague term which may be misunderstood in this context. Lightning nodes don't really store user data like real name, email address or other personally identifiable information at all.
Lightning nodes use a database to store channel state information and that's the whole idea of Lightning. That all transactions are made off-chain. There is no distributed record keeping, which makes it scale so extremely well. If you were to introduce distributed storage into the system again, you're back at square one. Makes no sense.

Of course, you need to make sure not to lose this data (have a reliable backup strategy). But in a way, a regular Bitcoin wallet is also a 'single point of failure' if you don't have seed phrase backups. There will never be a way around backups in Bitcoin, in my opinion, and it is the user's responsibility to make sure that they exist and are safe.
The only real drawback of L2 backups is that they're not a 'set it and forget it' type of backup, but need to be kept up to date. But again, software handles that for you. Just need to set it up correctly.
legendary
Activity: 2422
Merit: 1191
Privacy Servers. Since 2009.
February 11, 2023, 02:36:14 AM
#4
I see many implementations like lnd, c-lightning, is using local database (redis) for user data storage. I think it introduces the problem of a single point of failure.

Is there any implementation is based on distributed storage? Just like DHT or somehow?

Lightning network doesn't store any user data. You do. And I have to agree with the previous comments: you are in charge, you choose how to implement it. So, if you feel like overdoing things you can set up some sort of a distributed cloud storage with every node protected by RAID and real-time backups.  Cool
member
Activity: 126
Merit: 30
February 10, 2023, 02:21:15 AM
#3
I see many implementations like lnd, c-lightning, is using local database (redis) for user data storage. I think it introduces the problem of a single point of failure.

Is there any implementation is based on distributed storage? Just like DHT or somehow?

The storage is not distributed on lightning because lightning is effectively an off-chain payment network. You need to settle the funds on chain for it to work properly at all, and if you are not careful you could lose funds to a party that is present when you are not present for a long time. So effectively there is no "single" point of failure for anyone in the lightning network there is in fact a lot of corresponding security mechanisms running parallel to each-other. The only single point of failure is the lightning node operator just like the only point of failure in owning your own private key is you.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
January 29, 2023, 07:02:47 AM
#2
How you handle your local lightning database is up to you.
According to best practices you should have it on drives that are on some sort of RAID and do a backup of it at every channel change.

But, it's the same thing as your wallet.dat file for core or whatever wallet file you are using for your wallet there are many ways to save it and then recover it, how you do it is up to you. On my small nodes with no raid or anything else I have the recovery words and auto backup running.

-Dave
newbie
Activity: 16
Merit: 1
January 29, 2023, 12:23:41 AM
#1
I see many implementations like lnd, c-lightning, is using local database (redis) for user data storage. I think it introduces the problem of a single point of failure.

Is there any implementation is based on distributed storage? Just like DHT or somehow?
Jump to: