{"action":"created","issue":{"url":"https://api.github.com/repos/ElementsProject/lightning/issues/2225","repository_url":"https://api.github.com/repos/ElementsProject/lightning","labels_url":"https://api.github.com/repos/ElementsProject/lightning/issues/2225/labels{/name}","comments_url":"https://api.github.com/repos/ElementsProject/lightning/issues/2225/comments","events_url":"https://api.github.com/repos/ElementsProject/lightning/issues/2225/events","html_url":"https://github.com/ElementsProject/lightning/issues/2225","id":396327684,"node_id":"MDU6SXNzdWUzOTYzMjc2ODQ=","number":2225,"title":"Channel state redundancy for production backends","user":{"login":"GamerSg","id":5078381,"node_id":"MDQ6VXNlcjUwNzgzODE=","avatar_url":"https://avatars1.githubusercontent.com/u/5078381?v=4","gravatar_id":"","url":"https://api.github.com/users/GamerSg","html_url":"https://github.com/GamerSg","followers_url":"https://api.github.com/users/GamerSg/followers","following_url":"https://api.github.com/users/GamerSg/following{/other_user}","gists_url":"https://api.github.com/users/GamerSg/gists{/gist_id}","starred_url":"https://api.github.com/users/GamerSg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GamerSg/subscriptions","organizations_url":"https://api.github.com/users/GamerSg/orgs","repos_url":"https://api.github.com/users/GamerSg/repos","events_url":"https://api.github.com/users/GamerSg/events{/privacy}","received_events_url":"https://api.github.com/users/GamerSg/received_events","type":"User","site_admin":false},"labels":[{"id":1116907159,"node_id":"MDU6TGFiZWwxMTE2OTA3MTU5","url":"https://api.github.com/repos/ElementsProject/lightning/labels/plugin","name":"plugin","color":"ffefaf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-01-07T02:40:29Z","updated_at":"2019-05-25T05:40:31Z","closed_at":null,"author_association":"NONE","body":"I am starting to see Lightning wallets which backs up every state change to the cloud, which allows a complete recovery in the event the device is lost/unusable. While this is fine for consumer level wallets, service providing backends with higher volumes may need something more reliable/private. If i am to build a production service over lightning, i cannot rely on \"shutdown node and hope other nodes will close my channels honestly\" when there is an outage or disk failure/corruption.\r\n\r\nMy idea is to simply add an optional WAL(write-ahead) log file which is a technique used by many enterprise grade databases to commit updates to the DB to a log file before actually updating the actual tablespace on disk. In the event of a crash, the database is able to fully recover from a recent backup of the tablespace and the WAL file. Ideally, the WAL log file should be on a different disk(s) to reduce probability of total failure due to disk issues.\r\n\r\nTo be even more secure, multiple log files in different disks can be specified.\r\n"},"comment":{"url":"https://api.github.com/repos/ElementsProject/lightning/issues/comments/495859765","html_url":"https://github.com/ElementsProject/lightning/issues/2225#issuecomment-495859765","issue_url":"https://api.github.com/repos/ElementsProject/lightning/issues/2225","id":495859765,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NTg1OTc2NQ==","user":{"login":"ZmnSCPxj","id":28175207,"node_id":"MDQ6VXNlcjI4MTc1MjA3","avatar_url":"https://avatars0.githubusercontent.com/u/28175207?v=4","gravatar_id":"","url":"https://api.github.com/users/ZmnSCPxj","html_url":"https://github.com/ZmnSCPxj","followers_url":"https://api.github.com/users/ZmnSCPxj/followers","following_url":"https://api.github.com/users/ZmnSCPxj/following{/other_user}","gists_url":"https://api.github.com/users/ZmnSCPxj/gists{/gist_id}","starred_url":"https://api.github.com/users/ZmnSCPxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZmnSCPxj/subscriptions","organizations_url":"https://api.github.com/users/ZmnSCPxj/orgs","repos_url":"https://api.github.com/users/ZmnSCPxj/repos","events_url":"https://api.github.com/users/ZmnSCPxj/events{/privacy}","received_events_url":"https://api.github.com/users/ZmnSCPxj/received_events","type":"User","site_admin":false},"created_at":"2019-05-25T05:40:31Z","updated_at":"2019-05-25T05:40:31Z","author_association":"COLLABORATOR","body":"We use sqlite3 to store channel state, which has strong mitigations against data loss already. Sqlite3 defaults to a rollback log instead of a writeahead log, and I believe we use default. Difference between rollback vs writeahead seems to be mostly performance and what it needs from the filesystem, in terms of data loss protection I believe they are similar. For replication of the db across multiple devices I believe `mdadm` should work for most uses."}}
{"actor":{"display_login":"ZmnSCPxj"}}