diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7077cb7c55b..e33cfc2558d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -243,7 +243,7 @@ jobs: sudo apt-get -y install build-essential binutils-dev libunwind-dev - name: Pin the regex dependency run: | - cd fuzz && cargo update -p regex --precise "1.9.6" --verbose && cd .. + cd fuzz && cargo update -p regex --precise "1.9.6" && cargo update -p libc --precise 0.2.183 && cd .. - name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }} run: | cd fuzz diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh index 56fc45d753c..6d0abe0f03e 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 } @@ -75,6 +85,8 @@ pushd lightning-tests [ "$RUSTC_MINOR_VERSION" -lt 68 ] && cargo update -p quote --precise "1.0.41" --verbose [ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --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 [ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean popd diff --git a/ci/ci-tx-sync-tests.sh b/ci/ci-tx-sync-tests.sh index 116e2c03880..77962d4ebf6 100755 --- a/ci/ci-tx-sync-tests.sh +++ b/ci/ci-tx-sync-tests.sh @@ -23,6 +23,9 @@ PIN_RELEASE_DEPS # pin the release dependencies # Starting with version 2.12.1, the `indexmap` crate has an MSRV of rustc 1.82. [ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p indexmap --precise "2.11.4" --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/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs index 5136b07c0f3..c07e2c27d4f 100644 --- a/lightning/src/chain/chainmonitor.rs +++ b/lightning/src/chain/chainmonitor.rs @@ -337,7 +337,7 @@ where C::Target: chain::Filter, }; let has_pending_claims = monitor_state.monitor.has_pending_claims(); - if has_pending_claims || get_partition_key(funding_outpoint).is_some_and(|key| key % partition_factor == 0) { + if has_pending_claims || get_partition_key(funding_outpoint).map(|key| key % partition_factor == 0).unwrap_or(false) { log_trace!(logger, "Syncing Channel Monitor for channel {}", log_funding_info!(monitor)); // Even though we don't track monitor updates from chain-sync as pending, we still want // updates per-channel to be well-ordered so that users don't see a diff --git a/lightning/src/ln/offers_tests.rs b/lightning/src/ln/offers_tests.rs index 58ebd67316b..7697036f424 100644 --- a/lightning/src/ln/offers_tests.rs +++ b/lightning/src/ln/offers_tests.rs @@ -51,7 +51,7 @@ use crate::events::{ClosureReason, Event, MessageSendEventsProvider, PaymentFail use crate::ln::channelmanager::{Bolt12PaymentError, MAX_SHORT_LIVED_RELATIVE_EXPIRY, PaymentId, RecentPaymentDetails, Retry, self}; use crate::types::features::Bolt12InvoiceFeatures; use crate::ln::functional_test_utils::*; -use crate::ln::msgs::{ChannelMessageHandler, Init, NodeAnnouncement, OnionMessage, OnionMessageHandler, RoutingMessageHandler, SocketAddress, UnsignedGossipMessage, UnsignedNodeAnnouncement}; +use crate::ln::msgs::{ChannelMessageHandler, Init, OnionMessage, OnionMessageHandler}; use crate::ln::outbound_payment::IDEMPOTENCY_TIMEOUT_TICKS; use crate::offers::invoice::Bolt12Invoice; use crate::offers::invoice_error::InvoiceError; @@ -61,8 +61,7 @@ use crate::offers::parse::Bolt12SemanticError; use crate::onion_message::messenger::{Destination, PeeledOnion, MessageSendInstructions}; use crate::onion_message::offers::OffersMessage; use crate::onion_message::packet::ParsedOnionMessageContents; -use crate::routing::gossip::{NodeAlias, NodeId}; -use crate::sign::{NodeSigner, Recipient}; +use crate::sign::NodeSigner; use crate::util::ser::Writeable; use crate::prelude::*; diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index c05f8fb38c6..8e5a415cab2 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -37,7 +37,6 @@ use crate::onion_message::packet::OnionMessageContents; use crate::routing::gossip::{NodeId, NodeAlias}; use crate::util::atomic_counter::AtomicCounter; use crate::util::logger::{Level, Logger, WithContext}; -use crate::util::string::PrintableString; #[allow(unused_imports)] use crate::prelude::*;