mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-19 22:24:19 +01:00
docs: Rename from c-lightning to core-lightning for local plugins
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Autopilot
|
||||
|
||||
This is a version of Rene Pickhardt's [Autopilot library][lib] ported as a
|
||||
c-lightning plugin.
|
||||
Core-Lightning plugin.
|
||||
|
||||
> :warning: This plugin is still being ported and may not be currently reflect
|
||||
> the entire functionality. :construction:
|
||||
|
||||
@@ -3,16 +3,16 @@ Created on 04.09.2018
|
||||
|
||||
@author: rpickhardt
|
||||
|
||||
This software is a command line tool and c-lightning wrapper for lib_autopilot
|
||||
This software is a command line tool and Core-Lightning wrapper for lib_autopilot
|
||||
|
||||
You need to have a c-lightning node running in order to utilize this program.
|
||||
You need to have a Core-Lightning node running in order to utilize this program.
|
||||
Also you need lib_autopilot. You can run
|
||||
|
||||
python3 c-lightning-autopilot --help
|
||||
python3 Core-Lightning-autopilot --help
|
||||
|
||||
in order to get all the command line options
|
||||
|
||||
usage: c-lightning-autopilot.py [-h] [-b BALANCE] [-c CHANNELS]
|
||||
usage: Core-Lightning-autopilot.py [-h] [-b BALANCE] [-c CHANNELS]
|
||||
[-r PATH_TO_RPC_INTERFACE]
|
||||
[-s {diverse,merge}] [-p PERCENTILE_CUTOFF]
|
||||
[-d] [-i INPUT]
|
||||
@@ -36,7 +36,7 @@ optional arguments:
|
||||
|
||||
a good example call of the program could look like that:
|
||||
|
||||
python3 c-lightning-autopilot.py -s diverse -c 30 -b 10000000
|
||||
python3 core-lightning-autopilot.py -s diverse -c 30 -b 10000000
|
||||
|
||||
This call would use up to 10'000'000 satoshi to create 30 channels which are
|
||||
generated by using the diverse strategy to mix the 4 heuristics.
|
||||
|
||||
@@ -6,7 +6,7 @@ from typing import Iterator
|
||||
import sqlite3
|
||||
from tqdm import tqdm
|
||||
|
||||
# A 'transaction' that was proposed by c-lightning and that needs saving to the
|
||||
# A 'transaction' that was proposed by Core-Lightning and that needs saving to the
|
||||
# backup. `version` is the `data_version` of the database **after** `transaction`
|
||||
# has been applied. A 'snapshot' represents a complete copy of the database.
|
||||
# This is used by the plugin from time to time to allow the backend to compress
|
||||
@@ -81,7 +81,7 @@ class Backend(object):
|
||||
self.db = self._db_open(dest)
|
||||
|
||||
def _rewrite_stmt(self, stmt: str) -> str:
|
||||
"""We had a stmt expansion bug in c-lightning, this replicates the fix.
|
||||
"""We had a stmt expansion bug in Core-Lightning, this replicates the fix.
|
||||
|
||||
We were expanding statements incorrectly, missing some
|
||||
whitespace between a param and the `WHERE` keyword. This
|
||||
|
||||
@@ -57,7 +57,7 @@ def init(lightning_dir, backend_url):
|
||||
else:
|
||||
print("Database does not exist yet, created an empty backup file")
|
||||
|
||||
print("Initialized backup backend {destination}, you can now start c-lightning".format(
|
||||
print("Initialized backup backend {destination}, you can now start Core-Lightning".format(
|
||||
destination=destination,
|
||||
))
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ root.addHandler(handler)
|
||||
|
||||
|
||||
def check_first_write(plugin, data_version):
|
||||
"""Verify that we are up-to-date and c-lightning didn't forget writes.
|
||||
"""Verify that we are up-to-date and Core-Lightning didn't forget writes.
|
||||
|
||||
We may be at most 1 write off:
|
||||
|
||||
- c-lightning and backup are at the same version (happy case)
|
||||
- c-lightning is 1 write behind: it must've crashed inbetween calling the
|
||||
- Core-Lightning and backup are at the same version (happy case)
|
||||
- Core-Lightning is 1 write behind: it must've crashed inbetween calling the
|
||||
hook and committing the DB transaction.
|
||||
- c-lightning is one or more writes ahead: either we lost some writes, or
|
||||
c-lightning was running without the plugin at some point -> crash!
|
||||
- c-lighning is more than 1 write behind: c-lightning had a lobotomy, or
|
||||
- Core-Lightning is one or more writes ahead: either we lost some writes, or
|
||||
Core-Lightning was running without the plugin at some point -> crash!
|
||||
- c-lighning is more than 1 write behind: Core-Lightning had a lobotomy, or
|
||||
was restored from an old backup -> crash!
|
||||
"""
|
||||
backend = plugin.backend
|
||||
@@ -50,7 +50,7 @@ def check_first_write(plugin, data_version):
|
||||
return True
|
||||
|
||||
elif backend.prev_version > data_version - 1:
|
||||
kill("c-lightning seems to have lost some state (failed restore?). Emergency shutdown.")
|
||||
kill("Core-Lightning seems to have lost some state (failed restore?). Emergency shutdown.")
|
||||
|
||||
else:
|
||||
kill("Backup is out of date, we cannot continue safely. Emergency shutdown.")
|
||||
|
||||
@@ -157,7 +157,7 @@ class FileBackend(Backend):
|
||||
|
||||
# If this assertion fails we are in a degenerate state: we
|
||||
# have less than two changes in the backup (starting
|
||||
# c-lightning alone produces 6 changes), and compacting an
|
||||
# Core-Lightning alone produces 6 changes), and compacting an
|
||||
# almost empty backup is not useful.
|
||||
assert change is not None
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[tool.poetry]
|
||||
name = "cln-backup"
|
||||
version = "0.1.0"
|
||||
description = "Keep your c-lightning node save by backing it up, in real-time (allows recovering without channel closures)."
|
||||
description = "Keep your Core-Lightning node save by backing it up, in real-time (allows recovering without channel closures)."
|
||||
authors = ["Christian Decker <decker@blockstream.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
Remote backup backend for c-lightning
|
||||
Remote backup backend for Core-Lightning
|
||||
=====================================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
The purpose of this backend is to allow hassle-free incremental remote backups of a c-lightning
|
||||
The purpose of this backend is to allow hassle-free incremental remote backups of a Core-Lightning
|
||||
daemon's state.
|
||||
|
||||
The remote backup system consists of two parts:
|
||||
|
||||
- A `backup.py` plugin backend that listens for changes to c-lightning's database and communicates them
|
||||
- A `backup.py` plugin backend that listens for changes to Core-Lightning's database and communicates them
|
||||
to a remote server.
|
||||
|
||||
- A server daemon that receives changes from the backup backend and communicates with a local backup backend
|
||||
to store them. The server side does not need to be running c-lightning, nor have it installed.
|
||||
to store them. The server side does not need to be running Core-Lightning, nor have it installed.
|
||||
|
||||
### URL scheme
|
||||
|
||||
@@ -35,7 +35,7 @@ backup-cli server file:///path/to/backup 127.0.0.1:8700
|
||||
On the client side:
|
||||
|
||||
```bash
|
||||
# Make sure c-lightning is not running
|
||||
# Make sure Core-Lightning is not running
|
||||
lightning-cli stop
|
||||
# Initialize the socket backend (this makes an initial snapshot, and creates a configuration file for the plugin)
|
||||
backup-cli init socket:127.0.0.1:8700 --lightning-dir "$HOME/.lightning/bitcoin"
|
||||
@@ -48,7 +48,7 @@ Usage with SSH
|
||||
--------------
|
||||
|
||||
The easiest way to connect the server and client if they are not running on the same host is with a ssh
|
||||
forward. For example, when connecting from another machine to the one running c-lightning use:
|
||||
forward. For example, when connecting from another machine to the one running Core-Lightning use:
|
||||
|
||||
```bash
|
||||
ssh mylightninghost -R 8700:127.0.0.1:8700
|
||||
@@ -82,9 +82,9 @@ HiddenServicePort 8700 127.0.0.1:8700
|
||||
Goals
|
||||
-----
|
||||
|
||||
- Hassle-free incremental remote backup of c-lightning's database over a simple TCP protocol.
|
||||
- Hassle-free incremental remote backup of Core-Lightning's database over a simple TCP protocol.
|
||||
|
||||
- Safety. c-lightningd will only proceed when the remote backend has acknowledged storing a change, and will halt when there is no connection to the backup server.
|
||||
- Safety. Core-Lightning will only proceed when the remote backend has acknowledged storing a change, and will halt when there is no connection to the backup server.
|
||||
|
||||
- Bandwidth efficiency. Updates can be really large, and SQL statements ought to be well compressible, so bandwidth is saved by performing zlib compression on the changes and snapshots.
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ lightningd --plugin=/path/to/plugin/drain.py
|
||||
```
|
||||
|
||||
Alternatively, you can also symlink or copy the plugins executable to the
|
||||
`.lightning/plugins` folder or the `plugins` folder of your c-lightning
|
||||
`.lightning/plugins` folder or the `plugins` folder of your Core-Lightning
|
||||
installation as executables within these directories will be loaded as plugins.
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Helpme plugin for c-lightning
|
||||
# Helpme plugin for Core-Lightning
|
||||
|
||||
This plugin is designed to walk you through setting up a fresh
|
||||
c-lightning node, offering advice for common problems.
|
||||
Core-Lightning node, offering advice for common problems.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ def get_channel_list(peers, state='CHANNELD_NORMAL'):
|
||||
|
||||
|
||||
def give_general_advice(plugin):
|
||||
r = """Welcome to c-lightning!
|
||||
r = """Welcome to Core-Lightning!
|
||||
|
||||
The lightning network consists of bitcoin channels between computers
|
||||
(like this one), and the ability to send those bitcoins between them.
|
||||
@@ -829,7 +829,7 @@ Beware that if your node is offline while channels are open, the other side of t
|
||||
|
||||
|
||||
def give_plugin_advice(plugin):
|
||||
return """You can create plugins for c-lightning which do awesome things. Like me, the 'helpme' plugin! They can also, y'know, steal your lunch, so be careful!
|
||||
return """You can create plugins for Core-Lightning which do awesome things. Like me, the 'helpme' plugin! They can also, y'know, steal your lunch, so be careful!
|
||||
|
||||
There's a repository of useful plugins at https://github.com/lightningd/plugins
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
The Noise plugin allows sending and receiving private messages through the
|
||||
Lightning Network. It is implemented on top to c-lightning's ~createonion~ and
|
||||
Lightning Network. It is implemented on top to Core-Lightning's ~createonion~ and
|
||||
~sendonion~ RPC methods that allow delivering custom payloads to a specific
|
||||
node, as well as the ~htlc_accepted~ hook which can be used to extract the
|
||||
message from the onion payload.
|
||||
|
||||
Reference in New Issue
Block a user