Skip to content

Commit

Permalink
docs: replace socketfile with grpc parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Apr 2, 2024
1 parent 40db5f2 commit 8ae041c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion deploy/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion deploy/lspd-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/CLN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:<port>`: 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=<grpc-port>`: Set on which port the cln grpc server will listen.
1. Run lspd

### Final step
Expand Down

0 comments on commit 8ae041c

Please sign in to comment.