Skip to content

Commit

Permalink
Update/v24.05 (#129)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Dominion5254 authored Jun 14, 2024
1 parent 231cd9e commit 29f0fe7
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 15 deletions.
54 changes: 48 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
FROM node:18-bullseye as ui

RUN apt-get update && apt-get install -y \
build-essential \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev

WORKDIR /app

COPY ui/apps/backend ./apps/backend
Expand Down Expand Up @@ -80,6 +88,7 @@ RUN apt-get update -qq && \
gettext \
git \
gnupg \
jq \
libpq-dev \
libtool \
libffi-dev \
Expand All @@ -95,7 +104,9 @@ RUN apt-get update -qq && \
libev-dev \
libevent-dev \
qemu-user-static \
wget
wget \
unzip \
tclsh

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


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

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

# We need to build python plugins on the target's arch because python doesn't support cross build
FROM debian:bullseye-slim as builder-python
RUN apt-get update -qq && \
apt-get install -qq -y --no-install-recommends \
git \
curl \
libtool \
pkg-config \
autoconf \
automake \
build-essential \
libffi-dev \
libssl-dev \
python3.9 \
python3-dev \
python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
ENV PATH=$PATH:/root/.cargo/bin/
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN rustup toolchain install stable --component rustfmt --allow-downgrade

WORKDIR /opt/lightningd
COPY lightning/plugins/clnrest/requirements.txt plugins/clnrest/requirements.txt
COPY lightning/plugins/wss-proxy/requirements.txt plugins/wss-proxy/requirements.txt
ENV PYTHON_VERSION=3
RUN pip3 install -r plugins/clnrest/requirements.txt && \
pip3 install -r plugins/wss-proxy/requirements.txt && \
pip3 cache purge

FROM node:18-bullseye-slim as final

ENV LIGHTNINGD_DATA=/root/.lightning
Expand All @@ -167,9 +211,7 @@ COPY --from=clboss /usr/local/bin/clboss /usr/local/libexec/c-lightning/plugins/
# lightningd
COPY --from=builder /tmp/lightning_install/ /usr/local/
COPY --from=builder /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/
COPY --from=builder /opt/lightningd/plugins/clnrest /usr/local/lib/python3.9/dist-packages/
COPY --from=builder /opt/lightningd/contrib/pyln-client /usr/local/lib/python3.9/dist-packages/
COPY --from=builder /opt/lightningd/contrib/pyln-testing /usr/local/lib/python3.9/dist-packages/
COPY --from=builder-python /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/
COPY --from=downloader /opt/bitcoin/bin /usr/bin

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ implementation of the [Lightning Network](https://lightning.network/) protocol.
- [docker](https://docs.docker.com/get-docker)
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
- [yq](https://mikefarah.gitbook.io/yq)
- [start-sdk](https://github.com/Start9Labs/start-os/tree/sdk/backend)
- [start-sdk](https://github.com/Start9Labs/start-os/blob/v0.3.5.1/core/install-sdk.sh)
- [make](https://www.gnu.org/software/make/)
- [deno](https://deno.land/)
- [md-packer](https://github.com/Start9Labs/md-packer)
Expand Down
3 changes: 3 additions & 0 deletions docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ export COMMANDO_CONFIG="/root/.lightning/.commando-env"
export APP_CORE_LIGHTNING_PORT=4500
export APP_MODE=production
export APP_PROTOCOL="http"
export CORE_LIGHTNING_PATH="/root/.lightning"
export APP_BITCOIN_NETWORK="bitcoin"
export APP_CORE_LIGHTNING_DAEMON_GRPC_PORT=2106

EXISTING_PUBKEY=""
GETINFO_RESPONSE=""
Expand Down
2 changes: 1 addition & 1 deletion lightning
Submodule lightning updated 977 files
24 changes: 20 additions & 4 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
id: c-lightning
version: 24.02.2.1
version: 24.05.0
title: Core Lightning
license: BSD-MIT
wrapper-repo: https://github.com/Start9Labs/cln-startos
upstream-repo: https://github.com/ElementsProject/lightning
support-site: https://github.com/ElementsProject/lightning/issues
marketing-site: https://blockstream.com/lightning
release-notes: |-
* Add Clams Remote Config option
* Update clboss to 0.13.1
* Minor logging changes
* Update to CLN 24.05.0 [Release Notes](https://github.com/ElementsProject/lightning/releases/tag/v24.05)
* Update cln-application UI to v0.0.5
* Update plugins
* Expose gRPC interface
build: ["make"]
description:
short: "An implementation of the Lightning Network protocol by Blockstream."
Expand Down Expand Up @@ -186,6 +187,21 @@ interfaces:
- tcp
- http
- ws
grpc:
name: gRPC
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.
tor-config:
port-mapping:
2106: "2106"
lan-config:
2106:
ssl: true
internal: 2106
ui: false
protocols:
- tcp
- http
- grpc
dependencies:
bitcoind:
version: ">=0.21.1.2 <29.0.0"
Expand Down
9 changes: 9 additions & 0 deletions scripts/procedures/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ export const [getConfig, setConfigMatcher] = compat.getConfigAndMatcher({
target: "tor-address",
interface: "websocket",
},
"grpc-tor-address": {
name: "gRPC Tor Address",
description: "The Tor address of the CLN gRPC interface.",
type: "pointer",
subtype: "package",
"package-id": "c-lightning",
target: "tor-address",
interface: "grpc",
},
"watchtower-tor-address": {
name: "TEoS Watchtower API Address",
description: "The Tor address of the TEoS Watchtower API",
Expand Down
2 changes: 1 addition & 1 deletion scripts/procedures/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export const migration: T.ExpectedExports.migration =
)
},
},
"24.02.2.1",
"24.05.0",
);

function generateRandomString(length: number) {
Expand Down
1 change: 1 addition & 0 deletions scripts/procedures/setConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ experimental-onion-messages
experimental-offers
${enableExperimentalShutdownWrongFunding}
bind-addr=ws::4269
grpc-port=2106
${enableClamsRemoteWebsocket}
${enableSlingPlugin}
${enableRestPlugin}
Expand Down
2 changes: 1 addition & 1 deletion ui
Submodule ui updated 110 files

0 comments on commit 29f0fe7

Please sign in to comment.