12 Commits

Author SHA1 Message Date
Lakshya Singh
08d2776f20 cln: update to v24.05 clboss to master
add jq as new dependency
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-06-12 22:48:02 +05:30
Ken Sedgwick
fbd1eb39d6 Merge branch 'king-11/plugin-update' into 'main'
cln: add summars, monitor and clnrest

See merge request lightning-signer/vls-container!29
2024-06-12 15:35:57 +00:00
Lakshya Singh
d254b95cbe cln: install clnrest dependencies
expose clnrest port to outside by default
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-06-12 05:54:41 +05:30
Lakshya Singh
74634931aa cln: add summars and monitor plugin
remove summary plugin archived
update plugin repo to latest
cln healthcheck don't use plugins rely to getinfo command
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-06-12 05:54:17 +05:30
dev random
50bebd3700 Merge branch 'fix_build' into 'main'
Fix docker compose build issues

See merge request lightning-signer/vls-container!27
2024-06-03 16:39:43 +00:00
Pascal Grange
e3937d6d28 FIX install of pyln-client
Without python3-dev and libffi-dev we have compilation issues
when pip installing pyln-client.
2024-05-29 14:56:21 +02:00
Pascal Grange
5805f29f6e FIX installation of grpcio-tools
Without linux-headers we have a compilation issue when
pip installing grpcio-tools.

Probably related to https://github.com/grpc/grpc/issues/24722
2024-05-29 14:55:57 +02:00
dev random
625a72bab1 Merge branch 'king-11/reap-zombie' into 'main'
docker images: clean kill using tini

See merge request lightning-signer/vls-container!28
2024-05-28 22:51:48 +00:00
Lakshya Singh
a2b9be40e7 docker images: clean kill using tini
- PID 1 does not have default signal handlers which causes
unclean shutdown of processes
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-05-25 18:24:49 +05:30
Lakshya Singh
42c340b5ac docs: add gdb backtrace commands
- update CLN version
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-04-15 22:44:21 +05:30
Lakshya Singh
7458e5ea9e Merge branch 'king-11/release-testing' into 'main'
cln: v24.02.2 clboss: v0.13.1

See merge request lightning-signer/vls-container!25
2024-04-13 10:44:36 +00:00
Lakshya Singh
9918df2796 clboss: v0.13.1
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2024-04-11 22:41:42 +05:30
10 changed files with 63 additions and 26 deletions

12
.env
View File

@@ -1,15 +1,15 @@
# bitcoin version 26.0 # bitcoin version 26.0
BITCOIN_VERSION=26.0 BITCOIN_VERSION=26.0
BITCOIN_SHA256SUMS_HASH=63487c308a6655f939efd700bfca8e0285fa2f869283aaa7192bdd4b8799a747 BITCOIN_SHA256SUMS_HASH=63487c308a6655f939efd700bfca8e0285fa2f869283aaa7192bdd4b8799a747
# core lightning version v24.02.2 # core lightning version v24.05
CORE_LIGHTNING_REPO=https://github.com/ElementsProject/lightning.git CORE_LIGHTNING_REPO=https://github.com/ElementsProject/lightning.git
CORE_LIGHTNING_GIT_HASH=a2a136fe3ebef1d028d1e20ebf1f987b8c05bbf8 CORE_LIGHTNING_GIT_HASH=11586abf79cad33727c03dfa810ae8bcdd3762bf
# clboss version v0.13.0 # clboss version v0.13.1 (2024-05-31 21:28:55 -0700)
CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git
CLBOSS_GIT_HASH=0673c50e7374ea8f5cb7e302f72b7978c6bd1794 CLBOSS_GIT_HASH=df51d5486b05acbeca16cb9e42d18fa082e6079a
# cln plugins # cln plugins (2024-06-06 17:02:52 +0200)
CLN_PLUGINS_REPO=https://github.com/lightningd/plugins.git CLN_PLUGINS_REPO=https://github.com/lightningd/plugins.git
CLN_PLUGINS_GIT_HASH=a525e6c42033a6270c81065a559301ceb2a761fa CLN_PLUGINS_GIT_HASH=de0c7af343df25e82536233ac248ef46efea8670
# txoo version 0.6.4 # txoo version 0.6.4
TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git
TXOO_GIT_HASH=6f0718e3f2b9406df5e3cd73306f473199141da0 TXOO_GIT_HASH=6f0718e3f2b9406df5e3cd73306f473199141da0

View File

