From 18b3e4198352411bfd1d4c99df73382f3a2b49e6 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 9 Dec 2025 00:08:07 +0000 Subject: [PATCH 1/3] Update auto-generated bindings to LDK 0.1.8 --- c_sharp/src/org/ldk/structs/ChannelManager.cs | 19 +++++++++++++------ c_sharp/src/org/ldk/structs/PeerManager.cs | 2 ++ .../java/org/ldk/structs/ChannelManager.java | 19 +++++++++++++------ src/main/java/org/ldk/structs/Event.java | 3 ++- .../java/org/ldk/structs/PeerManager.java | 2 ++ ts/structs/ChannelManager.mts | 19 +++++++++++++------ ts/structs/PeerManager.mts | 2 ++ 7 files changed, 47 insertions(+), 19 deletions(-) diff --git a/c_sharp/src/org/ldk/structs/ChannelManager.cs b/c_sharp/src/org/ldk/structs/ChannelManager.cs index 793a4296..3f3fa3bd 100644 --- a/c_sharp/src/org/ldk/structs/ChannelManager.cs +++ b/c_sharp/src/org/ldk/structs/ChannelManager.cs @@ -723,7 +723,7 @@ namespace org { namespace ldk { namespace structs { * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync - * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor * [`list_channels`]: Self::list_channels * [`list_usable_channels`]: Self::list_usable_channels * [`create_channel`]: Self::create_channel @@ -1014,7 +1014,7 @@ public org.ldk.structs.Result_NoneAPIErrorZ close_channel(org.ldk.structs.Channe * * The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction. * Will fail if a shutdown script has already been set for this channel by - * ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must * also be compatible with our and the counterparty's features. * * May generate a [`SendShutdown`] message event on success, which should be relayed. @@ -1026,6 +1026,7 @@ public org.ldk.structs.Result_NoneAPIErrorZ close_channel(org.ldk.structs.Channe * * [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None @@ -2011,7 +2012,7 @@ public org.ldk.structs.Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_p /** * Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS - * resolver(s) at `dns_resolvers` which resolve names according to bLIP 32. + * resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32]. * * If the wallet supports paying on-chain schemes, you should instead use * [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by @@ -2029,18 +2030,19 @@ public org.ldk.structs.Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_p * * To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the * invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the - * payment will fail with an [`Event::InvoiceRequestFailed`]. + * payment will fail with an [`PaymentFailureReason::UserAbandoned`] or + * [`PaymentFailureReason::InvoiceRequestExpired`], respectively. * * # Privacy * * For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`] - * to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the + * to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the * docs of the parameterized [`Router`], which implements [`MessageRouter`]. * * # Limitations * * Requires a direct connection to the given [`Destination`] as well as an introduction node in - * [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to + * [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to * the responding [`Bolt12Invoice::payment_paths`]. * * # Errors @@ -2048,8 +2050,13 @@ public org.ldk.structs.Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_p * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * + * [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki + * [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + * [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath + * [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned + * [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected */ public org.ldk.structs.Result_NoneNoneZ pay_for_offer_from_human_readable_name(org.ldk.structs.HumanReadableName name, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat, Destination[] dns_resolvers) { long ret = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, name.ptr, amount_msats, InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(payment_id, 32)), retry_strategy.ptr, max_total_routing_fee_msat.ptr, InternalUtils.encodeUint64Array(InternalUtils.mapArray(dns_resolvers, dns_resolvers_conv_13 => dns_resolvers_conv_13.ptr))); diff --git a/c_sharp/src/org/ldk/structs/PeerManager.cs b/c_sharp/src/org/ldk/structs/PeerManager.cs index 9bb5fcf6..10e6de46 100644 --- a/c_sharp/src/org/ldk/structs/PeerManager.cs +++ b/c_sharp/src/org/ldk/structs/PeerManager.cs @@ -233,6 +233,8 @@ public org.ldk.structs.Result_boolPeerHandleErrorZ read_event(org.ldk.structs.So * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment * [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards * [`send_data`]: SocketDescriptor::send_data + * [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor */ public void process_events() { bindings.PeerManager_process_events(this.ptr); diff --git a/src/main/java/org/ldk/structs/ChannelManager.java b/src/main/java/org/ldk/structs/ChannelManager.java index 0b759613..3d0c58cb 100644 --- a/src/main/java/org/ldk/structs/ChannelManager.java +++ b/src/main/java/org/ldk/structs/ChannelManager.java @@ -725,7 +725,7 @@ * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync - * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor * [`list_channels`]: Self::list_channels * [`list_usable_channels`]: Self::list_usable_channels * [`create_channel`]: Self::create_channel @@ -1011,7 +1011,7 @@ public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, * * The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction. * Will fail if a shutdown script has already been set for this channel by - * ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must * also be compatible with our and the counterparty's features. * * May generate a [`SendShutdown`] message event on success, which should be relayed. @@ -1023,6 +1023,7 @@ public Result_NoneAPIErrorZ close_channel(org.ldk.structs.ChannelId channel_id, * * [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None @@ -2006,7 +2007,7 @@ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.s /** * Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS - * resolver(s) at `dns_resolvers` which resolve names according to bLIP 32. + * resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32]. * * If the wallet supports paying on-chain schemes, you should instead use * [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by @@ -2024,18 +2025,19 @@ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.s * * To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the * invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the - * payment will fail with an [`Event::InvoiceRequestFailed`]. + * payment will fail with an [`PaymentFailureReason::UserAbandoned`] or + * [`PaymentFailureReason::InvoiceRequestExpired`], respectively. * * # Privacy * * For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`] - * to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the + * to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the * docs of the parameterized [`Router`], which implements [`MessageRouter`]. * * # Limitations * * Requires a direct connection to the given [`Destination`] as well as an introduction node in - * [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to + * [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to * the responding [`Bolt12Invoice::payment_paths`]. * * # Errors @@ -2043,8 +2045,13 @@ public Result_Bolt12InvoiceBolt12SemanticErrorZ request_refund_payment(org.ldk.s * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * + * [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki + * [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + * [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath + * [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned + * [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected */ public Result_NoneNoneZ pay_for_offer_from_human_readable_name(org.ldk.structs.HumanReadableName name, long amount_msats, byte[] payment_id, org.ldk.structs.Retry retry_strategy, org.ldk.structs.Option_u64Z max_total_routing_fee_msat, Destination[] dns_resolvers) { long ret = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, name.ptr, amount_msats, InternalUtils.check_arr_len(payment_id, 32), retry_strategy.ptr, max_total_routing_fee_msat.ptr, dns_resolvers != null ? Arrays.stream(dns_resolvers).mapToLong(dns_resolvers_conv_13 -> dns_resolvers_conv_13.ptr).toArray() : null); diff --git a/src/main/java/org/ldk/structs/Event.java b/src/main/java/org/ldk/structs/Event.java index e0db0fc9..e0577f7a 100644 --- a/src/main/java/org/ldk/structs/Event.java +++ b/src/main/java/org/ldk/structs/Event.java @@ -1438,7 +1438,7 @@ private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) { * To accept the request (and in the case of a dual-funded channel, not contribute funds), * call [`ChannelManager::accept_inbound_channel`]. * To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`]. - * Note that a ['ChannelClosed`] event will _not_ be triggered if the channel is rejected. + * Note that a [`ChannelClosed`] event will _not_ be triggered if the channel is rejected. * * The event is only triggered when a new open channel request is received and the * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. @@ -1448,6 +1448,7 @@ private DiscardFunding(long ptr, bindings.LDKEvent.DiscardFunding obj) { * returning `Err(ReplayEvent ())`) and won't be persisted across restarts. * * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel + * [`ChannelClosed`]: Event::ChannelClosed * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels */ diff --git a/src/main/java/org/ldk/structs/PeerManager.java b/src/main/java/org/ldk/structs/PeerManager.java index 09fcbfdf..099c3fbf 100644 --- a/src/main/java/org/ldk/structs/PeerManager.java +++ b/src/main/java/org/ldk/structs/PeerManager.java @@ -237,6 +237,8 @@ public Result_boolPeerHandleErrorZ read_event(org.ldk.structs.SocketDescriptor p * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment * [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards * [`send_data`]: SocketDescriptor::send_data + * [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor */ public void process_events() { bindings.PeerManager_process_events(this.ptr); diff --git a/ts/structs/ChannelManager.mts b/ts/structs/ChannelManager.mts index 0798b639..d31ae33a 100644 --- a/ts/structs/ChannelManager.mts +++ b/ts/structs/ChannelManager.mts @@ -1516,7 +1516,7 @@ import * as bindings from '../bindings.mjs' * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync - * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor * [`list_channels`]: Self::list_channels * [`list_usable_channels`]: Self::list_usable_channels * [`create_channel`]: Self::create_channel @@ -1771,7 +1771,7 @@ export class ChannelManager extends CommonBase { * * The `shutdown_script` provided will be used as the `scriptPubKey` for the closing transaction. * Will fail if a shutdown script has already been set for this channel by - * ['ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]. The given shutdown script must * also be compatible with our and the counterparty's features. * * May generate a [`SendShutdown`] message event on success, which should be relayed. @@ -1783,6 +1783,7 @@ export class ChannelManager extends CommonBase { * * [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee + * [`ChannelHandshakeConfig::commit_upfront_shutdown_pubkey`]: crate::util::config::ChannelHandshakeConfig::commit_upfront_shutdown_pubkey * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown * * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None @@ -2622,7 +2623,7 @@ export class ChannelManager extends CommonBase { /** * Pays for an [`Offer`] looked up using [BIP 353] Human Readable Names resolved by the DNS - * resolver(s) at `dns_resolvers` which resolve names according to bLIP 32. + * resolver(s) at `dns_resolvers` which resolve names according to [bLIP 32]. * * If the wallet supports paying on-chain schemes, you should instead use * [`OMNameResolver::resolve_name`] and [`OMNameResolver::handle_dnssec_proof_for_uri`] (by @@ -2640,18 +2641,19 @@ export class ChannelManager extends CommonBase { * * To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the * invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the - * payment will fail with an [`Event::InvoiceRequestFailed`]. + * payment will fail with an [`PaymentFailureReason::UserAbandoned`] or + * [`PaymentFailureReason::InvoiceRequestExpired`], respectively. * * # Privacy * * For payer privacy, uses a derived payer id and uses [`MessageRouter::create_blinded_paths`] - * to construct a [`BlindedPath`] for the reply path. For further privacy implications, see the + * to construct a [`BlindedMessagePath`] for the reply path. For further privacy implications, see the * docs of the parameterized [`Router`], which implements [`MessageRouter`]. * * # Limitations * * Requires a direct connection to the given [`Destination`] as well as an introduction node in - * [`Offer::paths`] or to [`Offer::signing_pubkey`], if empty. A similar restriction applies to + * [`Offer::paths`] or to [`Offer::issuer_signing_pubkey`], if empty. A similar restriction applies to * the responding [`Bolt12Invoice::payment_paths`]. * * # Errors @@ -2659,8 +2661,13 @@ export class ChannelManager extends CommonBase { * Errors if: * - a duplicate `payment_id` is provided given the caveats in the aforementioned link, * + * [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki + * [bLIP 32]: https://github.com/lightning/blips/blob/master/blip-0032.md * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments + * [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath + * [`PaymentFailureReason::UserAbandoned`]: crate::events::PaymentFailureReason::UserAbandoned + * [`PaymentFailureReason::InvoiceRequestRejected`]: crate::events::PaymentFailureReason::InvoiceRequestRejected */ public pay_for_offer_from_human_readable_name(name: HumanReadableName, amount_msats: bigint, payment_id: Uint8Array, retry_strategy: Retry, max_total_routing_fee_msat: Option_u64Z, dns_resolvers: Destination[]): Result_NoneNoneZ { const ret: bigint = bindings.ChannelManager_pay_for_offer_from_human_readable_name(this.ptr, CommonBase.get_ptr_of(name), amount_msats, bindings.encodeUint8Array(payment_id), CommonBase.get_ptr_of(retry_strategy), CommonBase.get_ptr_of(max_total_routing_fee_msat), bindings.encodeUint64Array(dns_resolvers.map(dns_resolvers_conv_13 => CommonBase.get_ptr_of(dns_resolvers_conv_13)))); diff --git a/ts/structs/PeerManager.mts b/ts/structs/PeerManager.mts index d8171f42..ef28f2d3 100644 --- a/ts/structs/PeerManager.mts +++ b/ts/structs/PeerManager.mts @@ -996,6 +996,8 @@ export class PeerManager extends CommonBase { * [`send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment * [`ChannelManager::process_pending_htlc_forwards`]: crate::ln::channelmanager::ChannelManager::process_pending_htlc_forwards * [`send_data`]: SocketDescriptor::send_data + * [`lightning-net-tokio`]: https://docs.rs/lightning-net-tokio/latest/lightning_net_tokio + * [`lightning-background-processor`]: https://docs.rs/lightning-background-processor/latest/lightning_background_processor */ public process_events(): void { bindings.PeerManager_process_events(this.ptr); From 088d20f005c83900dc48e35078ad98e41c5b8436 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 9 Dec 2025 16:01:54 +0000 Subject: [PATCH 2/3] Ensure `syn` and `quote` are pinned in CI in `lightning-c-bindings` --- .github/workflows/build.yml | 60 ++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 614c7b05..ae80979e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,10 +41,20 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose + - name: Pin proc-macro and quote to meet MSRV + run: | + cd ldk-c-bindings/c-bindings-gen + cargo update -p quote --precise "1.0.30" --verbose + cargo update -p proc-macro2 --precise "1.0.65" --verbose - name: Rebuild C bindings without STD run: | cd ldk-c-bindings @@ -137,10 +147,20 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose + - name: Pin proc-macro and quote to meet MSRV + run: | + cd ldk-c-bindings/c-bindings-gen + cargo update -p quote --precise "1.0.30" --verbose + cargo update -p proc-macro2 --precise "1.0.65" --verbose - name: Rebuild C bindings with STD run: | cd ldk-c-bindings @@ -182,10 +202,15 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -233,7 +258,10 @@ jobs: cd ldk-c-bindings git clean -f -x -d git reset --hard - cd .. + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose + cd ../.. export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" export ANDROID_TOOLCHAIN="$(pwd)/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64" export PATH="$PATH:$ANDROID_TOOLCHAIN/bin" @@ -363,10 +391,15 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose - name: Pin proc-macro and quote to meet MSRV run: | cd ldk-c-bindings/c-bindings-gen @@ -424,10 +457,15 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose - name: Pin proc-macro and quote to meet MSRV run: | cd ldk-c-bindings/c-bindings-gen @@ -551,10 +589,20 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose + - name: Pin proc-macro and quote to meet MSRV + run: | + cd ldk-c-bindings/c-bindings-gen + cargo update -p quote --precise "1.0.30" --verbose + cargo update -p proc-macro2 --precise "1.0.65" --verbose - name: Fetch MacOS SDK run: | curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz @@ -683,10 +731,20 @@ jobs: git clone https://github.com/lightningdevkit/rust-lightning cd rust-lightning git checkout origin/0.1-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings git checkout 0.1 + cd lightning-c-bindings + cargo update -p syn --precise "2.0.106" --verbose + cargo update -p quote --precise "1.0.41" --verbose + - name: Pin proc-macro and quote to meet MSRV + run: | + cd ldk-c-bindings/c-bindings-gen + cargo update -p quote --precise "1.0.30" --verbose + cargo update -p proc-macro2 --precise "1.0.65" --verbose - name: Checkout Android AAR binaries and artifacts run: | # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract: From fb231a454df8b8551278b70e33be606c75199a1e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 11 Dec 2025 14:31:34 +0000 Subject: [PATCH 3/3] Use the pinned version of `cbindgen` to fix determinism on fedora --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae80979e..f07461fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -192,7 +192,11 @@ jobs: fetch-depth: 0 - name: Install cbindgen run: | - cargo install cbindgen + git clone https://github.com/eqrion/cbindgen + cd cbindgen/ + git checkout v0.20.0 + cargo update -p indexmap --precise "1.6.2" --verbose + cargo install --locked --path . - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global safe.directory '*'