diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 16c6c5b4f08..27cc4be512f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,9 +266,11 @@ jobs: cd fuzz && cargo update -p regex --precise "1.9.6" && cargo update -p syn --precise "2.0.106" && cargo update -p quote --precise "1.0.41" cargo update -p proc-macro2 --precise "1.0.103" --verbose && cargo update -p serde_json --precise "1.0.145" --verbose cargo update -p itoa --precise "1.0.15" --verbose && cargo update -p ryu --precise "1.0.20" --verbose + cargo update -p libc --precise 0.2.183 cd write-seeds && cargo update -p regex --precise "1.9.6" && cargo update -p syn --precise "2.0.106" && cargo update -p quote --precise "1.0.41" cargo update -p proc-macro2 --precise "1.0.103" --verbose && cargo update -p serde_json --precise "1.0.145" --verbose cargo update -p itoa --precise "1.0.15" --verbose && cargo update -p ryu --precise "1.0.20" --verbose + cargo update -p libc --precise 0.2.183 - name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }} run: | cd fuzz diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec8c31932a..564ad4768de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.2.4 - Jun 25, 2026 - "Release the CI" + +## Bug Fixes + * 0.2.3 broke the MSRV of the `lightning` crate, which now again compiles on + `rustc` 1.63 (#4737). + + # 0.2.3 - Jun 18, 2026 - "Through the Loupe" ## API Updates diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh index eb7dfd58826..d851dc60cbb 100755 --- a/ci/ci-tests.sh +++ b/ci/ci-tests.sh @@ -29,6 +29,16 @@ function PIN_RELEASE_DEPS { # Starting with version 1.0.21, the `ryu` crate has an MSRV of rustc 1.68 [ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p ryu --precise "1.0.20" --verbose + # Starting with version 1.0.23, the `unicode-ident` crate has an MSRV of rustc 1.71 + [ "$RUSTC_MINOR_VERSION" -lt 71 ] && cargo update -p unicode-ident --precise 1.0.22 + + # Starting with version 0.2.184, the `libc` crate has an MSRV of rustc 1.65 + [ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p libc --precise 0.2.183 --verbose + + # Starting with version 0.4.0, the `getrandom` crate has an MSRV of rustc 1.85 + GETRANDOM_VERSION="$(cargo tree 2>&1 | grep -o 'getrandom v0.4.*' | tr -d ' `' | tr 'v' '@' || echo -n)" + [ "$RUSTC_MINOR_VERSION" -lt 85 ] && cargo update -p "$GETRANDOM_VERSION" --precise 0.3.4 --verbose + return 0 # Don't fail the script if our rustc is higher than the last check } @@ -55,6 +65,9 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace # lock_api 0.4.13 requires rustc 1.64.0 [ "$RUSTC_MINOR_VERSION" -lt 64 ] && cargo update -p lock_api --precise "0.4.12" --verbose +# inventory 0.3.22 requires rustc 1.68.0 +[ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p inventory --precise "0.3.21" --verbose + export RUST_BACKTRACE=1 echo -e "\n\nChecking the workspace, except lightning-transaction-sync." @@ -71,6 +84,8 @@ pushd lightning-tests [ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p syn --precise "2.0.106" --verbose [ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p quote --precise "1.0.41" --verbose [ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p proc-macro2 --precise "1.0.103" --verbose +[ "$RUSTC_MINOR_VERSION" -lt 71 ] && cargo update -p unicode-ident --precise 1.0.22 +[ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p libc --precise 0.2.183 --verbose cargo test popd diff --git a/ci/ci-tx-sync-tests.sh b/ci/ci-tx-sync-tests.sh index 5f926a8e37b..4d40d6209c2 100755 --- a/ci/ci-tx-sync-tests.sh +++ b/ci/ci-tx-sync-tests.sh @@ -20,6 +20,9 @@ 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 +# Starting with version 1.9.0, the `zeroize` crate has an MSRV of rustc 1.85. +[ "$RUSTC_MINOR_VERSION" -lt 85 ] && cargo update -p zeroize --precise "1.8.2" --verbose + export RUST_BACKTRACE=1 echo -e "\n\nChecking Transaction Sync Clients with features." diff --git a/lightning/Cargo.toml b/lightning/Cargo.toml index a4a91dfb1eb..779a494df48 100644 --- a/lightning/Cargo.toml +++ b/lightning/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lightning" -version = "0.2.3" +version = "0.2.4" authors = ["Matt Corallo"] license = "MIT OR Apache-2.0" repository = "https://github.com/lightningdevkit/rust-lightning/" diff --git a/lightning/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs index b060c9b0601..7c96d918e34 100644 --- a/lightning/src/chain/chainmonitor.rs +++ b/lightning/src/chain/chainmonitor.rs @@ -579,7 +579,7 @@ where }; let has_pending_claims = monitor_state.monitor.has_pending_claims(); - if has_pending_claims || get_partition_key(channel_id).is_some_and(|key| key % partition_factor == 0) { + if has_pending_claims || get_partition_key(channel_id).map(|key| key % partition_factor == 0).unwrap_or(false) { log_trace!( logger, "Syncing Channel Monitor for channel {}", diff --git a/lightning/src/ln/offers_tests.rs b/lightning/src/ln/offers_tests.rs index e8832316b9a..300066c5c5f 100644 --- a/lightning/src/ln/offers_tests.rs +++ b/lightning/src/ln/offers_tests.rs @@ -62,9 +62,8 @@ use crate::offers::nonce::Nonce; use crate::offers::parse::Bolt12SemanticError; use crate::onion_message::messenger::{DefaultMessageRouter, Destination, MessageSendInstructions, NodeIdMessageRouter, NullMessageRouter, PeeledOnion, PADDED_PATH_LENGTH}; use crate::onion_message::offers::OffersMessage; -use crate::routing::gossip::{NodeAlias, NodeId}; use crate::routing::router::{PaymentParameters, RouteParameters, RouteParametersConfig}; -use crate::sign::{NodeSigner, Recipient}; +use crate::sign::NodeSigner; use crate::util::ser::Writeable; /// This used to determine whether we built a compact path or not, but now its just a random diff --git a/lightning/src/ln/splicing_tests.rs b/lightning/src/ln/splicing_tests.rs index 1b04474526e..f9d3495b38f 100644 --- a/lightning/src/ln/splicing_tests.rs +++ b/lightning/src/ln/splicing_tests.rs @@ -2358,7 +2358,7 @@ fn do_test_splice_out_initiator_reserve_breach_zero_fee_commitments( // dust limits, but later when we check the balances against those new // dust limits assert_eq!( - channel_value_sat.checked_add_signed(funding_contribution_sat).unwrap(), + (channel_value_sat as i64 + funding_contribution_sat) as u64, high_dust_limit_satoshis ); format!( diff --git a/lightning/src/util/sweep.rs b/lightning/src/util/sweep.rs index a10ecdc01e2..eb1fc09f2c2 100644 --- a/lightning/src/util/sweep.rs +++ b/lightning/src/util/sweep.rs @@ -1132,7 +1132,6 @@ mod tests { use bitcoin::{Amount, BlockHash, ScriptBuf, Transaction, TxOut, Txid}; use core::future as core_future; - use core::pin::pin; use core::sync::atomic::Ordering; use core::task::Poll; @@ -1238,7 +1237,7 @@ mod tests { // `write` future is `future::pending()`), then drop the future to mimic // cancellation - the sort of thing a `tokio::time::timeout` wrapper produces. { - let mut fut = pin!(sweeper.regenerate_and_broadcast_spend_if_necessary()); + let mut fut = Box::pin(sweeper.regenerate_and_broadcast_spend_if_necessary()); let waker = dummy_waker(); let mut ctx = task::Context::from_waker(&waker); assert!(matches!(fut.as_mut().poll(&mut ctx), Poll::Pending));