@@ -189,7 +189,7 @@ docker ps
Getting logs from container Getting logs from container
```bash ```bash
# CONTAINER_NAME=lightningd-test # CONTAINER_NAME=lightningd-test
docker container logs $CONTAINER_NAME docker container logs $CONTAINER_NAME > $CONTAINER_NAME.log
``` ```
Restarting containers Restarting containers
@@ -200,17 +200,32 @@ docker compose --profile vls stop
docker compose --profile vls up docker compose --profile vls up
``` ```
Generating Backtrace from CLN core dump
```bash
# attach to the lightningd container
docker container exec -u root -it lightningd-test sh
# install gdb
apk add gdb
gdb /usr/libexec/c-lightning/plugins/pay /home/lightning/.lightning/testnet/core
# get backtrace
bt
```
Delete containers Delete containers
```bash ```bash
cd vls-container cd vls-container
docker compose --profile vls down docker compose --profile vls down
``` ```
**NOTE**: If you want to start fresh make sure to delete the created docker volumes as well.
## Choosing Versions ## Choosing Versions
The currently set default versions for services is as follows in the [.env](.env) file: The currently set default versions for services is as follows in the [.env](.env) file:
- **Bitcoin Core**: v26.0 - **Bitcoin Core**: v26.0
- **Core Lightning**: v24.02 - **Core Lightning**: v24.02.2
- **TXOO**: v0.6.4 - **TXOO**: v0.6.4
- **VLS**: v0.11.0 - **VLS**: v0.11.0

View File

@@ -103,7 +103,8 @@ RUN apk --no-cache add \
boost-thread \ boost-thread \
sqlite-dev \ sqlite-dev \
libevent \ libevent \
libzmq libzmq \
tini
ARG BITCOIN_VERSION ARG BITCOIN_VERSION
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
@@ -129,7 +130,7 @@ VOLUME ["${BITCOIN_DATA}"]
USER bitcoin USER bitcoin
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}" RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}"

View File

@@ -43,6 +43,8 @@ services:
expose: expose:
- 19735 - 19735
- 7701 - 7701
ports:
- 3010:3010
networks: networks:
- lightning - lightning
depends_on: depends_on:

View File

@@ -15,6 +15,7 @@ RUN apk update && \
gettext \ gettext \
git \ git \
gmp-dev \ gmp-dev \
jq \
libsodium \ libsodium \
libtool \ libtool \
net-tools \ net-tools \
@@ -26,7 +27,8 @@ RUN apk update && \
sqlite-dev \ sqlite-dev \
sqlite-static \ sqlite-static \
zlib-dev \ zlib-dev \
zlib-static zlib-static \
linux-headers
RUN pip3 install grpcio-tools RUN pip3 install grpcio-tools
@@ -43,7 +45,13 @@ ARG CLN_PLUGINS_GIT_HASH \
CLN_PLUGINS_REPO CLN_PLUGINS_REPO
RUN git clone $CLN_PLUGINS_REPO RUN git clone $CLN_PLUGINS_REPO
RUN cd plugins && \ RUN cd plugins && \
git checkout $CLN_PLUGINS_GIT_HASH git checkout $CLN_PLUGINS_GIT_HASH && \
git submodule update --init --recursive
# Build summars plugin
RUN cd plugins/summars && \
cargo install --locked --path . --bin summars --profile release --root /usr/local/ && \
cargo clean
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as clboss_builder FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as clboss_builder
@@ -113,7 +121,10 @@ RUN apk update && \
bind-tools \ bind-tools \
libev-dev \ libev-dev \
curl-dev \ curl-dev \
sqlite-dev sqlite-dev \
tini \
python3-dev \
libffi-dev
ARG LIGHTNINGD_UID=101 \ ARG LIGHTNINGD_UID=101 \
LIGHTNINGD_USER=lightning LIGHTNINGD_USER=lightning
@@ -130,8 +141,10 @@ COPY --from=builder /usr/libexec/c-lightning /usr/libexec/c-lightning
COPY --from=builder /usr/share/man/man8 /usr/share/man/man8 COPY --from=builder /usr/share/man/man8 /usr/share/man/man8
COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning
COPY --from=clboss_builder /usr/bin/clboss /usr/bin/clboss COPY --from=clboss_builder /usr/bin/clboss /usr/bin/clboss
COPY --from=builder /build/plugins/archived/summary /usr/local/src/plugins/summary COPY --from=builder /build/plugins/monitor/monitor.py /usr/local/src/plugins/monitor.py
COPY --from=builder /usr/local/bin/summars /usr/local/src/plugins/summars
COPY --from=vls_builder /usr/local/bin/remote_hsmd_socket /usr/libexec/c-lightning/remote_hsmd_socket COPY --from=vls_builder /usr/local/bin/remote_hsmd_socket /usr/libexec/c-lightning/remote_hsmd_socket
COPY --from=builder /build/core-lightning/plugins/clnrest/requirements.txt /usr/local/src/plugins/clnrest_requirements.txt
RUN addgroup -S lightning && adduser -S lightning -G lightning && \ RUN addgroup -S lightning && adduser -S lightning -G lightning && \
mkdir -p ${LIGHTNINGD_DATA} && \ mkdir -p ${LIGHTNINGD_DATA} && \
@@ -161,8 +174,10 @@ RUN pip3 install \
requests \ requests \
packaging packaging
RUN pip3 install -r /usr/local/src/plugins/clnrest_requirements.txt
HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \ HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \
CMD ["/healthcheck.sh"] CMD ["/healthcheck.sh"]
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
CMD ["lightningd"] CMD ["lightningd"]

