omnilaboratory / obd

OmniBOLT daemon, a golang implementation of OmniBOLT spec, the smart assets lightning network.
MIT License
213 stars 21 forks source link

static channel backup is insufficient #44

Open neocarmack opened 2 years ago

neocarmack commented 2 years ago

This is from an auditor:

As to https://omnilaboratory.github.io/obd/#/safety-guidelines Since you are using LND as base instead of C-Lightning v(^^) users need to ensure that their storage is reliable. C-Lightning includes a hook that allows storage to be replicated by any mechanism, see >>https://lightning.readthedocs.io/BACKUP.html for the options users have in practice.

To my knowledge, LND has not corresponding hook. Static Channel Backups may be insufficient; if Omni requires the LND-derived daemon to keep track of additional metadata to >>ensure correctness, then the data in the Static Channel Backups may be insufficient (depends on how you structure that data). And you may need to modify the SCB mechanism to include the extra data required by Omni.

My suggestion is to urge your users (or at least the ones with significant amounts of stored value), in the safety guidelines, to >>use some kind of RAID system, such as ZFS (mirror or any RAID-Z), mdadm (RAID1 mode), or BTRFS (raid1, raid1c3, or >>raid1c4) and to monitor the storage continuously so that any storage failure is detected.

This is in addition to any SCB they might regularly make (and you need to augment the SCBs with Omni-specific data as well). See the above-linked BACKUP.html file for C-Lightning for how I suggest you present the safety guidelines.

neocarmack commented 2 years ago

Although omnibolt is not based on lnd, using RAID system for safe storage is good advise. We will add it to document.