FAQ.cl: multifundchannel, feeadjuster, rebrand

This commit is contained in:
openoms 2022-06-08 21:33:38 +01:00
parent 7b264a266e
commit 19f5424315
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65

276
FAQ.cl.md
View File

@ -1,77 +1,80 @@
<!-- omit in toc --> <!-- omit in toc -->
# C-lightning on the RaspiBlitz FAQ # Core Lightning on the RaspiBlitz FAQ
--- ---
Table of Contents Table of Contents
--- ---
- [Common questions about the different Lightning Network implementations](#common-questions-about-the-different-lightning-network-implementations) - [Table of Contents](#table-of-contents)
- [Can LND and C-lightning nodes open channels to each other and route payments?](#can-lnd-and-c-lightning-nodes-open-channels-to-each-other-and-route-payments) - [Common questions about the different Lightning Network implementations](#common-questions-about-the-different-lightning-network-implementations)
- [Can I run LND and C-lightning connected to the same node?](#can-i-run-lnd-and-c-lightning-connected-to-the-same-node) - [Can LND and CLN nodes open channels to each other and route payments?](#can-lnd-and-cln-nodes-open-channels-to-each-other-and-route-payments)
- [Can I convert an LND node to C-lightning (or the opposite)?](#can-i-convert-an-lnd-node-to-c-lightning-or-the-opposite) - [Can I run LND and CLN connected to the same node?](#can-i-run-lnd-and-cln-connected-to-the-same-node)
- [Is there a table to quickly compare LND and C-Lightning?](#is-there-a-table-to-quickly-compare-lnd-and-c-lightning) - [Can I convert an LND node to CLN (or the opposite)?](#can-i-convert-an-lnd-node-to-cln-or-the-opposite)
- [C-lightning official documentation and support channels](#c-lightning-official-documentation-and-support-channels) - [Is there a table to quickly compare LND and CLN?](#is-there-a-table-to-quickly-compare-lnd-and-cln)
- [Commands and aliases](#commands-and-aliases) - [CLN official documentation and support channels](#cln-official-documentation-and-support-channels)
- [Directories](#directories) - [Commands and aliases](#commands-and-aliases)
- [Config file](#config-file) - [Directories](#directories)
- [Default values](#default-values) - [Config file](#config-file)
- [All possible config settings](#all-possible-config-settings) - [Default values](#default-values)
- [Plug-ins](#plug-ins) - [All possible config settings](#all-possible-config-settings)
- [General info](#general-info) - [Plug-ins](#plug-ins)
- [Directories](#directories-1) - [General info](#general-info)
- [Implemented plugins](#implemented-plugins) - [Directories](#directories-1)
- [Add a custom plugin](#add-a-custom-plugin) - [Implemented plugins](#implemented-plugins)
- [CLBOSS](#clboss) - [Add a custom plugin](#add-a-custom-plugin)
- [Feeadjuster](#feeadjuster) - [CLBOSS](#clboss)
- [Dual funded channels](#dual-funded-channels) - [Feeadjuster](#feeadjuster)
- [Reading](#reading) - [Dual funded channels](#dual-funded-channels)
- [Setting up](#setting-up) - [Reading](#reading)
- [Open a dual funded channel](#open-a-dual-funded-channel) - [Setting up](#setting-up)
- [Fundchannel syntax](#fundchannel-syntax) - [Open a dual funded channel](#open-a-dual-funded-channel)
- [Offers](#offers) - [Fundchannel syntax](#fundchannel-syntax)
- [About the feature bits](#about-the-feature-bits) - [Multifundchannel syntax](#multifundchannel-syntax)
- [Testnets](#testnets) - [Offers](#offers)
- [Backups](#backups) - [About the feature bits](#about-the-feature-bits)
- [Seed](#seed) - [Testnets](#testnets)
- [How to display the hsm_secret in a human-readable format?](#how-to-display-the-hsm_secret-in-a-human-readable-format) - [Backups](#backups)
- [How to test the seedwords?](#how-to-test-the-seedwords) - [Seed](#seed)
- [How to restore the hsm_secret from text?](#how-to-restore-the-hsm_secret-from-text) - [How to display the hsm\_secret in a human-readable format?](#how-to-display-the-hsm_secret-in-a-human-readable-format)
- [Channel database](#channel-database) - [How to test the seedwords?](#how-to-test-the-seedwords)
- [Recovery](#recovery) - [How to restore the hsm\_secret from text?](#how-to-restore-the-hsm_secret-from-text)
- [Recover from a cl-rescue file](#recover-from-a-cl-rescue-file) - [Channel database](#channel-database)
- [Recover from a seed](#recover-from-a-seed) - [Recovery](#recovery)
- [Rescan the chain after restoring a used c-lightning wallet](#rescan-the-chain-after-restoring-a-used-c-lightning-wallet) - [Recover from a cl-rescue file](#recover-from-a-cl-rescue-file)
- [Guesstoremote to recover funds from force-closed channels](#guesstoremote-to-recover-funds-from-force-closed-channels) - [Recover from a seed](#recover-from-a-seed)
- [Update](#update) - [Rescan the chain after restoring a used CLN wallet](#rescan-the-chain-after-restoring-a-used-cln-wallet)
- [Update to a new C-lightning release](#update-to-a-new-c-lightning-release) - [Guesstoremote to recover funds from force-closed channels](#guesstoremote-to-recover-funds-from-force-closed-channels)
- [Experimental update to the latest master](#experimental-update-to-the-latest-master) - [sqlite3 queries](#sqlite3-queries)
- [sqlite3 queries](#sqlite3-queries) - [Update](#update)
- [Script file help list](#script-file-help-list) - [Update to a new CLN release](#update-to-a-new-cln-release)
- [Experimental update to the latest master](#experimental-update-to-the-latest-master)
- [sqlite3 queries](#sqlite3-queries-1)
- [Script file help list](#script-file-help-list)
--- ---
## Common questions about the different Lightning Network implementations ## Common questions about the different Lightning Network implementations
### Can LND and C-lightning nodes open channels to each other and route payments? ### Can LND and CLN nodes open channels to each other and route payments?
* Yes, all [BOLT specification](https://github.com/lightningnetwork/lightning-rfc) compliant implementations can open channels to each other and route payments. * Yes, all [BOLT specification](https://github.com/lightningnetwork/lightning-rfc) compliant implementations can open channels to each other and route payments.
### Can I run LND and C-lightning connected to the same node? ### Can I run LND and CLN connected to the same node?
* Yes, both can run parallel on a RaspiBlitz and even have channels witch each other. * Yes, both can run parallel on a RaspiBlitz and even have channels witch each other.
### Can I convert an LND node to C-lightning (or the opposite)? ### Can I convert an LND node to CLN (or the opposite)?
* No, currently there are no tools available to convert between the databases storing the channel states. * No, currently there are no tools available to convert between the databases storing the channel states.
The channels would need to be closed to use the same funds in an other node. The channels would need to be closed to use the same funds in an other node.
### Is there a table to quickly compare LND and C-Lightning? ### Is there a table to quickly compare LND and CLN?
* see [github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md](https://github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md) * see [github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md](https://github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md)
--- ---
## C-lightning official documentation and support channels ## CLN official documentation and support channels
* https://lightning.readthedocs.io/ * https://lightning.readthedocs.io/
* https://github.com/ElementsProject/lightning * https://github.com/ElementsProject/lightning
* Telegram: https://t.me/lightningd * Telegram: https://t.me/lightningd
* Discord: https://discord.gg/YGdpyj2aXj * Discord: https://discord.gg/YGdpyj2aXj
* IRC: #c-lightning on libera.chat or https://matrix.to/#/#c-lightning:libera.chat * IRC: #c-lightning on libera.chat or https://matrix.to/#/#c-lightning:libera.chat
## Commands and aliases ## Commands and aliases
* Check if the C-lightning daemon is running: * Check if the CLN daemon is running:
``` ```
sudo systemctl status lightningd sudo systemctl status lightningd
``` ```
@ -295,14 +298,14 @@ or with the alias: `cllog`
### CLBOSS ### CLBOSS
A plugin for automatic LN node management. A plugin for automatic LN node management.
CLBOSS only requires to have funds deposited to the onchain wallet of C-lightning. CLBOSS only requires to have funds deposited to the onchain wallet of CLN.
The recommended amount to start is ~ 10 million satoshis (0.1 BTC). The recommended amount to start is ~ 10 million satoshis (0.1 BTC).
It does automatically: It does automatically:
* generate outbound capacity - opens channels * generate outbound capacity - opens channels
* generate inbound capacity - submarine swaps through the boltz.exchange API * generate inbound capacity - submarine swaps through the boltz.exchange API
* aware of onchain fees and mempool through c-lightning and makes transactions when fees are low * aware of onchain fees and mempool through CLN and makes transactions when fees are low
* manages rebalancing - performs probing * manages rebalancing - performs probing
* closes bad channels (inactive or low traffic) - this function needs to activated manually * closes bad channels (inactive or low traffic) - this function needs to activated manually
@ -327,72 +330,34 @@ https://github.com/ZmnSCPxj/clboss#clboss-status
* Install: * Install:
`config.scripts/cl-plugin.feeadjuster.sh on` `config.scripts/cl-plugin.feeadjuster.sh on`
* to set the default fees add to the C-lightning `config` file: * to set the default fees add to the CLN config file (`clconf`)
``` ```
fee-base=BASEFEE_IN_MILLISATS fee-base=BASEFEE_IN_MILLISATS
fee-per-satoshi=PPM_FEE_IN_SATS fee-per-satoshi=PPM_FEE_IN_SATS
``` ```
* more options for the feeadjuster to be set in the c-lightning config can be seen in the [code](https://github.com/lightningd/plugins/blob/c16c564c2c5549b8f7236815490260c49e9e9bf4/feeadjuster/feeadjuster.py#L318):
* example feeadjuster options
``` ```
plugin.add_option( fee-base=0
"feeadjuster-deactivate-fuzz", fee-per-satoshi=200
False, feeadjuster-imbalance=0.2
"Deactivate update threshold randomization and hysterisis.", feeadjuster-threshold=0.10
"flag" feeadjuster-threshold-abs=0.01btc
) feeadjuster-enough-liquidity=1000000000msat
plugin.add_option( feeadjuster-deactivate-fee-update
"feeadjuster-deactivate-fee-update", feeadjuster-adjustment-method=hard
False,
"Deactivate automatic fee updates for forward events.",
"flag"
)
plugin.add_option(
"feeadjuster-threshold",
"0.05",
"Relative channel balance delta at which to trigger an update. Default 0.05 means 5%. "
"Note: it's also fuzzed by 1.5%",
"string"
)
plugin.add_option(
"feeadjuster-threshold-abs",
"0.001btc",
"Absolute channel balance delta at which to always trigger an update. "
"Note: it's also fuzzed by 1.5%",
"string"
)
plugin.add_option(
"feeadjuster-enough-liquidity",
"0msat",
"Beyond this liquidity do not adjust fees. "
"This also modifies the fee curve to achieve having this amount of liquidity. "
"Default: '0msat' (turned off).",
"string"
)
plugin.add_option(
"feeadjuster-adjustment-method",
"default",
"Adjustment method to calculate channel fee"
"Can be 'default', 'soft' for less difference or 'hard' for higher difference"
"string"
)
plugin.add_option(
"feeadjuster-imbalance",
"0.5",
"Ratio at which channel imbalance the feeadjuster should start acting. "
"Default: 0.5 (always). Set higher or lower values to limit feeadjuster's "
"activity to more imbalanced channels. "
"E.g. 0.3 for '70/30'% or 0.6 for '40/60'%.",
"string"
)
plugin.add_option(
"feeadjuster-feestrategy",
"global",
"Sets the per channel fee selection strategy. "
"Can be 'global' to use global config or default values, "
"or 'median' to use the median fees from peers of peer "
"Default: 'global'.",
"string"
``` ```
* effect displayed in the logs (`cllog`)
```
plugin-feeadjuster.py:
Plugin feeadjuster initialized (0 base / 200 ppm) with an imbalance of 20%/80%,
update_threshold: 10%, update_threshold_abs: 1000000000msat,
enough_liquidity: 1000000000msat, deactivate_fuzz: None,
forward_event_subscription: False, adjustment_method: get_ratio_hard,
fee_strategy: get_fees_global, listchannels_by_dst: True
```
* more options for the feeadjuster to be set in the CLN config can be seen in the [code](https://github.com/lightningd/plugins/blob/master/feeadjuster/feeadjuster.py#L323)
* start the feeadjuster * start the feeadjuster
``` ```
@ -431,7 +396,7 @@ Add the line:
``` ```
experimental-dual-fund experimental-dual-fund
``` ```
Save and restart C-lightning. Save and restart CLN.
* set up a liquidity ad: * set up a liquidity ad:
``` ```
@ -493,6 +458,61 @@ the feerate is in `perkb` by default, e.g. use 1000 for 1 sat/byte
lightning-cli fundchannel feerate=PERKB_FEERATE utxos='["TRANSACTION_ID:INDDEX_NUMBER"]' -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE lightning-cli fundchannel feerate=PERKB_FEERATE utxos='["TRANSACTION_ID:INDDEX_NUMBER"]' -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE
``` ```
#### Multifundchannel syntax
* discussed in https://github.com/ElementsProject/lightning/issues/4642#issuecomment-1149657371
* see a good format (json autoformatting tools help - like `CTRL`+`SHIFT`+`i` in VSCode):
```
₿ lightning-cli multifundchannel '[
{
"id": "nodeID1",
"amount": "amount_in_sats"
},
{
"id": "nodeID2",
"amount": "amount_in_sats"
},
{
"id": "nodeID3",
"amount": "amount_in_sats"
},
{
"id": "nodeID4",
"amount": "amount_in_sats",
}
]' 1000perkb
```
* The returned output:
```
{
"tx": "RAW............TX",
"txid": "TX................ID",
"channel_ids": [
{
"id": "nodeID1",
"channel_id": "CHANNEL_ID2",
"outnum": 3
},
{
"id": "nodeID2",
"channel_id": "CHANNEL_ID1",
"outnum": 4
},
{
"id": "nodeID3",
"channel_id": "CHANNEL_ID4",
"outnum": 1
},
{
"id": "nodeID4",
"channel_id": "CHANNEL_ID3",
"outnum": 2
}
],
"failed": []
}
```
### Offers ### Offers
* Details at bolt12.org * Details at bolt12.org
* Create an offer to receive payments: * Create an offer to receive payments:
@ -582,7 +602,7 @@ Will need to pay through a peer which supports the onion messages which means yo
* The file where the seed is stored (until encrypted) is on the disk: `/home/bitcoin/.lightning/bitcoin/seedwords.info` * The file where the seed is stored (until encrypted) is on the disk: `/home/bitcoin/.lightning/bitcoin/seedwords.info`
* Show manually with: * Show manually with:
`sudo cat /home/bitcoin/.lightning/bitcoin/seedwords.info` `sudo cat /home/bitcoin/.lightning/bitcoin/seedwords.info`
* If there is no such file and you have not funded the C-lightning wallet yet can reset the wallet and the next wallet will be created with a seed. * If there is no such file and you have not funded the CLN wallet yet can reset the wallet and the next wallet will be created with a seed.
### How to display the hsm_secret in a human-readable format? ### How to display the hsm_secret in a human-readable format?
* If there is no seed available it is best to save the hsm_secret as a file with `scp` or note down the alphanumeric characters in the two line displayed with: * If there is no seed available it is best to save the hsm_secret as a file with `scp` or note down the alphanumeric characters in the two line displayed with:
@ -634,7 +654,7 @@ Will need to pay through a peer which supports the onion messages which means yo
#### Recover from a seed #### Recover from a seed
* use the `REPAIR-CL` - `SEEDRESTORE` option in the menu for instructions to paste the seedwords to restore * use the `REPAIR-CL` - `SEEDRESTORE` option in the menu for instructions to paste the seedwords to restore
#### Rescan the chain after restoring a used c-lightning wallet #### Rescan the chain after restoring a used CLN wallet
* can use the `menu` -> `REPAIR` -> `REPAIR-CL` -> `RESCAN` option * can use the `menu` -> `REPAIR` -> `REPAIR-CL` -> `RESCAN` option
* or follow the manual process: * or follow the manual process:
@ -722,8 +742,8 @@ Will need to pay through a peer which supports the onion messages which means yo
``` ```
## Update ## Update
### Update to a new C-lightning release ### Update to a new CLN release
* See the tagged releases by the C-lightning team: [github.com/ElementsProject/lightning/releases](https://github.com/ElementsProject/lightning/releases) * See the tagged releases by the CLN team: [github.com/ElementsProject/lightning/releases](https://github.com/ElementsProject/lightning/releases)
* Will be able to update to new releases from the menu - `UPDATE` - `CL` * Will be able to update to new releases from the menu - `UPDATE` - `CL`
* Since downgrading the lightning database is not allowed the updated version will persist if the SDcard is reflashed. * Since downgrading the lightning database is not allowed the updated version will persist if the SDcard is reflashed.
@ -812,13 +832,13 @@ cl.hsmtool.sh [change-password] <mainnet|testnet|signet> <NewPassword>
+ ./cl.install-service.sh -h + ./cl.install-service.sh -h
Script to set up or update the C-lightning systemd service Script to set up or update the CLN systemd service
Usage: Usage:
/home/admin/config.scripts/cl.install-service.sh <mainnet|testnet|signet> /home/admin/config.scripts/cl.install-service.sh <mainnet|testnet|signet>
+ ./cl.install.sh -h + ./cl.install.sh -h
C-lightning install script CLN install script
The default version is: v0.10.1 The default version is: v0.10.1
Setting up on mainnet unless otherwise specified Setting up on mainnet unless otherwise specified
mainnet / testnet / signet instances can run parallel mainnet / testnet / signet instances can run parallel
@ -831,7 +851,7 @@ cl.install.sh display-seed <mainnet|testnet|signet>
+ ./cl-plugin.backup.sh -h + ./cl-plugin.backup.sh -h
Install the backup plugin for C-lightning Install the backup plugin for CLN
Replicates the lightningd.sqlite3 database on the SDcard Replicates the lightningd.sqlite3 database on the SDcard
Usage: Usage:
@ -843,14 +863,14 @@ https://github.com/lightningd/plugins/tree/master/backup
+ ./cl-plugin.clboss.sh -h + ./cl-plugin.clboss.sh -h
Install or remove the CLBOSS C-lightning plugin Install or remove the CLBOSS CLN plugin
version: v0.10 version: v0.10
Usage: Usage:
cl-plugin.clboss.sh [on|off] [testnet|mainnet|signet] cl-plugin.clboss.sh [on|off] [testnet|mainnet|signet]
+ ./cl-plugin.feeadjuster.sh -h + ./cl-plugin.feeadjuster.sh -h
Install the feeadjuster plugin for C-lightning Install the feeadjuster plugin for CLN
Usage: Usage:
cl-plugin.feeadjuster.sh [on|off] <testnet|mainnet|signet> cl-plugin.feeadjuster.sh [on|off] <testnet|mainnet|signet>
@ -864,14 +884,14 @@ cl-plugin.http.sh [on|off|connect] <norestart>
+ ./cl-plugin.sparko.sh -h + ./cl-plugin.sparko.sh -h
Install, remove, connect or get info about the Sparko plugin for C-lightning Install, remove, connect or get info about the Sparko plugin for CLN
version: v2.7 version: v2.7
Usage: Usage:
cl-plugin.sparko.sh [on|off|menu|connect] [testnet|mainnet|signet] [norestart] cl-plugin.sparko.sh [on|off|menu|connect] [testnet|mainnet|signet] [norestart]
+ ./cl-plugin.standard-python.sh -h + ./cl-plugin.standard-python.sh -h
Install and show the output of the chosen plugin for C-lightning Install and show the output of the chosen plugin for CLN
Usage: Usage:
cl-plugin.standard-python.sh on [plugin-name] <testnet|mainnet|signet> <persist|runonce> cl-plugin.standard-python.sh on [plugin-name] <testnet|mainnet|signet> <persist|runonce>
@ -883,7 +903,7 @@ https://github.com/lightningd/plugins
+ ./cl-plugin.summary.sh -h + ./cl-plugin.summary.sh -h
Install and show the output if the summary plugin for C-lightning Install and show the output if the summary plugin for CLN
Usage: Usage:
cl-plugin.summary.sh [testnet|mainnet|signet] [runonce] cl-plugin.summary.sh [testnet|mainnet|signet] [runonce]
@ -899,25 +919,25 @@ cl.rest.sh [on|off|connect] <mainnet|testnet|signet>
+ ./cl.setname.sh -h + ./cl.setname.sh -h
Config script to set the alias of the C-lightning node Config script to set the alias of the CLN node
cl.setname.sh [mainnet|testnet|signet] [?newName] cl.setname.sh [mainnet|testnet|signet] [?newName]
+ ./cl.spark.sh -h + ./cl.spark.sh -h
Install, remove or get info about the Spark Wallet for C-lightning Install, remove or get info about the Spark Wallet for CLN
version: v0.3.0rc version: v0.3.0rc
Usage: Usage:
cl.spark.sh [on|off|menu] <testnet|mainnet|signet> cl.spark.sh [on|off|menu] <testnet|mainnet|signet>
+ ./cl.update.sh -h + ./cl.update.sh -h
Interim optional C-lightning updates between RaspiBlitz releases. Interim optional CLN updates between RaspiBlitz releases.
cl.update.sh [info|verified|reckless] cl.update.sh [info|verified|reckless]
info -> get actual state and possible actions info -> get actual state and possible actions
verified -> only do recommended updates by RaspiBlitz team verified -> only do recommended updates by RaspiBlitz team
binary will be checked by signature and checksum binary will be checked by signature and checksum
reckless -> if you just want to update to the latest release reckless -> if you just want to update to the latest release
published on C-lightning GitHub releases (RC or final) without any published on CLN GitHub releases (RC or final) without any
testing or security checks. testing or security checks.
``` ```