From e7ac5b629f92847d3e3b7a937212cf30ad49d15f Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Thu, 2 Apr 2026 13:20:39 +0200 Subject: [PATCH 01/11] Re-pin `idna_adapter` to for MSRV builds New idna_adapter releases pull in ICU dependencies that need a newer compiler than the Rust 1.85 MSRV used by the release branch. Keep the MSRV jobs on idna_adapter 1.2.0 so the declared minimum Rust version remains usable without restricting stable builds. Backport of 38b612215d599e1e8fb83542a79a8a8579b5b444 Co-Authored-By: HAL 9000 --- .github/workflows/rust.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 87249bd720..578bcbb1f2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -41,6 +41,10 @@ jobs: - name: Check formatting on Rust ${{ matrix.toolchain }} if: matrix.check-fmt run: rustup component add rustfmt && cargo fmt --all -- --check + - name: Pin packages to allow for MSRV + if: matrix.msrv + run: | + cargo update -p idna_adapter --precise "1.2.0" --verbose # idna_adapter 1.2.1 uses ICU4X 2.2.0, requiring 1.86 and newer - name: Set RUSTFLAGS to deny warnings if: "matrix.toolchain == 'stable'" run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" From 20171c4911aa7ea981339f39e9f53e4089e38682 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 9 Sep 2026 18:39:28 +0200 Subject: [PATCH 02/11] Pin encoding_rs for MSRV builds Recent encoding_rs releases require Rust 1.88, exceeding the release branch's declared Rust 1.85 minimum. Keep the MSRV jobs on encoding_rs 0.8.35, matching the compatibility pin already used on main. Backport of 87946b1948a11e58a0e8ee3ce80c06348f63acaf Co-Authored-By: HAL 9000 --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 578bcbb1f2..0d39ee849f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -45,6 +45,7 @@ jobs: if: matrix.msrv run: | cargo update -p idna_adapter --precise "1.2.0" --verbose # idna_adapter 1.2.1 uses ICU4X 2.2.0, requiring 1.86 and newer + cargo update -p encoding_rs --precise "0.8.35" --verbose # encoding_rs 0.8.40 and newer require 1.88 and newer - name: Set RUSTFLAGS to deny warnings if: "matrix.toolchain == 'stable'" run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" From 5213d2c5766aa0ce1e79f56fc698b003f79ec090 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 12 Oct 2026 10:58:50 +0200 Subject: [PATCH 03/11] Keep proptest compatible with the MSRV The Rust 1.85 CI jobs resolve proptest 1.12.0, which requires Rust 1.88 and prevents the MSRV tests from building. Keep those jobs on proptest 1.11.0 so they can continue checking the declared minimum compiler version. Backport of c7ebb9c16552491b8601e05dbb64bdd139d1f56e Co-Authored-By: HAL 9000 --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0d39ee849f..9cea54d4e1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,6 +46,7 @@ jobs: run: | cargo update -p idna_adapter --precise "1.2.0" --verbose # idna_adapter 1.2.1 uses ICU4X 2.2.0, requiring 1.86 and newer cargo update -p encoding_rs --precise "0.8.35" --verbose # encoding_rs 0.8.40 and newer require 1.88 and newer + cargo update -p proptest --precise "1.11.0" --verbose # proptest 1.12.0 requires Rust 1.88 - name: Set RUSTFLAGS to deny warnings if: "matrix.toolchain == 'stable'" run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" From 15848f6a311f35900edd4bf1d6b6503ebafcf9ba Mon Sep 17 00:00:00 2001 From: benthecarman Date: Thu, 1 Oct 2026 16:46:43 -0500 Subject: [PATCH 04/11] Terminate log macro calls used as expressions Rust 1.99 warns when LDK logging macros expand with a trailing semicolon in expression position. These warnings fail stable CI, which denies warnings. Terminate the affected calls explicitly, adapting the upstream fix to the 0.7 source layout without changing logging behavior. Backport of b6e37fabc4c660db0384d8a6d7d5dffd5bdc61a9 Co-Authored-By: HAL 9000 --- src/event.rs | 14 ++++++++------ src/lib.rs | 4 ++-- src/payment/unified_qr.rs | 8 ++++++-- src/runtime.rs | 4 +++- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/event.rs b/src/event.rs index 41f76f216d..f64710d508 100644 --- a/src/event.rs +++ b/src/event.rs @@ -601,14 +601,14 @@ where self.logger, "Failed to process funding transaction as channel went away before we could fund it: {}", err - ) + ); }, Err(err) => { log_error!( self.logger, "Failed to process funding transaction: {:?}", err - ) + ); }, } }, @@ -1151,7 +1151,7 @@ where "Channel request rejected".to_string(), ) .unwrap_or_else(|e| { - log_error!(self.logger, "Failed to reject channel: {:?}", e) + log_error!(self.logger, "Failed to reject channel: {:?}", e); }); return Ok(()); } @@ -1195,7 +1195,7 @@ where "Channel request rejected".to_string(), ) .unwrap_or_else(|e| { - log_error!(self.logger, "Failed to reject channel: {:?}", e) + log_error!(self.logger, "Failed to reject channel: {:?}", e); }); return Ok(()); } @@ -1212,7 +1212,7 @@ where "Channel request rejected".to_string(), ) .unwrap_or_else(|e| { - log_error!(self.logger, "Failed to reject channel: {:?}", e) + log_error!(self.logger, "Failed to reject channel: {:?}", e); }); return Ok(()); } @@ -1704,7 +1704,9 @@ where }, } }, - Err(()) => log_error!(self.logger, "Failed signing funding transaction"), + Err(()) => { + log_error!(self.logger, "Failed signing funding transaction"); + }, }, LdkEvent::SplicePending { channel_id, diff --git a/src/lib.rs b/src/lib.rs index c0b02ae2f5..2fdcdddbf4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -300,7 +300,7 @@ impl Node { gossip_sync_logger, "Background sync of RGS gossip data failed: {}", e - ) + ); } } } @@ -1054,7 +1054,7 @@ impl Node { match self.peer_store.remove_peer(&counterparty_node_id) { Ok(()) => {}, Err(e) => { - log_error!(self.logger, "Failed to remove peer {}: {}", counterparty_node_id, e) + log_error!(self.logger, "Failed to remove peer {}: {}", counterparty_node_id, e); }, } diff --git a/src/payment/unified_qr.rs b/src/payment/unified_qr.rs index 6ebf25563a..d3c879cba1 100644 --- a/src/payment/unified_qr.rs +++ b/src/payment/unified_qr.rs @@ -155,7 +155,9 @@ impl UnifiedQrPayment { let offer = maybe_wrap(offer); match self.bolt12_payment.send(&offer, None, None, route_parameters) { Ok(payment_id) => return Ok(QrPaymentResult::Bolt12 { payment_id }), - Err(e) => log_error!(self.logger, "Failed to send BOLT12 offer: {:?}. This is part of a unified QR code payment. Falling back to the BOLT11 invoice.", e), + Err(e) => { + log_error!(self.logger, "Failed to send BOLT12 offer: {:?}. This is part of a unified QR code payment. Falling back to the BOLT11 invoice.", e); + }, } } @@ -163,7 +165,9 @@ impl UnifiedQrPayment { let invoice = maybe_wrap(invoice); match self.bolt11_invoice.send(&invoice, route_parameters) { Ok(payment_id) => return Ok(QrPaymentResult::Bolt11 { payment_id }), - Err(e) => log_error!(self.logger, "Failed to send BOLT11 invoice: {:?}. This is part of a unified QR code payment. Falling back to the on-chain transaction.", e), + Err(e) => { + log_error!(self.logger, "Failed to send BOLT11 invoice: {:?}. This is part of a unified QR code payment. Falling back to the on-chain transaction.", e); + }, } } diff --git a/src/runtime.rs b/src/runtime.rs index 1e9883ae4b..dd5d895f8f 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -176,7 +176,9 @@ impl Runtime { match timeout_res { Ok(stop_res) => match stop_res { - Ok(()) => log_debug!(self.logger, "Stopped background processing of events."), + Ok(()) => { + log_debug!(self.logger, "Stopped background processing of events."); + }, Err(e) => { abort_handle.abort(); log_error!( From 92ca2d3fa6a1ebe546b99de2b3fc6971685511eb Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 1 Apr 2026 10:48:38 +0200 Subject: [PATCH 05/11] Bump CI actions to current major versions The release workflows still use actions with obsolete Node.js runtimes. Current workflow lint rejects several of those versions. Bring forward the action upgrades from main, retaining the release branch's Python setup rather than changing its build tooling. Backport of b3fe39299b12378b06e7b09f638ff4f6f6f1a1c5 Co-Authored-By: HAL 9000 --- .github/workflows/audit.yml | 4 ++-- .github/workflows/benchmarks.yml | 6 +++--- .github/workflows/cln-integration.yml | 2 +- .github/workflows/cron-weekly-rustfmt.yml | 4 ++-- .github/workflows/kotlin.yml | 4 ++-- .github/workflows/lnd-integration.yml | 2 +- .github/workflows/python.yml | 4 ++-- .github/workflows/rust.yml | 6 +++--- .github/workflows/semver.yml | 2 +- .github/workflows/swift.yml | 2 +- .github/workflows/vss-integration.yml | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index d32c55cd5d..e2ae378dd7 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -19,8 +19,8 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Run security audit - uses: rustsec/audit-check@v1.4.1 + uses: rustsec/audit-check@v2 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index ef049ad851..b05b50c561 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -13,20 +13,20 @@ jobs: TOOLCHAIN: stable steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Install Rust toolchain run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable rustup override set stable - name: Enable caching for bitcoind id: cache-bitcoind - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }} key: bitcoind-${{ runner.os }}-${{ runner.arch }} - name: Enable caching for electrs id: cache-electrs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: bin/electrs-${{ runner.os }}-${{ runner.arch }} key: electrs-${{ runner.os }}-${{ runner.arch }} diff --git a/.github/workflows/cln-integration.yml b/.github/workflows/cln-integration.yml index 32e7b74c02..87c8b411e0 100644 --- a/.github/workflows/cln-integration.yml +++ b/.github/workflows/cln-integration.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install dependencies run: | diff --git a/.github/workflows/cron-weekly-rustfmt.yml b/.github/workflows/cron-weekly-rustfmt.yml index d6326f03bd..9e54ab9f32 100644 --- a/.github/workflows/cron-weekly-rustfmt.yml +++ b/.github/workflows/cron-weekly-rustfmt.yml @@ -13,7 +13,7 @@ jobs: name: Nightly rustfmt runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt @@ -23,7 +23,7 @@ jobs: - name: Get the current date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: author: Fmt Bot title: Automated nightly rustfmt (${{ env.date }}) diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index 01a840d600..627051c31a 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: temurin java-version: 11 diff --git a/.github/workflows/lnd-integration.yml b/.github/workflows/lnd-integration.yml index f913e92ad5..5fbb58508f 100644 --- a/.github/workflows/lnd-integration.yml +++ b/.github/workflows/lnd-integration.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Check and install CMake if needed # lnd_grpc_rust (via prost-build v0.10.4) requires CMake >= 3.5 but is incompatible with CMake >= 4.0. diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d9bc978d14..1443a8048b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.10' diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9cea54d4e1..26db20d669 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -34,7 +34,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - 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 }} @@ -52,13 +52,13 @@ jobs: run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" - name: Enable caching for bitcoind id: cache-bitcoind - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }} key: bitcoind-${{ runner.os }}-${{ runner.arch }} - name: Enable caching for electrs id: cache-electrs - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: bin/electrs-${{ runner.os }}-${{ runner.arch }} key: electrs-${{ runner.os }}-${{ runner.arch }} diff --git a/.github/workflows/semver.yml b/.github/workflows/semver.yml index 8472cbd2aa..cdbd90acdb 100644 --- a/.github/workflows/semver.yml +++ b/.github/workflows/semver.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Rust stable toolchain run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 3410d09aa2..c1e385e2d3 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set default Rust version to stable run: rustup default stable diff --git a/.github/workflows/vss-integration.yml b/.github/workflows/vss-integration.yml index 8473ed4138..88987773af 100644 --- a/.github/workflows/vss-integration.yml +++ b/.github/workflows/vss-integration.yml @@ -27,11 +27,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: path: ldk-node - name: Checkout VSS - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: lightningdevkit/vss-server path: vss-server From 90fbe2f4581ab66b902fb5a84404e95760f234e9 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 12 Oct 2026 13:13:50 +0200 Subject: [PATCH 06/11] Allow deprecated APIs in 0.7 binding builds The 0.7 bindings expose a FeeRate constructor that newer Bitcoin dependencies deprecate. Denying that warning fails CI, but renaming the constructor would break existing binding users. Allow deprecation warnings only in UniFFI build and check steps for 0.7.x. Other warnings and later release lines retain the existing warning policy, and the public binding API stays unchanged. Co-Authored-By: HAL 9000 --- .github/workflows/rust.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 26db20d669..91e0ffe052 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -48,8 +48,17 @@ jobs: cargo update -p encoding_rs --precise "0.8.35" --verbose # encoding_rs 0.8.40 and newer require 1.88 and newer cargo update -p proptest --precise "1.11.0" --verbose # proptest 1.12.0 requires Rust 1.88 - name: Set RUSTFLAGS to deny warnings + id: rustflags if: "matrix.toolchain == 'stable'" - run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" + run: | + echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" + version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "ldk-node") | .version') + # Preserve the deprecated FeeRate constructor in the 0.7 bindings. + if [[ "$version" == 0.7.* ]]; then + echo "uniffi=-D warnings -A deprecated" >> "$GITHUB_OUTPUT" + else + echo "uniffi=-D warnings" >> "$GITHUB_OUTPUT" + fi - name: Enable caching for bitcoind id: cache-bitcoind uses: actions/cache@v5 @@ -77,6 +86,8 @@ jobs: run: cargo build --verbose --color always - name: Build with UniFFI support on Rust ${{ matrix.toolchain }} if: matrix.build-uniffi + env: + RUSTFLAGS: ${{ steps.rustflags.outputs.uniffi }} run: cargo build --features uniffi --verbose --color always - name: Build documentation on Rust ${{ matrix.toolchain }} if: "matrix.platform != 'windows-latest' || matrix.toolchain != '1.85.0'" @@ -87,6 +98,8 @@ jobs: run: cargo check --release --verbose --color always - name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }} if: matrix.build-uniffi + env: + RUSTFLAGS: ${{ steps.rustflags.outputs.uniffi }} run: cargo check --release --features uniffi --verbose --color always - name: Test on Rust ${{ matrix.toolchain }} if: "matrix.platform != 'windows-latest'" From 4fe7f42f8804689f16d7a326cea973651a1d3370 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 3 Jun 2026 13:02:11 +0200 Subject: [PATCH 07/11] Account for `vss-server` location change VSS moved its Rust implementation to the repository root. The release workflow still uses the old location and cannot start the server checked out from the current upstream branch. Use the current server location, matching the upstream CI fix. Backport of bfad8e6fbd0105cff17ca8cb21e654a5b07a20f0 Co-Authored-By: HAL 9000 --- .github/workflows/vss-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vss-integration.yml b/.github/workflows/vss-integration.yml index 88987773af..1b834055dc 100644 --- a/.github/workflows/vss-integration.yml +++ b/.github/workflows/vss-integration.yml @@ -38,7 +38,7 @@ jobs: - name: Build and Deploy VSS Server run: | - cd vss-server/rust + cd vss-server cargo run server/vss-server-config.toml& - name: Run VSS Integration tests run: | From 0601f26714a750c4843ead603e4ade30830fbee6 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 12 Oct 2026 13:13:52 +0200 Subject: [PATCH 08/11] Use no-auth VSS for 0.7 integration tests The VSS server now requires authentication by default, while 0.7 integration tests use fixed headers without authentication. Those tests fail against a server started with the default features. Enable the server's explicit no-auth mode for 0.7.x checkouts only. Later release lines keep their existing authentication behavior. Co-Authored-By: HAL 9000 --- .github/workflows/vss-integration.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vss-integration.yml b/.github/workflows/vss-integration.yml index 1b834055dc..54e118c1a7 100644 --- a/.github/workflows/vss-integration.yml +++ b/.github/workflows/vss-integration.yml @@ -38,8 +38,14 @@ jobs: - name: Build and Deploy VSS Server run: | + version=$(cargo metadata --no-deps --format-version 1 --manifest-path ldk-node/Cargo.toml | jq -r '.packages[] | select(.name == "ldk-node") | .version') cd vss-server - cargo run server/vss-server-config.toml& + # The 0.7 tests use fixed headers without authentication. + if [[ "$version" == 0.7.* ]]; then + RUSTFLAGS="--cfg noop_authorizer" cargo run --no-default-features server/vss-server-config.toml& + else + cargo run server/vss-server-config.toml& + fi - name: Run VSS Integration tests run: | cd ldk-node From 2c4533aecb428921fa6ca537079e10a42d940e36 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 12 Oct 2026 13:14:32 +0200 Subject: [PATCH 09/11] Use Bash consistently in the Rust CI matrix The Rust workflow uses Bash syntax for toolchain setup and GitHub environment files. Windows runners otherwise default to PowerShell, which does not interpret those commands consistently. Select Bash for the build matrix so all platforms execute the same setup commands with the expected shell semantics. Co-Authored-By: HAL 9000 --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 91e0ffe052..55f6469731 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,9 @@ concurrency: jobs: build: + defaults: + run: + shell: bash strategy: matrix: platform: [ From 1b5f52f3bc81d4f3673cc06cf5d934b7e5b78fb1 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 12 Oct 2026 13:14:34 +0200 Subject: [PATCH 10/11] Handle partial binary cache restores in CI Restoring either test binary cache creates the bin directory. If the other cache misses, the download step fails when it tries to create that existing directory. Allow an existing bin directory in Rust and benchmark CI so partial cache restores can still download the missing binaries. Co-Authored-By: HAL 9000 --- .github/workflows/benchmarks.yml | 2 +- .github/workflows/rust.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index b05b50c561..79f204757c 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -34,7 +34,7 @@ jobs: if: "(steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')" run: | source ./scripts/download_bitcoind_electrs.sh - mkdir bin + mkdir -p 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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 55f6469731..32bb5e19e9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -78,7 +78,7 @@ jobs: if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')" run: | source ./scripts/download_bitcoind_electrs.sh - mkdir bin + mkdir -p 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 From 29176d4f44449ff98dd050e2d51638a0fe8455ae Mon Sep 17 00:00:00 2001 From: Yeji Han Date: Fri, 3 Apr 2026 00:13:40 +0900 Subject: [PATCH 11/11] Use supported LND payment RPC in tests Newer lnd_grpc_rust releases removed the SendPaymentSync request and client method. The 0.7 LND integration test still uses that API and fails to compile against the current dependency release. Adapt the payment RPC portion of main's LND test harness to use SendPaymentV2, preserving successful-payment and nonempty-preimage checks. Fail if the payment fails or its stream ends prematurely. Backport of 269e39649cca65d8d2705feee507d335f0c54bf9 Co-Authored-By: HAL 9000 --- tests/integration_tests_lnd.rs | 40 +++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/tests/integration_tests_lnd.rs b/tests/integration_tests_lnd.rs index 311a11c3ca..f94e35c1ce 100755 --- a/tests/integration_tests_lnd.rs +++ b/tests/integration_tests_lnd.rs @@ -15,11 +15,13 @@ use ldk_node::lightning::ln::msgs::SocketAddress; use ldk_node::{Builder, Event}; use lightning_invoice::{Bolt11InvoiceDescription, Description}; use lnd_grpc_rust::lnrpc::invoice::InvoiceState::Settled as LndInvoiceStateSettled; +use lnd_grpc_rust::lnrpc::payment::PaymentStatus as LndPaymentStatus; use lnd_grpc_rust::lnrpc::{ GetInfoRequest as LndGetInfoRequest, GetInfoResponse as LndGetInfoResponse, Invoice as LndInvoice, ListInvoiceRequest as LndListInvoiceRequest, - QueryRoutesRequest as LndQueryRoutesRequest, Route as LndRoute, SendRequest as LndSendRequest, + QueryRoutesRequest as LndQueryRoutesRequest, Route as LndRoute, }; +use lnd_grpc_rust::routerrpc::SendPaymentRequest as LndSendPaymentRequest; use lnd_grpc_rust::{connect, LndClient}; use tokio::fs; @@ -200,25 +202,33 @@ impl TestLndClient { } async fn pay_invoice(&mut self, invoice_str: &str) { - let send_req = - LndSendRequest { payment_request: invoice_str.to_string(), ..Default::default() }; - let response = self + let send_req = LndSendPaymentRequest { + payment_request: invoice_str.to_string(), + timeout_seconds: 60, + no_inflight_updates: true, + ..Default::default() + }; + let mut stream = self .client - .lightning() - .send_payment_sync(send_req) + .router() + .send_payment_v2(send_req) .await .expect("Failed to pay invoice on LND") .into_inner(); - if !response.payment_error.is_empty() || response.payment_preimage.is_empty() { - panic!( - "LND payment failed: {}", - if response.payment_error.is_empty() { - "No preimage returned" - } else { - &response.payment_error - } - ); + while let Some(payment) = stream.message().await.expect("Failed to read LND payment update") + { + match LndPaymentStatus::try_from(payment.status) { + Ok(LndPaymentStatus::Succeeded) => { + assert!(!payment.payment_preimage.is_empty(), "No preimage returned"); + return; + }, + Ok(LndPaymentStatus::Failed) => { + panic!("LND payment failed: {:?}", payment.failure_reason); + }, + _ => {}, + } } + panic!("LND payment stream ended without terminal status"); } }