Compare commits
2 Commits
VLS-v0.11.
...
CLBOSS-v0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8702d3cc1a | ||
|
|
91e4c9b8af |
@@ -1,11 +1,9 @@
|
|||||||
**/.dockerignore
|
.git
|
||||||
**/.env
|
.gitignore
|
||||||
**/.git
|
|
||||||
**/.gitignore
|
|
||||||
**/docker-compose*
|
**/docker-compose*
|
||||||
**/Dockerfile*
|
**/Dockerfile*
|
||||||
**/*.Dockerfile
|
.dockerignore
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
scripts/
|
scripts
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml
|
||||||
|
|||||||
18
.env
Normal file
18
.env
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# bitcoin version 26.0
|
||||||
|
BITCOIN_VERSION=26.0
|
||||||
|
BITCOIN_SHA256SUMS_HASH=63487c308a6655f939efd700bfca8e0285fa2f869283aaa7192bdd4b8799a747
|
||||||
|
# core lightning version v24.02
|
||||||
|
CORE_LIGHTNING_REPO=https://github.com/ElementsProject/lightning.git
|
||||||
|
CORE_LIGHTNING_GIT_HASH=8418989f9bf3563a67ac91602500672b51628579
|
||||||
|
# clboss
|
||||||
|
CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git
|
||||||
|
CLBOSS_GIT_HASH=0673c50e7374ea8f5cb7e302f72b7978c6bd1794
|
||||||
|
# cln plugins
|
||||||
|
CLN_PLUGINS_REPO=https://github.com/lightningd/plugins.git
|
||||||
|
CLN_PLUGINS_GIT_HASH=a525e6c42033a6270c81065a559301ceb2a761fa
|
||||||
|
# txoo version 0.6.4
|
||||||
|
TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git
|
||||||
|
TXOO_GIT_HASH=6f0718e3f2b9406df5e3cd73306f473199141da0
|
||||||
|
# vls version v0.11.0
|
||||||
|
VLS_REPO=https://gitlab.com/lightning-signer/validating-lightning-signer.git
|
||||||
|
VLS_GIT_HASH=395b604964d5a0b4e9ee32c1b6e440dfbf4874f0
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
.env
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ compose:
|
|||||||
- docker volume create vls_data
|
- docker volume create vls_data
|
||||||
- docker buildx create --name=$BUILDER --use
|
- docker buildx create --name=$BUILDER --use
|
||||||
script:
|
script:
|
||||||
- echo "IMAGE_TAG=${IMAGE_TAG}" > .env
|
- export IMAGE_TAG=${IMAGE_TAG}
|
||||||
- ./scripts/build_from_cache.sh bitcoind
|
- ./scripts/build_from_cache.sh bitcoind
|
||||||
- ./scripts/build_from_cache.sh lightningd
|
- ./scripts/build_from_cache.sh lightningd
|
||||||
- ./scripts/build_from_cache.sh txood
|
- ./scripts/build_from_cache.sh txood
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -71,10 +71,11 @@ There is a `docker-compose.yml` in the `vlsd` folder which can be used to run a
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd vlsd
|
cd vlsd
|
||||||
|
export VLS_GIT_HASH=$VLS_GIT_HASH
|
||||||
docker compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
**_Note_**: Make sure to set `BITCOIND_RPC_URL` and `CLN_RMEOTE_HSMD_URL` as either environment variables or in the `docker-compose.yml` file before running the above command.
|
**_Note_**: Make sure to set `BITCOIND_RPC_URL`, `VLS_GIT_HASH` and `CLN_RMEOTE_HSMD_URL` as either environment variables or in the `docker-compose.yml` file before running the above command. You can take `VLS_GIT_HASH` from [.env](./.env) or from the main [repo](https://gitlab.com/lightning-signer/validating-lightning-signer)
|
||||||
|
|
||||||
If you wish to run it as a standalone container without using `docker-compose` you can use the following command:
|
If you wish to run it as a standalone container without using `docker-compose` you can use the following command:
|
||||||
|
|
||||||
@@ -84,6 +85,7 @@ docker run \
|
|||||||
--rm \
|
--rm \
|
||||||
--name vlsd \
|
--name vlsd \
|
||||||
--network host \
|
--network host \
|
||||||
|
--build_arg VLS_GIT_HASH=$VLS_GIT_HASH
|
||||||
-e VLS_NETWORK=testnet \
|
-e VLS_NETWORK=testnet \
|
||||||
-e BITCOIND_RPC_URL=$BITCOIND_RPC_URL \
|
-e BITCOIND_RPC_URL=$BITCOIND_RPC_URL \
|
||||||
--mount 'type=volume,src=vls_data,dst=/home/vls/.lightning-signer' \
|
--mount 'type=volume,src=vls_data,dst=/home/vls/.lightning-signer' \
|
||||||
@@ -181,6 +183,24 @@ docker container exec lightningd-test lightning-cli --testnet clboss-status | le
|
|||||||
# Show node summary status
|
# Show node summary status
|
||||||
docker container exec lightningd-test lightning-cli --testnet summary
|
docker container exec lightningd-test lightning-cli --testnet summary
|
||||||
```
|
```
|
||||||
|
## Choosing Versions
|
||||||
|
|
||||||
|
The currently set default versions for services is as follows in the [.env](.env) file:
|
||||||
|
- **Bitcoin Core**: v26.0
|
||||||
|
- **Core Lightning**: v24.02
|
||||||
|
- **TXOO**: v0.6.4
|
||||||
|
- **VLS**: v0.11.0
|
||||||
|
|
||||||
|
You just can switch to a particular version/commit for a service by updating the git hash and then rebuilding the service:
|
||||||
|
```bash
|
||||||
|
cd vls-container
|
||||||
|
# update bitcoin core version
|
||||||
|
sed -i 's/23.0/23.2/g' .env
|
||||||
|
# build images again
|
||||||
|
docker compose --profile vls build
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: For `bitcoind` its also important to update the `BITCOIN_SHA256SUMS_HASH`. It is the *SHA256 HASH* of `SHA256SUMS` file.
|
||||||
|
|
||||||
## Future Work
|
## Future Work
|
||||||
|
|
||||||
|
|||||||
@@ -49,15 +49,15 @@ RUN mkdir $GNUPGHOME && set -ex \
|
|||||||
|
|
||||||
RUN gpg -kv
|
RUN gpg -kv
|
||||||
|
|
||||||
ARG BITCOIN_VERSION=23.0
|
ARG BITCOIN_VERSION
|
||||||
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
|
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
|
||||||
ARG SHA256SUMS_HASH=aaff81ea001f499e8f6f3221387d7db960d71a3b7a4a2b1aaf2c8060bc94a391
|
ARG BITCOIN_SHA256SUMS_HASH
|
||||||
|
RUN echo "Building bitcoin core version $BITCOIN_VERSION"
|
||||||
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS && \
|
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS && \
|
||||||
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && \
|
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && \
|
||||||
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz && \
|
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz && \
|
||||||
gpg --batch --verify SHA256SUMS.asc SHA256SUMS && \
|
gpg --batch --verify SHA256SUMS.asc SHA256SUMS && \
|
||||||
echo "${SHA256SUMS_HASH} SHA256SUMS" | sha256sum -c - && \
|
echo "${BITCOIN_SHA256SUMS_HASH} SHA256SUMS" | sha256sum -c - && \
|
||||||
grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - && \
|
grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - && \
|
||||||
tar -xzf *.tar.gz
|
tar -xzf *.tar.gz
|
||||||
|
|
||||||
@@ -108,10 +108,11 @@ RUN apk --no-cache add \
|
|||||||
libevent \
|
libevent \
|
||||||
libzmq
|
libzmq
|
||||||
|
|
||||||
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
|
ARG BITCOIN_VERSION
|
||||||
ARG BITCOIN_VERSION=23.0
|
|
||||||
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
|
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
|
||||||
|
|
||||||
|
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
|
||||||
|
|
||||||
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoin-cli /usr/bin/bitcoin-cli
|
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoin-cli /usr/bin/bitcoin-cli
|
||||||
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoin-tx /usr/bin/bitcoin-tx
|
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoin-tx /usr/bin/bitcoin-tx
|
||||||
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoind /usr/bin/bitcoind
|
COPY --from=bitcoin-core ${BITCOIN_PREFIX}/bin/bitcoind /usr/bin/bitcoind
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ services:
|
|||||||
bitcoin-core:
|
bitcoin-core:
|
||||||
build:
|
build:
|
||||||
context: ./bitcoind
|
context: ./bitcoind
|
||||||
|
args:
|
||||||
|
- BITCOIN_VERSION
|
||||||
|
- BITCOIN_SHA256SUMS_HASH
|
||||||
image: bitcoind:${IMAGE_TAG:-latest}
|
image: bitcoind:${IMAGE_TAG:-latest}
|
||||||
container_name: bitcoind-test
|
container_name: bitcoind-test
|
||||||
volumes:
|
volumes:
|
||||||
@@ -19,6 +22,15 @@ services:
|
|||||||
core-lightning:
|
core-lightning:
|
||||||
build:
|
build:
|
||||||
context: ./lightningd
|
context: ./lightningd
|
||||||
|
args:
|
||||||
|
- CORE_LIGHTNING_REPO
|
||||||
|
- CORE_LIGHTNING_GIT_HASH
|
||||||
|
- CLBOSS_REPO
|
||||||
|
- CLBOSS_GIT_HASH
|
||||||
|
- CLN_PLUGINS_REPO
|
||||||
|
- CLN_PLUGINS_GIT_HASH
|
||||||
|
- VLS_REPO
|
||||||
|
- VLS_GIT_HASH
|
||||||
image: lightningd:${IMAGE_TAG:-latest}
|
image: lightningd:${IMAGE_TAG:-latest}
|
||||||
container_name: lightningd-test
|
container_name: lightningd-test
|
||||||
command:
|
command:
|
||||||
@@ -46,6 +58,9 @@ services:
|
|||||||
txoo:
|
txoo:
|
||||||
build:
|
build:
|
||||||
context: ./txood
|
context: ./txood
|
||||||
|
args:
|
||||||
|
- TXOO_REPO
|
||||||
|
- TXOO_GIT_HASH
|
||||||
image: txood:${IMAGE_TAG:-latest}
|
image: txood:${IMAGE_TAG:-latest}
|
||||||
container_name: txood-test
|
container_name: txood-test
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -64,6 +79,9 @@ services:
|
|||||||
vls:
|
vls:
|
||||||
build:
|
build:
|
||||||
context: ./vlsd
|
context: ./vlsd
|
||||||
|
args:
|
||||||
|
- VLS_REPO
|
||||||
|
- VLS_GIT_HASH
|
||||||
image: vlsd:${IMAGE_TAG:-latest}
|
image: vlsd:${IMAGE_TAG:-latest}
|
||||||
container_name: vlsd-test
|
container_name: vlsd-test
|
||||||
profiles:
|
profiles:
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ RUN apk update && \
|
|||||||
zlib-dev \
|
zlib-dev \
|
||||||
zlib-static
|
zlib-static
|
||||||
|
|
||||||
ARG CORE_LIGHTNING_GIT_HASH=76cd32387a400a2aee607edaf1e0a06e92e1402f \
|
ARG CORE_LIGHTNING_GIT_HASH \
|
||||||
CORE_LIGHTNING_REPO=https://github.com/ElementsProject/lightning.git
|
CORE_LIGHTNING_REPO
|
||||||
RUN git clone --recursive $CORE_LIGHTNING_REPO core-lightning
|
RUN git clone --recursive $CORE_LIGHTNING_REPO core-lightning
|
||||||
RUN cd core-lightning && \
|
RUN cd core-lightning && \
|
||||||
git checkout $CORE_LIGHTNING_GIT_HASH && \
|
git checkout $CORE_LIGHTNING_GIT_HASH && \
|
||||||
@@ -37,11 +37,11 @@ RUN cd core-lightning && \
|
|||||||
make -j $(nproc) install && \
|
make -j $(nproc) install && \
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
ARG PLUGINS_GIT_HASH=cf96eb63c1687644042ea85acfd3785527fd98d4 \
|
ARG CLN_PLUGINS_GIT_HASH \
|
||||||
PLUGINS_REPO=https://github.com/lightningd/plugins.git
|
CLN_PLUGINS_REPO
|
||||||
RUN git clone $PLUGINS_REPO
|
RUN git clone $CLN_PLUGINS_REPO
|
||||||
RUN cd plugins && \
|
RUN cd plugins && \
|
||||||
git checkout $PLUGINS_GIT_HASH
|
git checkout $CLN_PLUGINS_GIT_HASH
|
||||||
|
|
||||||
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as clboss_builder
|
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as clboss_builder
|
||||||
|
|
||||||
@@ -60,8 +60,8 @@ RUN apk update && \
|
|||||||
pkgconf \
|
pkgconf \
|
||||||
sqlite-dev
|
sqlite-dev
|
||||||
|
|
||||||
ARG CLBOSS_GIT_HASH=0673c50e7374ea8f5cb7e302f72b7978c6bd1794 \
|
ARG CLBOSS_GIT_HASH \
|
||||||
CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git
|
CLBOSS_REPO
|
||||||
RUN git clone --recurse-submodules $CLBOSS_REPO clboss
|
RUN git clone --recurse-submodules $CLBOSS_REPO clboss
|
||||||
RUN cd clboss && \
|
RUN cd clboss && \
|
||||||
git checkout $CLBOSS_GIT_HASH && \
|
git checkout $CLBOSS_GIT_HASH && \
|
||||||
@@ -85,9 +85,9 @@ RUN apk update && \
|
|||||||
protobuf-dev \
|
protobuf-dev \
|
||||||
rust
|
rust
|
||||||
|
|
||||||
ARG VLS_GIT_HASH=5712eb74b672ffd8b691b9e772e05a827d03e7df \
|
ARG VLS_GIT_HASH \
|
||||||
VLS_REPO=https://gitlab.com/lightning-signer/validating-lightning-signer.git
|
VLS_REPO
|
||||||
RUN echo building remote_hsmd_socket from hash: $VLS_GIT_HASH
|
RUN echo "building remote_hsmd_socket from hash: $VLS_GIT_HASH"
|
||||||
RUN git clone $VLS_REPO vls
|
RUN git clone $VLS_REPO vls
|
||||||
RUN cd vls && \
|
RUN cd vls && \
|
||||||
git checkout $VLS_GIT_HASH && \
|
git checkout $VLS_GIT_HASH && \
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ set -ex
|
|||||||
SERVICE=$1
|
SERVICE=$1
|
||||||
|
|
||||||
cd $SERVICE
|
cd $SERVICE
|
||||||
docker build --load --builder $BUILDER --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG .
|
|
||||||
|
docker build --load --builder $BUILDER --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG $(grep -v '^#' ../.env | sed 's/^/--build-arg /' | tr '\n' ' ') .
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ SERVICE=$1
|
|||||||
docker buildx create --name=$SERVICE --use
|
docker buildx create --name=$SERVICE --use
|
||||||
cd $SERVICE
|
cd $SERVICE
|
||||||
|
|
||||||
docker build --load --builder=$SERVICE --cache-to type=registry,ref=$CACHE/$SERVICE:$CACHE_TAG --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG .
|
docker build --load --builder=$SERVICE --cache-to type=registry,ref=$CACHE/$SERVICE:$CACHE_TAG --cache-from $CACHE/$SERVICE:$CACHE_TAG -t $SERVICE:$IMAGE_TAG $(grep -v '^#' ../.env | sed 's/^/--build-arg /' | tr '\n' ' ') .
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ RUN apk update && \
|
|||||||
rust \
|
rust \
|
||||||
cargo
|
cargo
|
||||||
|
|
||||||
ARG TXOO_GIT_HASH=1cfeecf5f806a04a12c97ca17c39566a1a24e732
|
ARG TXOO_GIT_HASH \
|
||||||
ARG TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git
|
TXOO_REPO
|
||||||
RUN git clone --recurse-submodules $TXOO_REPO
|
RUN git clone --recurse-submodules $TXOO_REPO
|
||||||
RUN cd txoo && \
|
RUN cd txoo && \
|
||||||
git checkout $TXOO_GIT_HASH && \
|
git checkout $TXOO_GIT_HASH && \
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ RUN apk update && \
|
|||||||
protobuf-dev \
|
protobuf-dev \
|
||||||
rust
|
rust
|
||||||
|
|
||||||
ARG VLS_GIT_HASH=5712eb74b672ffd8b691b9e772e05a827d03e7df
|
ARG VLS_GIT_HASH \
|
||||||
RUN echo building vlsd from hash: $VLS_GIT_HASH
|
VLS_REPO
|
||||||
RUN git clone https://gitlab.com/lightning-signer/validating-lightning-signer.git vls
|
RUN echo "building vlsd from hash: $VLS_GIT_HASH"
|
||||||
|
RUN git clone $VLS_REPO vls
|
||||||
RUN cd vls && \
|
RUN cd vls && \
|
||||||
git checkout $VLS_GIT_HASH && \
|
git checkout $VLS_GIT_HASH && \
|
||||||
cargo install --locked --path ./vls-proxy --bin vlsd2 --profile release --root /usr/local/ && \
|
cargo install --locked --path ./vls-proxy --bin vlsd2 --profile release --root /usr/local/ && \
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
- VLS_GIT_HASH
|
||||||
image: vlsd
|
image: vlsd
|
||||||
container_name: vlsd-standalone
|
container_name: vlsd-standalone
|
||||||
command:
|
command:
|
||||||
|
|||||||
Reference in New Issue
Block a user