Skip to content

Commit 29f0fe7

Browse files
authored
Update/v24.05 (#129)
* Update to 24.05 * update plugins submodule to latest * Add missing Dockerfile dependencies * Update ui to v0.0.5 * Add UI v0.0.5 dependencies * Add gRPC interface * update sdk link to 0.3.5.1 install script * add missing Dockerfile dependencies * fix env variable name
1 parent 231cd9e commit 29f0fe7

10 files changed

Lines changed: 86 additions & 15 deletions

File tree

Dockerfile

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
FROM node:18-bullseye as ui
22

3+
RUN apt-get update && apt-get install -y \
4+
build-essential \
5+
libcairo2-dev \
6+
libpango1.0-dev \
7+
libjpeg-dev \
8+
libgif-dev \
9+
librsvg2-dev
10+
311
WORKDIR /app
412

513
COPY ui/apps/backend ./apps/backend
@@ -80,6 +88,7 @@ RUN apt-get update -qq && \
8088
gettext \
8189
git \
8290
gnupg \
91+
jq \
8392
libpq-dev \
8493
libtool \
8594
libffi-dev \
@@ -95,7 +104,9 @@ RUN apt-get update -qq && \
95104
libev-dev \
96105
libevent-dev \
97106
qemu-user-static \
98-
wget
107+
wget \
108+
unzip \
109+
tclsh
99110

100111
# CLN
101112
RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz \
@@ -147,13 +158,46 @@ RUN pip3 wheel cryptography
147158
RUN pip3 install grpcio-tools
148159

149160

150-
RUN /root/.local/bin/poetry export -o requirements.txt --without-hashes --with dev
151-
RUN pip3 install -r requirements.txt
161+
RUN sed -i '/^clnrest\|^wss-proxy/d' pyproject.toml && \
162+
/root/.local/bin/poetry export -o requirements.txt --without-hashes
163+
RUN pip3 install -r requirements.txt && pip3 cache purge
152164

153165
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
154166
make && \
155167
/root/.local/bin/poetry run make install
156168

169+
# We need to build python plugins on the target's arch because python doesn't support cross build
170+
FROM debian:bullseye-slim as builder-python
171+
RUN apt-get update -qq && \
172+
apt-get install -qq -y --no-install-recommends \
173+
git \
174+
curl \
175+
libtool \
176+
pkg-config \
177+
autoconf \
178+
automake \
179+
build-essential \
180+
libffi-dev \
181+
libssl-dev \
182+
python3.9 \
183+
python3-dev \
184+
python3-pip && \
185+
apt-get clean && \
186+
rm -rf /var/lib/apt/lists/*
187+
188+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
189+
ENV PATH=$PATH:/root/.cargo/bin/
190+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
191+
RUN rustup toolchain install stable --component rustfmt --allow-downgrade
192+
193+
WORKDIR /opt/lightningd
194+
COPY lightning/plugins/clnrest/requirements.txt plugins/clnrest/requirements.txt
195+
COPY lightning/plugins/wss-proxy/requirements.txt plugins/wss-proxy/requirements.txt
196+
ENV PYTHON_VERSION=3
197+
RUN pip3 install -r plugins/clnrest/requirements.txt && \
198+
pip3 install -r plugins/wss-proxy/requirements.txt && \
199+
pip3 cache purge
200+
157201
FROM node:18-bullseye-slim as final
158202

159203
ENV LIGHTNINGD_DATA=/root/.lightning
@@ -167,9 +211,7 @@ COPY --from=clboss /usr/local/bin/clboss /usr/local/libexec/c-lightning/plugins/
167211
# lightningd
168212
COPY --from=builder /tmp/lightning_install/ /usr/local/
169213
COPY --from=builder /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/
170-
COPY --from=builder /opt/lightningd/plugins/clnrest /usr/local/lib/python3.9/dist-packages/
171-
COPY --from=builder /opt/lightningd/contrib/pyln-client /usr/local/lib/python3.9/dist-packages/
172-
COPY --from=builder /opt/lightningd/contrib/pyln-testing /usr/local/lib/python3.9/dist-packages/
214+
COPY --from=builder-python /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/
173215
COPY --from=downloader /opt/bitcoin/bin /usr/bin
174216

175217
RUN apt-get update && apt-get install -y --no-install-recommends \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ implementation of the [Lightning Network](https://lightning.network/) protocol.
1010
- [docker](https://docs.docker.com/get-docker)
1111
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
1212
- [yq](https://mikefarah.gitbook.io/yq)
13-
- [start-sdk](https://github.com/Start9Labs/start-os/tree/sdk/backend)
13+
- [start-sdk](https://github.com/Start9Labs/start-os/blob/v0.3.5.1/core/install-sdk.sh)
1414
- [make](https://www.gnu.org/software/make/)
1515
- [deno](https://deno.land/)
1616
- [md-packer](https://github.com/Start9Labs/md-packer)

docker_entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ export COMMANDO_CONFIG="/root/.lightning/.commando-env"
197197
export APP_CORE_LIGHTNING_PORT=4500
198198
export APP_MODE=production
199199
export APP_PROTOCOL="http"
200+
export CORE_LIGHTNING_PATH="/root/.lightning"
201+
export APP_BITCOIN_NETWORK="bitcoin"
202+
export APP_CORE_LIGHTNING_DAEMON_GRPC_PORT=2106
200203

201204
EXISTING_PUBKEY=""
202205
GETINFO_RESPONSE=""

lightning

Submodule lightning updated 977 files

manifest.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
id: c-lightning
2-
version: 24.02.2.1
2+
version: 24.05.0
33
title: Core Lightning
44
license: BSD-MIT
55
wrapper-repo: https://github.com/Start9Labs/cln-startos
66
upstream-repo: https://github.com/ElementsProject/lightning
77
support-site: https://github.com/ElementsProject/lightning/issues
88
marketing-site: https://blockstream.com/lightning
99
release-notes: |-
10-
* Add Clams Remote Config option
11-
* Update clboss to 0.13.1
12-
* Minor logging changes
10+
* Update to CLN 24.05.0 [Release Notes](https://github.com/ElementsProject/lightning/releases/tag/v24.05)
11+
* Update cln-application UI to v0.0.5
12+
* Update plugins
13+
* Expose gRPC interface
1314
build: ["make"]
1415
description:
1516
short: "An implementation of the Lightning Network protocol by Blockstream."
@@ -186,6 +187,21 @@ interfaces:
186187
- tcp
187188
- http
188189
- ws
190+
grpc:
191+
name: gRPC
192+
description: gRPC is a Rust-based plugin that provides a standardized API that apps, plugins, and other tools could use to interact with Core Lightning securely.
193+
tor-config:
194+
port-mapping:
195+
2106: "2106"
196+
lan-config:
197+
2106:
198+
ssl: true
199+
internal: 2106
200+
ui: false
201+
protocols:
202+
- tcp
203+
- http
204+
- grpc
189205
dependencies:
190206
bitcoind:
191207
version: ">=0.21.1.2 <29.0.0"

scripts/procedures/getConfig.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ export const [getConfig, setConfigMatcher] = compat.getConfigAndMatcher({
5555
target: "tor-address",
5656
interface: "websocket",
5757
},
58+
"grpc-tor-address": {
59+
name: "gRPC Tor Address",
60+
description: "The Tor address of the CLN gRPC interface.",
61+
type: "pointer",
62+
subtype: "package",
63+
"package-id": "c-lightning",
64+
target: "tor-address",
65+
interface: "grpc",
66+
},
5867
"watchtower-tor-address": {
5968
name: "TEoS Watchtower API Address",
6069
description: "The Tor address of the TEoS Watchtower API",

scripts/procedures/migrations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const migration: T.ExpectedExports.migration =
345345
)
346346
},
347347
},
348-
"24.02.2.1",
348+
"24.05.0",
349349
);
350350

351351
function generateRandomString(length: number) {

scripts/procedures/setConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ experimental-onion-messages
335335
experimental-offers
336336
${enableExperimentalShutdownWrongFunding}
337337
bind-addr=ws::4269
338+
grpc-port=2106
338339
${enableClamsRemoteWebsocket}
339340
${enableSlingPlugin}
340341
${enableRestPlugin}

ui

Submodule ui updated 110 files

0 commit comments

Comments
 (0)