From e7984c3aacc8edfb82513e84af74f9602a321aea Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Tue, 27 Feb 2024 22:09:57 +0100 Subject: [PATCH 01/14] Pass custom TLVs with keysend requests. --- bindings/ldk_node.udl | 7 ++++++- src/lib.rs | 11 ++++++++--- src/types.rs | 9 +++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index 30b2d4a1b..db4dd7e53 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -72,7 +72,7 @@ interface LDKNode { [Throws=NodeError] PaymentHash send_payment_using_amount([ByRef]Bolt11Invoice invoice, u64 amount_msat); [Throws=NodeError] - PaymentHash send_spontaneous_payment(u64 amount_msat, PublicKey node_id); + PaymentHash send_spontaneous_payment(u64 amount_msat, PublicKey node_id, sequence custom_tlvs); [Throws=NodeError] void send_payment_probes([ByRef]Bolt11Invoice invoice); [Throws=NodeError] @@ -312,6 +312,11 @@ enum LogLevel { "Error", }; +dictionary TlvEntry { + u64 type; + sequence value; +}; + [Custom] typedef string Txid; diff --git a/src/lib.rs b/src/lib.rs index d0b6e9993..f580246e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,7 +134,7 @@ use types::{ Broadcaster, ChainMonitor, ChannelManager, FeeEstimator, KeysManager, NetworkGraph, PeerManager, Router, Scorer, Sweeper, Wallet, }; -pub use types::{ChannelDetails, PeerDetails, UserChannelId}; +pub use types::{ChannelDetails, PeerDetails, TlvEntry, UserChannelId}; use logger::{log_error, log_info, log_trace, FilesystemLogger, Logger}; @@ -1230,7 +1230,7 @@ impl Node { /// Send a spontaneous, aka. "keysend", payment pub fn send_spontaneous_payment( - &self, amount_msat: u64, node_id: PublicKey, + &self, amount_msat: u64, node_id: PublicKey, custom_tlvs: Vec, ) -> Result { let rt_lock = self.runtime.read().unwrap(); if rt_lock.is_none() { @@ -1253,7 +1253,12 @@ impl Node { PaymentParameters::from_node_id(node_id, self.config.default_cltv_expiry_delta), amount_msat, ); - let recipient_fields = RecipientOnionFields::spontaneous_empty(); + let recipient_fields = RecipientOnionFields::spontaneous_empty() + .with_custom_tlvs(custom_tlvs.into_iter().map(|tlv| (tlv.r#type, tlv.value)).collect()) + .map_err(|_| { + log_error!(self.logger, "Payment error: invalid custom TLVs."); + Error::PaymentSendingFailed + })?; match self.channel_manager.send_spontaneous_payment_with_retry( Some(payment_preimage), diff --git a/src/types.rs b/src/types.rs index 6269b3ddf..96b83c11e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -456,3 +456,12 @@ impl Default for ChannelConfig { LdkChannelConfig::default().into() } } + +/// Custom TLV entry. +pub struct TlvEntry { + /// Type number. + pub r#type: u64, + + /// Serialized value. + pub value: Vec, +} From 7b0f233251dd5c452794b54e8e14c5f188c14697 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Wed, 28 Feb 2024 22:52:56 +0100 Subject: [PATCH 02/14] Add the Go bindings build script. --- scripts/uniffi_bindgen_generate_go.sh | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 scripts/uniffi_bindgen_generate_go.sh diff --git a/scripts/uniffi_bindgen_generate_go.sh b/scripts/uniffi_bindgen_generate_go.sh new file mode 100755 index 000000000..60f28f8ab --- /dev/null +++ b/scripts/uniffi_bindgen_generate_go.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +uniffi-bindgen-go bindings/ldk_node.udl -o ffi/golang -c ./uniffi.toml + +build_lib() { + local TOOL=$1 + local TARGET=$2 + local OUTPUT_FILE=$3 + + $TOOL build --release --target $TARGET --features uniffi || exit 1 + mkdir -p "ffi/golang/ldk_node/$TARGET" || exit 1 + cp "target/$TARGET/release/$OUTPUT_FILE" "ffi/golang/ldk_node/$TARGET/" || exit 1 +} + +is_target_installed() { + local TARGET=$1 + rustup target list --installed | grep -q $TARGET +} + +# If we're running on macOS, build the macOS library using the host compiler. +# Cross compilation is not supported (needs more complex setup). +if [[ "$OSTYPE" == "darwin"* ]]; then + build_lib "cargo" "aarch64-apple-darwin" "libldk_node.dylib" +fi + +build_lib "cross" "x86_64-unknown-linux-gnu" "libldk_node.so" +build_lib "cross" "x86_64-pc-windows-gnu" "ldk_node.dll" From 4ca0953c8775c61740a0bd038eede1e8cbeaff37 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 1 Mar 2024 21:11:20 +0100 Subject: [PATCH 03/14] Add specific error code for invalid custom TLVs. --- src/error.rs | 2 ++ src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 0182b3092..7762426c3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -61,6 +61,8 @@ pub enum Error { InvalidChannelId, /// The given network is invalid. InvalidNetwork, + /// The custom TLVs are invalid. + InvalidCustomTlv, /// A payment with the given hash has already been initiated. DuplicatePayment, /// The available funds are insufficient to complete the given operation. diff --git a/src/lib.rs b/src/lib.rs index f580246e2..4741883c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1257,7 +1257,7 @@ impl Node { .with_custom_tlvs(custom_tlvs.into_iter().map(|tlv| (tlv.r#type, tlv.value)).collect()) .map_err(|_| { log_error!(self.logger, "Payment error: invalid custom TLVs."); - Error::PaymentSendingFailed + Error::InvalidCustomTlv })?; match self.channel_manager.send_spontaneous_payment_with_retry( From 5d4c37e6359765e70f4c6450e32d6c05e713a9e4 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 1 Mar 2024 21:26:16 +0100 Subject: [PATCH 04/14] Add custom TLVs to the test. --- tests/common.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/common.rs b/tests/common.rs index 815056b82..8b910ce56 100644 --- a/tests/common.rs +++ b/tests/common.rs @@ -3,7 +3,7 @@ use ldk_node::io::sqlite_store::SqliteStore; use ldk_node::{ - Builder, Config, Event, LogLevel, Node, NodeError, PaymentDirection, PaymentStatus, + Builder, Config, Event, LogLevel, Node, NodeError, PaymentDirection, PaymentStatus, TlvEntry, }; use lightning::ln::msgs::SocketAddress; @@ -489,8 +489,11 @@ pub(crate) fn do_channel_full_cycle( // Test spontaneous/keysend payments println!("\nA send_spontaneous_payment"); let keysend_amount_msat = 2500_000; - let keysend_payment_hash = - node_a.send_spontaneous_payment(keysend_amount_msat, node_b.node_id()).unwrap(); + let tlv1 = TlvEntry { r#type: 131073, value: vec![0x00, 0x11, 0x22, 0x33] }; + let tlv2 = TlvEntry { r#type: 131075, value: vec![0xaa, 0xbb] }; + let keysend_payment_hash = node_a + .send_spontaneous_payment(keysend_amount_msat, node_b.node_id(), vec![tlv1, tlv2]) + .unwrap(); expect_event!(node_a, PaymentSuccessful); let received_keysend_amount = match node_b.wait_next_event() { ref e @ Event::PaymentReceived { amount_msat, .. } => { From d312498aedc879488854b35cd4010b00db27e883 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 1 Mar 2024 21:29:55 +0100 Subject: [PATCH 05/14] Fix Display trait implementation for Error. --- src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.rs b/src/error.rs index 7762426c3..730e95460 100644 --- a/src/error.rs +++ b/src/error.rs @@ -109,6 +109,7 @@ impl fmt::Display for Error { Self::InvalidInvoice => write!(f, "The given invoice is invalid."), Self::InvalidChannelId => write!(f, "The given channel ID is invalid."), Self::InvalidNetwork => write!(f, "The given network is invalid."), + Self::InvalidCustomTlv => write!(f, "The given custom TLVs are invalid."), Self::DuplicatePayment => { write!(f, "A payment with the given hash has already been initiated.") }, From b968d715ce5be79a6c191d4b8888b5671ca542b8 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 1 Mar 2024 21:36:03 +0100 Subject: [PATCH 06/14] Add the new error code to UDL. --- bindings/ldk_node.udl | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index 2057763c8..e0810c030 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -131,6 +131,7 @@ enum NodeError { "InvalidInvoice", "InvalidChannelId", "InvalidNetwork", + "InvalidCustomTlv", "DuplicatePayment", "InsufficientFunds", "LiquiditySourceUnavailable", From c10b391c33a70cac5939241790075f456e79b3dc Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Fri, 1 Mar 2024 21:42:26 +0100 Subject: [PATCH 07/14] Check if cross-rs is available, provide instructions on installation if it is not. --- scripts/uniffi_bindgen_generate_go.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/uniffi_bindgen_generate_go.sh b/scripts/uniffi_bindgen_generate_go.sh index 60f28f8ab..9cf563a9e 100755 --- a/scripts/uniffi_bindgen_generate_go.sh +++ b/scripts/uniffi_bindgen_generate_go.sh @@ -2,6 +2,12 @@ set -e +if ! command -v cross &> /dev/null; then + echo "cross-rs is required to build bindings. Install it by running:" + echo " cargo install cross --git https://github.com/cross-rs/cross" + exit 1 +fi + uniffi-bindgen-go bindings/ldk_node.udl -o ffi/golang -c ./uniffi.toml build_lib() { From f099b0b5d22ff87948e7b1749320114b46b2765e Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Mon, 4 Mar 2024 22:07:46 +0100 Subject: [PATCH 08/14] Add Go bindings output directory to .gitignore. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index de30b070c..9d3368337 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ swift.swiftdoc /bindings/swift/LDKNodeFFI.xcframework /bindings/kotlin/ldk-node-android/lib/src/main/jniLibs /bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt + +/ffi/ From bbcb460e7f34a5692304067c0be66e596111149e Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Mon, 4 Mar 2024 22:10:05 +0100 Subject: [PATCH 09/14] Delete unused Github actions. --- .github/workflows/kotlin.yml | 56 ----------------- .github/workflows/publish-android.yml | 43 -------------- .github/workflows/publish-jvm.yml | 86 --------------------------- .github/workflows/python.yml | 39 ------------ 4 files changed, 224 deletions(-) delete mode 100644 .github/workflows/kotlin.yml delete mode 100644 .github/workflows/publish-android.yml delete mode 100644 .github/workflows/publish-jvm.yml delete mode 100644 .github/workflows/python.yml diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml deleted file mode 100644 index a1711ba49..000000000 --- a/.github/workflows/kotlin.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: CI Checks - Kotlin Tests - -on: [push, pull_request] - -jobs: - check-kotlin: - runs-on: ubuntu-latest - - env: - LDK_NODE_JVM_DIR: bindings/kotlin/ldk-node-jvm - LDK_NODE_ANDROID_DIR: bindings/kotlin/ldk-node-android - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - - - name: Set default Rust version to stable - run: rustup default stable - - - name: Show default version of NDK - run: echo $ANDROID_NDK_ROOT - - - name: Run ktlintCheck on ldk-node-jvm - run: | - cd $LDK_NODE_JVM_DIR - ./gradlew ktlintCheck - - - name: Run ktlintCheck on ldk-node-android - run: | - cd $LDK_NODE_ANDROID_DIR - ./gradlew ktlintCheck - - - name: Generate Kotlin JVM - run: ./scripts/uniffi_bindgen_generate_kotlin.sh - - - name: Generate Kotlin Android - run: ./scripts/uniffi_bindgen_generate_kotlin_android.sh - - - name: Start bitcoind and electrs - run: docker compose up -d - - - name: Run ldk-node-jvm tests - run: | - cd $LDK_NODE_JVM_DIR - ./gradlew test -Penv=ci - - - name: Run ldk-node-android tests - run: | - cd $LDK_NODE_ANDROID_DIR - ./gradlew test diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml deleted file mode 100644 index b6b24ac90..000000000 --- a/.github/workflows/publish-android.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Publish ldk-node-android to Maven Central -on: [workflow_dispatch] - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: "Check out PR branch" - uses: actions/checkout@v2 - - - name: "Cache" - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: "Set up JDK" - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: "Install Rust Android targets" - run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi - - - name: "Build ldk-node-android library" - run: | - export PATH=$PATH:$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin - ./scripts/uniffi_bindgen_generate_kotlin_android.sh - - - name: "Publish to Maven Local and Maven Central" - env: - ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} - ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }} - ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }} - run: | - cd bindings/kotlin/ldk-node-android - ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/publish-jvm.yml b/.github/workflows/publish-jvm.yml deleted file mode 100644 index e9b0a3594..000000000 --- a/.github/workflows/publish-jvm.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Publish ldk-node-jvm to Maven Central -on: [workflow_dispatch] - -jobs: - build-jvm-macOS-M1-native-lib: - name: "Create M1 and x86_64 JVM native binaries" - runs-on: macos-12 - steps: - - name: "Checkout publishing branch" - uses: actions/checkout@v2 - - - name: Cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: Set up JDK - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: Install aarch64 Rust target - run: rustup target add aarch64-apple-darwin - - - name: Build ldk-node-jvm library - run: | - ./scripts/uniffi_bindgen_generate_kotlin.sh - - # build aarch64 + x86_64 native libraries and upload - - name: Upload macOS native libraries for reuse in publishing job - uses: actions/upload-artifact@v3 - with: - # name: no name is required because we upload the entire directory - # the default name "artifact" will be used - path: /Users/runner/work/ldk-node/ldk-node/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/ - - build-jvm-full-library: - name: "Create full ldk-node-jvm library" - needs: [build-jvm-macOS-M1-native-lib] - runs-on: ubuntu-20.04 - steps: - - name: "Check out PR branch" - uses: actions/checkout@v2 - - - name: "Cache" - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: "Set up JDK" - uses: actions/setup-java@v2 - with: - distribution: temurin - java-version: 11 - - - name: "Build ldk-node-jvm library" - run: | - ./scripts/uniffi_bindgen_generate_kotlin.sh - - - name: Download macOS native libraries from previous job - uses: actions/download-artifact@v3 - id: download - with: - # download the artifact created in the prior job (named "artifact") - name: artifact - path: ./bindings/kotlin/ldk-node-jvm/lib/src/main/resources/ - - - name: "Publish to Maven Local and Maven Central" - env: - ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PGP_KEY_ID }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} - ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.NEXUS_USERNAME }} - ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.NEXUS_PASSWORD }} - run: | - cd bindings/kotlin/ldk-node-jvm - ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml deleted file mode 100644 index 21c0139a2..000000000 --- a/.github/workflows/python.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: CI Checks - Python Tests - -on: [push, pull_request] - -jobs: - check-python: - runs-on: ubuntu-latest - - env: - LDK_NODE_PYTHON_DIR: bindings/python - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Generate Python bindings - run: ./scripts/uniffi_bindgen_generate_python.sh - - - name: Start bitcoind and electrs - run: docker compose up -d - - - name: Install testing prerequisites - run: | - pip3 install requests - - - name: Run Python unit tests - env: - BITCOIN_CLI_BIN: "docker exec ldk-node-bitcoin-1 bitcoin-cli" - BITCOIND_RPC_USER: "user" - BITCOIND_RPC_PASSWORD: "pass" - ESPLORA_ENDPOINT: "http://127.0.0.1:3002" - run: | - cd $LDK_NODE_PYTHON_DIR - python3 -m unittest discover -s src/ldk_node From d348f90e2733d279ec01f288b6e78dee0a41358a Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 5 Mar 2024 14:36:35 +0700 Subject: [PATCH 10/14] chore: disable unnecessary rust workflow items --- .github/workflows/rust.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 14d87d2eb..3616ceefe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,8 +17,8 @@ jobs: ] toolchain: [ stable, - beta, - 1.63.0, # Our MSRV + #beta, + #1.63.0, # Our MSRV ] include: - toolchain: stable @@ -65,10 +65,10 @@ jobs: - name: Build with UniFFI support on Rust ${{ matrix.toolchain }} if: matrix.build-uniffi run: cargo build --features uniffi --verbose --color always - - name: Build documentation on Rust ${{ matrix.toolchain }} - run: | - cargo doc --release --verbose --color always - cargo doc --document-private-items --verbose --color always + #- name: Build documentation on Rust ${{ matrix.toolchain }} + # run: | + # cargo doc --release --verbose --color always + # cargo doc --document-private-items --verbose --color always - name: Check release build on Rust ${{ matrix.toolchain }} run: cargo check --release --verbose --color always - name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }} From 07b67597e1775732682573b1a8000b76c03919c5 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 5 Mar 2024 14:43:19 +0700 Subject: [PATCH 11/14] fix: remove commented lines --- .github/workflows/rust.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3616ceefe..38e69018d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,8 +17,6 @@ jobs: ] toolchain: [ stable, - #beta, - #1.63.0, # Our MSRV ] include: - toolchain: stable @@ -65,10 +63,6 @@ jobs: - name: Build with UniFFI support on Rust ${{ matrix.toolchain }} if: matrix.build-uniffi run: cargo build --features uniffi --verbose --color always - #- name: Build documentation on Rust ${{ matrix.toolchain }} - # run: | - # cargo doc --release --verbose --color always - # cargo doc --document-private-items --verbose --color always - name: Check release build on Rust ${{ matrix.toolchain }} run: cargo check --release --verbose --color always - name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }} From fb7aae681129cb920d3b3c66522c1ad2ecd8f9b3 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 5 Mar 2024 14:49:49 +0700 Subject: [PATCH 12/14] chore: remove unused include --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 38e69018d..4b77edca9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,8 +27,6 @@ jobs: platform: macos-latest - toolchain: stable platform: windows-latest - - toolchain: 1.63.0 - msrv: true runs-on: ${{ matrix.platform }} steps: - name: Checkout source code From cd7be36d5822855ea15115c2a0133880d2a36ca4 Mon Sep 17 00:00:00 2001 From: Roman Dmitrienko Date: Tue, 5 Mar 2024 11:00:34 +0100 Subject: [PATCH 13/14] Fix linker options. --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 31286b8f9..5dbd9243b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,10 @@ readme = "README.md" keywords = ["bitcoin", "lightning", "ldk", "bdk"] categories = ["cryptography::cryptocurrencies"] +[profile.release] +lto = true +rpath = true + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] From 4d598e277bf3df3f9f1f9c1c67c05008306161c4 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 5 Mar 2024 18:01:55 +0700 Subject: [PATCH 14/14] fix: remove duplicate key in Cargo.toml --- Cargo.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5dbd9243b..1d6bf9c1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,6 @@ readme = "README.md" keywords = ["bitcoin", "lightning", "ldk", "bdk"] categories = ["cryptography::cryptocurrencies"] -[profile.release] -lto = true -rpath = true - # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -103,6 +99,8 @@ uniffi = { version = "0.25.3", features = ["build"], optional = true } [profile.release] panic = "abort" +lto = true +rpath = true [profile.dev] panic = "abort"