From 8ae041c24d8c16dc9d8f63fe8b9c4569fbee1695 Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Tue, 2 Apr 2024 13:03:49 +0200 Subject: [PATCH] docs: replace socketfile with grpc parameters --- deploy/deploy.yml | 3 ++- deploy/lspd-install.sh | 3 ++- docs/CLN.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deploy/deploy.yml b/deploy/deploy.yml index 68b3e12d..bf67e0a5 100644 --- a/deploy/deploy.yml +++ b/deploy/deploy.yml @@ -233,6 +233,7 @@ Resources: wallet=postgres://lightning:$LIGHTNING_DB_PASSWORD@localhost:5432/lightning plugin=/home/lightning/.lightning/plugins/lspd_cln_plugin lsp-listen=127.0.0.1:12312 + grpc-port=12313 max-concurrent-htlcs=30 dev-allowdustreserve=true log-file=/var/log/lightningd/lightningd.log @@ -333,7 +334,7 @@ Resources: MEMPOOL_API_BASE_URL=https://mempool.space/api/v1/ MEMPOOL_PRIORITY=economy - NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "socketPath": "/home/lightning/.lightning/bitcoin/lightning-rpc" } } ]' + NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "grpcAddress": "127.0.0.1:12313", "caCert": "/home/lightning/.lightning/mainnet/ca.pem", "clientCert": "/home/lightning/.lightning/mainnet/client.pem", "clientKey": "/home/lightning/.lightning/mainnet/client-key.pem" } } ]' EOL sudo systemctl start lspd.service diff --git a/deploy/lspd-install.sh b/deploy/lspd-install.sh index 6ab75384..c77c4c72 100644 --- a/deploy/lspd-install.sh +++ b/deploy/lspd-install.sh @@ -164,6 +164,7 @@ alias="${LSPName}" wallet=postgres://lightning:$LIGHTNING_DB_PASSWORD@localhost:5432/lightning plugin=/home/lightning/.lightning/plugins/lspd_cln_plugin lsp-listen=127.0.0.1:12312 +grpc-port=12313 max-concurrent-htlcs=30 dev-allowdustreserve=true log-file=/var/log/lightningd/lightningd.log @@ -264,7 +265,7 @@ CHANNELMISMATCH_NOTIFICATION_FROM="replaceme@example.com" MEMPOOL_API_BASE_URL=https://mempool.space/api/v1/ MEMPOOL_PRIORITY=economy -NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "socketPath": "/home/lightning/.lightning/bitcoin/lightning-rpc" } } ]' +NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "grpcAddress": "127.0.0.1:12313", "caCert": "/home/lightning/.lightning/mainnet/ca.pem", "clientCert": "/home/lightning/.lightning/mainnet/client.pem", "clientKey": "/home/lightning/.lightning/mainnet/client-key.pem" } } ]' EOL sudo systemctl start lspd.service diff --git a/docs/CLN.md b/docs/CLN.md index b0a917f9..5ef0a7a6 100644 --- a/docs/CLN.md +++ b/docs/CLN.md @@ -56,7 +56,7 @@ ENV variables: Example of NODES variable: ``` -NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "socketPath": "/home/lightning/.lightning/bitcoin/lightning-rpc" } } ]' +NODES='[ { "name": "${LSPName}", "nodePubkey": "$PUBKEY", "lspdPrivateKey": "$LSPD_PRIVATE_KEY", "tokens": ["$TOKEN"], "host": "$EXTERNAL_IP:9735", "targetConf": "6", "minConfs": "6", "minHtlcMsat": "600", "baseFeeMsat": "1000", "feeRate": "0.000001", "timeLockDelta": "144", "channelFeePermyriad": "40", "channelMinimumFeeMsat": "2000000", "additionalChannelCapacity": "100000", "maxInactiveDuration": "3888000", "cln": { "pluginAddress": "127.0.0.1:12312", "grpcAddress": "127.0.0.1:12313", "caCert": "/home/lightning/.lightning/mainnet/ca.pem", "clientCert": "/home/lightning/.lightning/mainnet/client.pem", "clientKey": "/home/lightning/.lightning/mainnet/client-key.pem" } } ]' ``` ### Running lspd on CLN @@ -68,6 +68,7 @@ In order to run lspd on top of CLN, you need to run the lspd process and run cln - `--max-concurrent-htlcs=30`: In order to use zero reserve channels on the client side, (local max_accepted_htlcs + remote max_accepted_htlcs + 2) * dust limit must be lower than the channel capacity. Reduce max-concurrent-htlcs or increase channel capacity accordingly. - `--dev-allowdustreserve=true`: In order to allow zero reserve on the client side (requires developer mode turned on) - `--lsp-listen=127.0.0.1:`: Set on which port the lspd_cln_plugin will listen for lspd communication, must be the same port that is used in pluginAddress parameter in NODES env variable. + - `--grpc-port=`: Set on which port the cln grpc server will listen. 1. Run lspd ### Final step