View File

@@ -2,4 +2,4 @@
set -ex set -ex
lightning-cli --network $VLS_NETWORK summary lightning-cli --network $VLS_NETWORK getinfo

View File

@@ -3,10 +3,11 @@ bitcoin-rpcuser=rpcuser
bitcoin-rpcpassword=VLSsigner1 bitcoin-rpcpassword=VLSsigner1
bitcoin-rpcport=38332 bitcoin-rpcport=38332
log-level=info log-level=info
max-locktime-blocks=288
important-plugin=/usr/bin/clboss important-plugin=/usr/bin/clboss
clboss-auto-close=true clboss-auto-close=true
bind-addr=0.0.0.0:19846 bind-addr=0.0.0.0:19846
plugin=/usr/local/src/plugins/summary/summary.py plugin=/usr/local/src/plugins/summars
plugin=/usr/local/src/plugins/monitor.py
subdaemon=hsmd:remote_hsmd_socket subdaemon=hsmd:remote_hsmd_socket
experimental-anchors experimental-anchors
clnrest-port=3010

View File

@@ -3,10 +3,11 @@ bitcoin-rpcuser=rpcuser
bitcoin-rpcpassword=VLSsigner1 bitcoin-rpcpassword=VLSsigner1
bitcoin-rpcport=18332 bitcoin-rpcport=18332
log-level=info log-level=info
max-locktime-blocks=288
important-plugin=/usr/bin/clboss important-plugin=/usr/bin/clboss
clboss-auto-close=true clboss-auto-close=true
bind-addr=0.0.0.0:19735 bind-addr=0.0.0.0:19735
plugin=/usr/local/src/plugins/summary/summary.py plugin=/usr/local/src/plugins/summars
plugin=/usr/local/src/plugins/monitor.py
subdaemon=hsmd:remote_hsmd_socket subdaemon=hsmd:remote_hsmd_socket
experimental-anchors experimental-anchors
clnrest-port=3010

View File

@@ -32,7 +32,8 @@ RUN apk update && \
libev-dev \ libev-dev \
curl-dev \ curl-dev \
curl \ curl \
jq jq \
tini
COPY --from=builder /usr/local/bin/txood /usr/bin/txood COPY --from=builder /usr/local/bin/txood /usr/bin/txood
@@ -47,5 +48,5 @@ VOLUME ["${TXOO_DATA}"]
HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \ HEALTHCHECK --interval=5s --timeout=10s --start-period=5s \
CMD ["/healthcheck.sh"] CMD ["/healthcheck.sh"]
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
CMD ["txood"] CMD ["txood"]

View File

@@ -38,7 +38,8 @@ RUN apk update && \
build-base \ build-base \
curl-dev \ curl-dev \
protobuf \ protobuf \
bind-tools bind-tools \
tini
COPY --from=builder /usr/local/bin/vlsd2 /usr/local/bin/vlsd2 COPY --from=builder /usr/local/bin/vlsd2 /usr/local/bin/vlsd2
COPY --from=builder /usr/local/bin/vls-cli /usr/local/bin/vls-cli COPY --from=builder /usr/local/bin/vls-cli /usr/local/bin/vls-cli
@@ -65,7 +66,7 @@ USER vls
HEALTHCHECK --interval=10s --timeout=10s --start-period=10s \ HEALTHCHECK --interval=10s --timeout=10s --start-period=10s \
CMD ["/healthcheck.sh"] CMD ["/healthcheck.sh"]
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
RUN vlsd2 --git-desc RUN vlsd2 --git-desc