Skip to content

Commit

Permalink
update all references to go build and cln_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Feb 5, 2024
1 parent 48e4408 commit a072e5c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-lspd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ runs:
name: build-artifacts
path: |
lspd
lspd_plugin
lspd_cln_plugin
4 changes: 2 additions & 2 deletions .github/actions/test-lspd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runs:
- name: Set permissions
run: |
chmod 755 lspd
chmod 755 lspd_plugin
chmod 755 lspd_cln_plugin
shell: bash

- name: Cache LND client
Expand Down Expand Up @@ -126,7 +126,7 @@ runs:
--lightningdexec ${{ github.workspace }}/lightning_git/lightningd/lightningd \
--lndexec ~/go_lnd_lsp/bin/lnd \
--lndmobileexec ~/go_lnd_client/bin/lnd \
--clnpluginexec ${{ github.workspace }}/lspd_plugin \
--clnpluginexec ${{ github.workspace }}/lspd_cln_plugin \
--lspdexec ${{ github.workspace }}/lspd \
--lspdmigrationsdir ${{ github.workspace }}/postgresql/migrations \
--preservelogs \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ In order to run the integration tests, you need:
- lnd v0.16.4 breez client version https://github.com/breez/lnd/commit/3c0854adcfc924a6d759a6ee4640c41266b9f8b4
- bitcoind (tested with v23.0)
- bitcoin-cli (tested with v23.0)
- build of lspd (go build .)
- build of lspd cln plugin (go build -o lspd_plugin cln_plugin/cmd)
- build of lspd (`make release-lspd`)
- build of lspd cln plugin (`make release-plugin`)

To run the integration tests, run the following command from the lspd root directory (replacing the appropriate paths).

Expand All @@ -44,7 +44,7 @@ go test -timeout 20m -v ./itest \
--lightningdexec /full/path/to/lightningd \
--lndexec /full/path/to/lnd \
--lndmobileexec /full/path/to/lnd \
--clnpluginexec /full/path/to/lspd_plugin \
--clnpluginexec /full/path/to/lspd_cln_plugin \
--lspdexec /full/path/to/lspd \
--lspdmigrationsdir /full/path/to/lspd/postgresql/migrations
```
Expand Down
9 changes: 3 additions & 6 deletions deploy/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Resources:
bitcoin-retry-timeout=3600
alias="${LSPName}"
wallet=postgres://lightning:$LIGHTNING_DB_PASSWORD@localhost:5432/lightning
plugin=/home/lightning/.lightning/plugins/lspd_plugin
plugin=/home/lightning/.lightning/plugins/lspd_cln_plugin
lsp-listen=127.0.0.1:12312
max-concurrent-htlcs=30
dev-allowdustreserve=true
Expand Down Expand Up @@ -273,13 +273,10 @@ Resources:
cd /opt/lspd
source /etc/bash.bashrc
export PATH=$PATH:/usr/local/go/bin
sudo env "PATH=$PATH" go get
sudo env "PATH=$PATH" go get github.com/breez/lspd/cln_plugin
sudo env "PATH=$PATH" go build .
sudo env "PATH=$PATH" go build -o lspd_plugin ./cln_plugin/cmd
sudo env "PATH=$PATH" make release-all
sudo cp lspd /usr/local/bin/
sudo mkdir /home/lightning/.lightning/plugins
sudo cp lspd_plugin /home/lightning/.lightning/plugins/
sudo cp lspd_cln_plugin /home/lightning/.lightning/plugins/

cat <<EOL | sudo tee /etc/systemd/system/lspd.service
[Unit]
Expand Down
9 changes: 3 additions & 6 deletions deploy/lspd-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ addr=:9735
bitcoin-retry-timeout=3600
alias="${LSPName}"
wallet=postgres://lightning:$LIGHTNING_DB_PASSWORD@localhost:5432/lightning
plugin=/home/lightning/.lightning/plugins/lspd_plugin
plugin=/home/lightning/.lightning/plugins/lspd_cln_plugin
lsp-listen=127.0.0.1:12312
max-concurrent-htlcs=30
dev-allowdustreserve=true
Expand Down Expand Up @@ -204,13 +204,10 @@ git clone https://github.com/breez/lspd.git /opt/lspd
cd /opt/lspd
source /etc/bash.bashrc
export PATH=$PATH:/usr/local/go/bin
sudo env "PATH=$PATH" go get
sudo env "PATH=$PATH" go get github.com/breez/lspd/cln_plugin
sudo env "PATH=$PATH" go build .
sudo env "PATH=$PATH" go build -o lspd_plugin ./cln_plugin/cmd
sudo env "PATH=$PATH" make release-all
sudo cp lspd /usr/local/bin/
sudo mkdir /home/lightning/.lightning/plugins
sudo cp lspd_plugin /home/lightning/.lightning/plugins/
sudo cp lspd_cln_plugin /home/lightning/.lightning/plugins/

cat <<EOL | sudo tee /etc/systemd/system/lspd.service
[Unit]
Expand Down
8 changes: 4 additions & 4 deletions docs/CLN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Needs to be built from source:
```
git clone https://github.com/breez/lspd
cd lspd
go build . # compile lspd
go build -o lspd_plugin ./cln_plugin/cmd # compile lspd cln plugin
make release-all
```
This will create two binaries, `lspd` and `lspd_cln_plugin`

#### Postgresql
Lspd supports postgresql backend. To create database and new role to access it on your postgres server use:
Expand Down Expand Up @@ -64,11 +64,11 @@ In order to run lspd on top of CLN, you need to run the lspd process and run cln

1. Run cln with the following options set:
- `--developer`: to allow passing the `--dev-allowdustreserve` flag
- `--plugin=/path/to/lspd_plugin`: to use lspd as plugin
- `--plugin=/path/to/lspd_cln_plugin`: to use lspd as plugin
- `--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)
- `--allow-deprecated-apis=true`: lspd currently uses a deprecated api, so needs this flag set.
- `--lsp-listen=127.0.0.1:<port>`: Set on which port the lspd_plugin will listen for lspd communication, must be the same port that is used in pluginAddress parameter in NODES env variable.
- `--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.
1. Run lspd

### Final step
Expand Down
2 changes: 1 addition & 1 deletion docs/LND.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Needs to be build from source:
```
git clone https://github.com/breez/lspd
cd lspd
go build . # compile lspd
make release-lspd # compile lspd
```
### Postgresql
Lspd supports postgresql backend. Create new database and user for lspd:
Expand Down

0 comments on commit a072e5c

Please sign in to comment.