Move `lightning-transaction-sync` back into the main workspace
What changed, and why it matters
This commit is purely a housekeeping change: it moves the `lightning-transaction-sync` crate from a separate mini-workspace back into the main project workspace because it now uses the same minimum Rust version as everything else. The only files changed are CI workflow definitions and test scripts. There is no change to application code, no bug fix, and no security patch.
No security action needed. Treat as normal repository maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes the standalone build-tx-sync CI job, merges its steps into the main build job, adds lightning-transaction-sync to the workspace members list, removes it from exclude, and folds the contents of ci/ci-tx-sync-tests.sh into ci/ci-tests.sh before deleting the former. It also adds an MSRV pin for idna_adapter and skips bitcoind/electrs download on Windows. No source code in the crate itself is modified.
Changed components
Cargo workspace configurationGitHub Actions CI workflowCI test scriptsInspect captured patch +26 / −63
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3c50b2a..2658ff4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -62,52 +62,35 @@ jobs:
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == '1.75.0'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- - name: Run CI script
- shell: bash # Default on Winblows is powershell
- run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
-
- build-tx-sync:
- strategy:
- fail-fast: false
- matrix:
- platform: [ ubuntu-latest, macos-latest ]
- toolchain: [ stable, beta, 1.75.0 ]
- runs-on: ${{ matrix.platform }}
- steps:
- - name: Checkout source code
- uses: actions/checkout@v4
- - name: Install Rust ${{ matrix.toolchain }} toolchain
- run: |
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
- - name: Set RUSTFLAGS to deny warnings
- if: "matrix.toolchain == '1.75.0'"
- run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- name: Enable caching for bitcoind
+ if: matrix.platform != 'windows-latest'
id: cache-bitcoind
uses: actions/cache@v4
with:
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
key: bitcoind-${{ runner.os }}-${{ runner.arch }}
- name: Enable caching for electrs
+ if: matrix.platform != 'windows-latest'
id: cache-electrs
uses: actions/cache@v4
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
- if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
+ if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
run: |
source ./contrib/download_bitcoind_electrs.sh
mkdir bin
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- name: Set bitcoind/electrs environment variables
+ if: matrix.platform != 'windows-latest'
run: |
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Run CI script
shell: bash # Default on Winblows is powershell
- run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tx-sync-tests.sh
+ run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
coverage:
needs: fuzz
diff --git a/Cargo.toml b/Cargo.toml
index f9f7406..a0895fe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,11 +16,11 @@ members = [
"lightning-macros",
"lightning-dns-resolver",
"lightning-liquidity",
+ "lightning-transaction-sync",
"possiblyrandom",
]
exclude = [
- "lightning-transaction-sync",
"lightning-tests",
"ext-functional-test-demo",
"no-std-check",
diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh
index 91ead99..488c5ac 100755
--- a/ci/ci-tests.sh
+++ b/ci/ci-tests.sh
@@ -2,7 +2,6 @@
#shellcheck disable=SC2002,SC2207
set -eox pipefail
-# Currently unused as we don't have to pin anything for MSRV:
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
# Some crates require pinning to meet our MSRV even for our downstream users,
@@ -20,6 +19,9 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
# proptest 1.9.0 requires rustc 1.82.0
[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p proptest --precise "1.8.0" --verbose
+# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
+[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --verbose
+
export RUST_BACKTRACE=1
echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
@@ -57,6 +59,23 @@ cargo check -p lightning-block-sync --verbose --color always --features rpc-clie
cargo test -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
cargo check -p lightning-block-sync --verbose --color always --features rpc-client,rest-client,tokio
+echo -e "\n\nChecking Transaction Sync Clients with features."
+cargo check -p lightning-transaction-sync --verbose --color always --features esplora-blocking
+cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async
+cargo check -p lightning-transaction-sync --verbose --color always --features esplora-async-https
+cargo check -p lightning-transaction-sync --verbose --color always --features electrum
+
+if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
+ echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
+ cargo check -p lightning-transaction-sync --tests
+else
+ echo -e "\n\nTesting Transaction Sync Clients with features."
+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-blocking
+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async
+ cargo test -p lightning-transaction-sync --verbose --color always --features esplora-async-https
+ cargo test -p lightning-transaction-sync --verbose --color always --features electrum
+fi
+
echo -e "\n\nChecking and testing lightning-persister with features"
cargo test -p lightning-persister --verbose --color always --features tokio
cargo check -p lightning-persister --verbose --color always --features tokio
diff --git a/ci/ci-tx-sync-tests.sh b/ci/ci-tx-sync-tests.sh
deleted file mode 100755
index 0839e2c..0000000
--- a/ci/ci-tx-sync-tests.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-set -eox pipefail
-
-RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
-
-pushd lightning-transaction-sync
-
-# Some crates require pinning to meet our MSRV even for our downstream users,
-# which we do here.
-# Further crates which appear only as dev-dependencies are pinned further down.
-function PIN_RELEASE_DEPS {
- return 0 # Don't fail the script if our rustc is higher than the last check
-}
-
-PIN_RELEASE_DEPS # pin the release dependencies
-
-# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
-[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --verbose
-
-export RUST_BACKTRACE=1
-
-echo -e "\n\nChecking Transaction Sync Clients with features."
-cargo check --verbose --color always --features esplora-blocking
-cargo check --verbose --color always --features esplora-async
-cargo check --verbose --color always --features esplora-async-https
-cargo check --verbose --color always --features electrum
-
-if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
- echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
- cargo check --tests
-else
- echo -e "\n\nTesting Transaction Sync Clients with features."
- cargo test --verbose --color always --features esplora-blocking
- cargo test --verbose --color always --features esplora-async
- cargo test --verbose --color always --features esplora-async-https
- cargo test --verbose --color always --features electrum
-fi
-
-popd
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.