Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to LDK 0.4.2 #53

Merged
merged 173 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
182bc21
Fix inbound capacity comment
elnosh Jun 21, 2024
66fec69
Merge pull request #317 from elnosh/fix-inbound-comment
tnull Jun 23, 2024
f2074f1
Allow start from outer runtime
tnull Jun 24, 2024
a7466c6
Revert "Pin `url` to v2.5.0 in CI to fix MSRV breakage"
tnull Jul 8, 2024
ab059a8
Merge pull request #322 from tnull/2024-07-unpin-url
tnull Jul 8, 2024
a60900f
Ignore all `target` folders including bindings
jbesraa Jul 10, 2024
13ec8df
Merge pull request #323 from jbesraa/2024-07-10-ignore-uniffi-target-…
tnull Jul 10, 2024
8a4afb6
Merge pull request #319 from lightningdevkit/2024-06-start-with-runtime
tnull Jul 11, 2024
abfcc2e
Pin `cc` to `1.0.105` for MSRV
jbesraa Jul 10, 2024
403c137
Merge pull request #324 from jbesraa/2024-07-10-fix-msrv
tnull Jul 12, 2024
4793289
Revert "Pin `cc` to `1.0.105` for MSRV"
tnull Jul 15, 2024
8dd3790
Merge pull request #326 from tnull/2024-07-unpin-cc
tnull Jul 15, 2024
77a0bbe
Add BIP21 Unified QR Code Support (#302)
slanesuke Jul 18, 2024
caa4d22
Request current fee rates only once
tnull Jul 30, 2024
8a59dc0
Fix `send_to_address` variable naming in bindings
tnull Jul 30, 2024
5733b58
Account for `check-cfg`
tnull Jul 30, 2024
5b9b607
Merge pull request #335 from tnull/2024-07-account-for-check-cfg
tnull Jul 30, 2024
8e5dbfe
Merge pull request #334 from tnull/2024-07-fix-onchain-payment-variab…
tnull Jul 30, 2024
987f78c
Merge pull request #333 from tnull/2024-07-request-fees-once
tnull Jul 30, 2024
f382ea0
Add `cfg(cln_test)` to `Cargo.toml`
slanesuke Aug 2, 2024
d76509b
Merge pull request #337 from slanesuke/2024-08-fix-cln-test-cfg
tnull Aug 2, 2024
ed841e0
Pin `tokio` to v1.38.1 to fix MSRV build
tnull Aug 7, 2024
952b889
Merge pull request #338 from tnull/2024-08-pin-tokio
tnull Aug 7, 2024
40170d9
Enable caching for `bitcoind`/`electrs` in CI
tnull Aug 12, 2024
0d4ff37
Merge pull request #340 from tnull/2024-08-cache-downloads
tnull Aug 12, 2024
30ce72d
Make cache `key`s OS-specific
tnull Aug 12, 2024
2bbb764
Merge pull request #341 from tnull/2024-08-make-cache-os-specific
tnull Aug 12, 2024
6b35703
Try fix caching
tnull Aug 12, 2024
dcdbaf7
Merge pull request #342 from tnull/2024-08-try-fix-caching
tnull Aug 12, 2024
41ae206
Try fixing caching once more
tnull Aug 13, 2024
dffb790
Merge pull request #343 from tnull/2024-08-try-fix-caching-2
tnull Aug 13, 2024
0cfb829
Fix caching third attempt
tnull Aug 13, 2024
3b645b3
Merge pull request #344 from tnull/2024-08-try-fix-caching-3
tnull Aug 13, 2024
683bfb3
Add `payer_note` in `PaymentKind::Bolt12`
slanesuke Jul 15, 2024
76fb23f
Merge pull request #327 from slanesuke/2024-07-expose-payer_note-in-P…
tnull Aug 19, 2024
c5b8d6e
Return a non-`Arc`ed `Bolt12Payment` for non-`uniffi`
tnull Aug 22, 2024
e233188
Merge pull request #348 from tnull/2024-08-fix-bolt12-api
tnull Aug 22, 2024
5fe90d1
Introduce `SendingParameters` struct
slanesuke Aug 22, 2024
bf4ddff
Add default `SendingParameters` to node config
slanesuke Aug 12, 2024
d6e6ff7
Add `SendingParameters` to bolt11 `send`
slanesuke Aug 1, 2024
2b85ba9
Add `SendingParameters` to bolt11 `send_using_amount`
slanesuke Aug 1, 2024
4822336
Add `SendingParameters` to spontaneous `send`
slanesuke Aug 1, 2024
398ece5
Merge pull request #336 from slanesuke/2024-07-introduce-PaymentParam…
tnull Aug 27, 2024
76d0698
Fix python `send`
tnull Aug 27, 2024
4235a19
Reorder `config` imports
tnull Aug 27, 2024
3ca42ff
Rename `sending_paramters_config` field to `sending_parameters`
tnull Aug 27, 2024
8a432b1
Refactor `max_total_routing_fee_msat` to allow setting `None`
tnull Aug 27, 2024
b282d42
Drop `default_cltv_expiry_delta`
tnull Aug 27, 2024
09d68ee
Refactor `ChannelConfig` / `MaxDustHTLCExposure`
tnull Aug 25, 2024
ab7cc70
Merge pull request #351 from tnull/2024-08-336-followup
tnull Aug 28, 2024
ea448a1
Merge pull request #350 from tnull/2024-08-channel-config-refactor
tnull Aug 28, 2024
7202c83
Make `Wallet` and `WalletKeysManager` `pub(crate)`
tnull Aug 30, 2024
42a695e
Refactor `FeeEstimator` to introduce local target variants
tnull Aug 30, 2024
4535c5f
Merge pull request #352 from tnull/2024-08-fee-estimator-refactor
tnull Aug 30, 2024
e805403
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows
dependabot[bot] Sep 3, 2024
bd42f57
Merge pull request #353 from lightningdevkit/dependabot/github_action…
tnull Sep 4, 2024
1183019
Pin `tokio-util` in CI to fix MSRV
tnull Sep 5, 2024
648058e
Merge pull request #356 from tnull/2024-09-pin-tokio-util
tnull Sep 5, 2024
7eca7fb
Add copyright notices where they were missing
tnull Sep 5, 2024
6d8382b
Merge pull request #355 from tnull/2024-09-add-copyright-headers
tnull Sep 5, 2024
6be51c6
Vss-client upgrade to 0.3.x
G8XSU Sep 7, 2024
92612dc
Fix vss war name for vss-server binary in CI.
G8XSU Sep 7, 2024
7c7b98b
Fix lightning-liquidity to 0.1.0-alpha.4 until upgrade PR.
G8XSU Sep 12, 2024
1a6a2ca
Merge pull request #357 from G8XSU/vss-client-upgrade
tnull Sep 13, 2024
12dfc1a
feat: sanitize and set node alias
enigbe Jul 22, 2024
e54bfe0
feat: broadcast node announcement with set alias
enigbe Jul 25, 2024
5bd4a88
fix: correct node announcement, simplify setting alias, clean
enigbe Aug 6, 2024
8e73296
docs: clarify node announcement broadcast logic
enigbe Aug 6, 2024
7ad7029
refactor: update UserConfig if node alias/listening addresses are unc…
enigbe Aug 8, 2024
81a0f4d
refactor: update node alias sanitization
enigbe Aug 29, 2024
32e7096
refactor: decompose connecting w/ peer & opening a channel
enigbe Aug 29, 2024
059a30e
docs: cleanup documentation
enigbe Aug 29, 2024
09fca09
test: update tests due to `connect_open_channel` decomposition
enigbe Aug 29, 2024
1160034
fix: change channel config type in open_(announced)_channel
enigbe Aug 29, 2024
6c3deaf
fix: remove broken intra doc link
enigbe Aug 29, 2024
6aff282
fix: remove unstable feature `is_some_and`
enigbe Aug 29, 2024
0af5df6
refactor: improve channel announcement logic and fix binding tests
enigbe Sep 23, 2024
4fd1cb8
fix(test): Implement conditional channel opening based on aliases and…
enigbe Sep 26, 2024
c9ebeb6
Merge pull request #330 from enigbe/feat-set-node-alias
tnull Oct 7, 2024
11f9a89
Revert "fix(test): Implement conditional channel opening based on ali…
tnull Oct 7, 2024
b8e3d7a
Clarify `Builder`/`Config` docs
tnull Oct 7, 2024
7c3232c
Fix alignment in config docs
tnull Oct 7, 2024
81c36d4
Move `NodeAlias` import to other non-`pub` imports
tnull Oct 7, 2024
d630365
Update docs on `open{_announced}_channel`
tnull Oct 7, 2024
58f40b9
Replace `ChannelAnnouncementStatus` boilerplate with a simple bool flag
tnull Oct 7, 2024
534b1ac
Make announcing channels in tests a choice again
tnull Oct 7, 2024
85862f5
Drop `open_announced_channel` from README
tnull Oct 7, 2024
58188b8
Merge pull request #366 from tnull/2024-10-330-followups
tnull Oct 8, 2024
a225e1e
Prefactor: Move `src/wallet.rs` to `src/wallet/mod.rs`
tnull Sep 5, 2024
d0de144
Update the world
tnull Aug 19, 2024
3f1c842
Merge pull request #358 from tnull/2024-08-upgrade-to-LDK-0.0.124-BDK…
tnull Oct 9, 2024
176b5c6
Re-add `block_in_place` in `stop`
tnull Oct 14, 2024
6372475
Merge pull request #373 from tnull/2024-10-stop-block-in-place
tnull Oct 14, 2024
789dbdb
Upgrade LDK to v0.0.125
G8XSU Oct 15, 2024
3ef3c3e
Upgrade lightning-liquidity to v0.1.0-alpha.6
G8XSU Oct 15, 2024
0c816c8
Merge pull request #375 from G8XSU/ldk-125-upgrade
tnull Oct 15, 2024
0265c2d
Add `ChainSource` enum
tnull Oct 2, 2024
da65835
Move on-chain syncing to `ChainSource`
tnull Oct 2, 2024
4da77eb
Move Lightning wallet syncing to `ChainSource`
tnull Oct 2, 2024
9096382
Prefactor: Move fee estimator defaults to util methods
tnull Oct 2, 2024
3105a28
Move fee rate cache updating to `ChainSource`
tnull Oct 2, 2024
fd0c26f
Move broadcast queue processing to `ChainSource`
tnull Oct 2, 2024
d66edd4
Move syncing tasks to `ChainSource`
tnull Oct 3, 2024
835baf4
Implement incremental Esplora syncing for the on-chain wallet
tnull Oct 3, 2024
4ccc93a
Introduce persisted `NodeMetrics` struct
tnull Oct 3, 2024
66ca6be
Prefactor: Expose config objects via `config` module
tnull Oct 8, 2024
ad60e07
Prefactor: Move `ChannelConfig` to `config`
tnull Oct 8, 2024
94ff68f
Move Esplora-specific sync options to dedicated config
tnull Oct 8, 2024
26e61e8
Merge pull request #365 from tnull/2024-10-chain-source-refactor
tnull Oct 15, 2024
61673b1
Handle payment_store update failure in PaymentClaimable.
G8XSU Oct 14, 2024
7e93628
Handle payment_store update failure in PaymentFailed.
G8XSU Oct 14, 2024
07c34ef
Handle payment_store update failure in PaymentSent.
G8XSU Oct 14, 2024
bf74365
Handle event_queue push failure in PaymentClaimable.
G8XSU Oct 14, 2024
6eebd00
Handle event_queue push failure in PaymentClaimed.
G8XSU Oct 14, 2024
374dd60
Handle event_queue push failure in PaymentSent.
G8XSU Oct 14, 2024
8fa90f0
Handle event_queue push failure in PaymentFailed.
G8XSU Oct 14, 2024
b7beff0
Handle event_queue push failure in ChannelPending.
G8XSU Oct 14, 2024
8e6e935
Handle event_queue push failure in ChannelReady.
G8XSU Oct 14, 2024
7befec7
Handle event_queue push failure in ChannelClosed.
G8XSU Oct 14, 2024
5594560
Handle output tracking failure in SpendableOutputs.
G8XSU Oct 14, 2024
2c824ff
Retry more aggressively in VssStore.
G8XSU Oct 10, 2024
cffdf7e
Merge pull request #374 from G8XSU/replay-events
tnull Oct 16, 2024
0bec579
Implement `Listen` for `Wallet`
tnull Oct 9, 2024
c59d781
Add `ChainSource::BitcoindRpc` variant and basic client struct
tnull Oct 9, 2024
ab5a620
Add initial polling logic
tnull Oct 9, 2024
b756d79
Add comments clarifying that `syncing` methods shouldn't be used for RPC
tnull Oct 10, 2024
935a17e
Implement broadcast queue processing
tnull Oct 10, 2024
ce3606e
Implement fee rate estmation updating
tnull Oct 10, 2024
8e1dda1
Retrieve and apply unconfirmed transactions from the mempool
tnull Oct 14, 2024
6da0b98
Allow to configure bitcoind RPC in `Builder`
tnull Oct 10, 2024
e268b80
Only enforce successful fee rate cache updates on mainnet
tnull Oct 15, 2024
0a65272
Add `ChainSource` support to tests
tnull Oct 10, 2024
4a086c3
Drop flaky `connect_to_public_esplora` test
tnull Oct 16, 2024
f165c74
Relax `onchain_fee_buffer` in tests slightly
tnull Oct 14, 2024
7c629f2
Update README to reflect `bitcoind` RPC support
tnull Oct 15, 2024
af5d85a
Merge pull request #370 from tnull/2024-10-add-bitcoind-support
tnull Oct 16, 2024
ef9810c
Upgrade Uniffi version
tnull Oct 16, 2024
d0a14d2
Bump kotlin-android `compileSdk` to 34
tnull Oct 16, 2024
ca6c2fa
Merge pull request #368 from G8XSU/inc-retries
tnull Oct 16, 2024
137bfff
Merge pull request #379 from tnull/2024-10-upgrade-uniffi
tnull Oct 17, 2024
2646629
Enable using VssStore with VssHeaderProvider.
G8XSU Oct 10, 2024
ffea164
Default to LnUrlJWT auth for using VSS.
G8XSU Oct 16, 2024
cf91516
Add build_with_vss* methods for ArcedNodeBuilder.
G8XSU Oct 15, 2024
9ba95be
Merge pull request #369 from G8XSU/vss-lnauth
tnull Oct 17, 2024
0ae0fc1
Use KeyObfuscator in VssStore.
G8XSU Oct 15, 2024
5909063
Merge pull request #378 from G8XSU/vss-obfu
tnull Oct 17, 2024
b05d99b
Launch VSS, remove cfg flag for it.
G8XSU Oct 17, 2024
5bb4855
Expose build_with_vss_* methods in bindings.
G8XSU Oct 15, 2024
651f837
Merge pull request #376 from G8XSU/vss-bindings
tnull Oct 17, 2024
cfb8565
Bump version number to 0.4.0
tnull Oct 17, 2024
ff47a97
Update CHANGELOG for v0.4
tnull Oct 17, 2024
86b22ef
Update Swift files for v0.4.0
tnull Oct 17, 2024
db66cb9
Merge pull request #382 from tnull/2024-10-cut-0.4
tnull Oct 17, 2024
3ae579e
Update CHANGELOG.md
tnull Oct 17, 2024
3684f29
fix: incremental and full scans are performed correctly
tvolk131 Oct 18, 2024
a9e6fba
Merge pull request #383 from tvolk131/fix_incremental_scan_bug
tnull Oct 18, 2024
296f390
Bump version number to 0.4.1
jkczyz Oct 18, 2024
c571960
Update CHANGELOG for v0.4.1
jkczyz Oct 18, 2024
e031651
Merge pull request #384 from jkczyz/2024-10-release-0.4.1
tnull Oct 18, 2024
d4a2f2c
Merge tag 'v0.4.1'
rolznz Oct 22, 2024
ec26f06
Fix invalid witness program length
whfuyn Oct 23, 2024
bcea1c2
Merge pull request #387 from whfuyn/fix-invalid-witness-program-len
tnull Oct 28, 2024
3b5f00b
Add comments and debug assertions for `list_unspent_utxos`
tnull Oct 28, 2024
c228e7f
Update `CHANGELOG` for v0.4.2
tnull Oct 28, 2024
e177de5
Bump version number to v0.4.2
tnull Oct 28, 2024
8a7a591
Update Swift files for v0.4.2
tnull Oct 28, 2024
2156611
Merge pull request #391 from tnull/2024-10-cut-0.4.2
tnull Oct 28, 2024
b4dfcea
Merge tag 'v0.4.2' into feat/alby-ldk-0.4.1
rolznz Nov 2, 2024
9bd2cd4
chore: log sync start times
rolznz Nov 2, 2024
d8d0557
alby: always do full onchain sync
rolznz Nov 2, 2024
500df72
chore: update log copy
rolznz Nov 2, 2024
1b02d2b
fix: decrease BDK_CLIENT_STOP_GAP, re-enable incremental sync
rolznz Nov 4, 2024
0c70be7
fix: revert change to BDK_CLIENT_STOP_GAP
rolznz Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,34 @@ jobs:
cargo update -p proptest --precise "1.2.0" --verbose # proptest 1.3.0 requires rustc 1.64.0
cargo update -p regex --precise "1.9.6" --verbose # regex 1.10.0 requires rustc 1.65.0
cargo update -p home --precise "0.5.5" --verbose # home v0.5.9 requires rustc 1.70 or newer
cargo update -p url --precise "2.5.0" --verbose # url v2.5.1 requires rustc 1.67 or newer
cargo update -p tokio --precise "1.38.1" --verbose # tokio v1.39.0 requires rustc 1.70 or newer
cargo update -p tokio-util --precise "0.7.11" --verbose # tokio-util v0.7.12 requires rustc 1.70 or newer
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == 'stable'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- name: Download bitcoind/electrs and set environment variables
if: "matrix.platform != 'windows-latest'"
- name: Enable caching for bitcoind
id: cache-bitcoind
uses: actions/cache@v4
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
with:
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
key: electrs-${{ runner.os }}-${{ runner.arch }}
- name: Download bitcoind/electrs
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
cp "$BITCOIND_EXE" "$HOME"/bitcoind
cp "$ELECTRS_EXE" "$HOME"/electrs
echo "BITCOIND_EXE=$HOME/bitcoind" >> "$GITHUB_ENV"
echo "ELECTRS_EXE=$HOME/electrs" >> "$GITHUB_ENV"
mkdir 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
run: |
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/vss-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ jobs:
./gradlew --version
./gradlew build

docker cp app/build/libs/app-1.0.war tomcat:/usr/local/tomcat/webapps/vss.war
docker cp app/build/libs/vss-1.0.war tomcat:/usr/local/tomcat/webapps/vss.war
cd ../
- name: Run VSS Integration tests against vss-instance.
run: |
cd ldk-node
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
RUSTFLAGS="--cfg vss_test --cfg vss" cargo build --verbose --color always
RUSTFLAGS="--cfg vss_test --cfg vss" cargo test --test integration_tests_vss
RUSTFLAGS="--cfg vss_test" cargo build --verbose --color always
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss

- name: Cleanup
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
/bindings/uniffi-bindgen/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand All @@ -24,5 +25,7 @@ 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
/bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/

/ffi/
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
# 0.4.2 - Oct 28, 2024

This patch release fixes an issue that prohibited the node from using available confirmed on-chain funds to spend/bump Anchor outputs (#387).

In total, this release features 1 files changed, 40 insertions, 4 deletions in 3 commits from 3 authors, in alphabetical order:

- Fuyin
- Elias Rohrer


# 0.4.1 - Oct 18, 2024

This patch release fixes a wallet syncing issue where full syncs were used instead of incremental syncs, and vice versa (#383).

In total, this release features 3 files changed, 13 insertions, 9 deletions in 6 commits from 3 authors, in alphabetical order:

- Jeffrey Czyz
- Elias Rohrer
- Tommy Volk

# 0.4.0 - Oct 17, 2024

Besides numerous API improvements and bugfixes this fourth minor release notably adds support for sourcing chain and fee rate data from a Bitcoin Core RPC backend, as well as experimental support for the [VSS] remote storage backend.

## Feature and API updates
- Support for multiple chain sources has been added. To this end, Esplora-specific configuration options can now be given via `EsploraSyncConfig` to `Builder::set_chain_source_esplora`. Furthermore, all configuration objects (including the main `Config`) is now exposed via the `config` sub-module (#365).
- Support for sourcing chain and fee estimation data from a Bitcoin Core RPC backed has been added (#370).
- Initial experimental support for an encrypted [VSS] remote storage backend has been added (#369, #376, #378).
- **Caution**: VSS support is in **alpha** and is considered experimental. Using VSS (or any remote persistence) may cause LDK to panic if persistence failures are unrecoverable, i.e., if they remain unresolved after internal retries are exhausted.
- Support for setting the `NodeAlias` in public node announcements as been added. We now ensure that announced channels can only be opened and accepted when the required configuration options to operate as a public forwarding node are set (listening addresses and node alias). As part of this `Node::connect_open_channel` was split into `open_channel` and `open_announced_channel` API methods. (#330, #366).
- The `Node` can now be started via a new `Node::start_with_runtime` call that allows to reuse an outer `tokio` runtime context, avoiding runtime stacking when run in `async` environments (#319).
- Support for generating and paying unified QR codes has been added (#302).
- Support for `quantity` and `payer_note` fields when sending or receiving BOLT12 payments has been added (#327).
- Support for setting additional parameters when sending BOLT11 payments has been added (#336, #351).

## Bug Fixes
- The `ChannelConfig` object has been refactored, now allowing to query the currently applied `MaxDustHTLCExposure` limit (#350).
- A bug potentially leading to panicking on shutdown when stacking `tokio` runtime contexts has been fixed (#373).
- We now no longer panic when hitting a persistence failure during event handling. Instead, events will be replayed until successful (#374).
,
## Compatibility Notes
- The LDK dependency has been updated to version 0.0.125 (#358, #375).
- The BDK dependency has been updated to version 1.0-beta.4 (#358).
- Going forward, the BDK state will be persisted in the configured `KVStore` backend.
- **Note**: The old descriptor state will *not* be automatically migrated on upgrade, potentially leading to address reuse. Privacy-concious users might want to manually advance the descriptor by requesting new addresses until it reaches the previously observed height.
- After the node as been successfully upgraded users may safely delete `bdk_wallet_*.sqlite` from the storage path.
- The `rust-bitcoin` dependency has been updated to version 0.32.2 (#358).
- The UniFFI dependency has been updated to version 0.27.3 (#379).
- The `bip21` dependency has been updated to version 0.5 (#358).
- The `rust-esplora-client` has been updated to version 0.9 (#358).

In total, this release features 55 files changed, 6134 insertions, 2184 deletions in 166 commits from 6 authors, in alphabetical order:

- G8XSU
- Ian Slane
- jbesraa
- Elias Rohrer
- elnosh
- Enigbe Ochekliye

[VSS]: https://github.com/lightningdevkit/vss-server/blob/main/README.md

# 0.3.0 - June 21, 2024

This third minor release notably adds support for BOLT12 payments, Anchor
Expand Down
83 changes: 60 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ldk-node"
version = "0.3.0"
version = "0.4.2"
authors = ["Elias Rohrer <dev@tnull.de>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -28,51 +28,78 @@ panic = 'abort' # Abort on panic
default = []

[dependencies]
lightning = { version = "0.0.123", features = ["std"] }
lightning-invoice = { version = "0.31.0" }
lightning-net-tokio = { version = "0.0.123" }
lightning-persister = { version = "0.0.123" }
lightning-background-processor = { version = "0.0.123", features = ["futures"] }
lightning-rapid-gossip-sync = { version = "0.0.123" }
lightning-transaction-sync = { version = "0.0.123", features = ["esplora-async-https", "time"] }
lightning-liquidity = { version = "=0.1.0-alpha.4", features = ["std"] }

lightning = { version = "0.0.125", features = ["std"] }
lightning-invoice = { version = "0.32.0" }
lightning-net-tokio = { version = "0.0.125" }
lightning-persister = { version = "0.0.125" }
lightning-background-processor = { version = "0.0.125", features = ["futures"] }
lightning-rapid-gossip-sync = { version = "0.0.125" }
lightning-block-sync = { version = "0.0.125", features = ["rpc-client", "tokio"] }
lightning-transaction-sync = { version = "0.0.125", features = ["esplora-async-https", "time"] }
lightning-liquidity = { version = "0.1.0-alpha.6", features = ["std"] }

#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["std"] }
#lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
#lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
#lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
#lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["futures"] }
#lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
#lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["esplora-async"] }
#lightning-liquidity = { git = "https://github.com/lightningdevkit/lightning-liquidity", branch="main", features = ["std"] }

#lightning = { path = "../rust-lightning/lightning", features = ["std"] }
#lightning-invoice = { path = "../rust-lightning/lightning-invoice" }
#lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
#lightning-persister = { path = "../rust-lightning/lightning-persister" }
#lightning-background-processor = { path = "../rust-lightning/lightning-background-processor", features = ["futures"] }
#lightning-rapid-gossip-sync = { path = "../rust-lightning/lightning-rapid-gossip-sync" }
#lightning-transaction-sync = { path = "../rust-lightning/lightning-transaction-sync", features = ["esplora-async"] }
#lightning-liquidity = { path = "../lightning-liquidity", features = ["std"] }

bdk_chain = { version = "=0.19.0", default-features = false, features = ["std"] }
bdk_esplora = { version = "=0.18.0", default-features = false, features = ["async-https-rustls"]}
bdk_wallet = { version = "=1.0.0-beta.4", default-features = false, features = ["std", "keys-bip39"]}

# TODO: re-enable
# Alby uses forked BDK version with CACHE_ADDR_BATCH_SIZE=1 to reduce unnecessary esplora calls and speed up wallet sync
bdk = { git = "https://github.com/getAlby/bdk.git", branch = "0.29-alby-v2", default-features = false, features = ["std", "async-interface", "use-esplora-async", "sqlite-bundled", "keys-bip39"]}
#bdk = { version = "0.29.0", default-features = false, features = ["std", "async-interface", "use-esplora-async", "sqlite-bundled", "keys-bip39"]}
#bdk = { git = "https://github.com/getAlby/bdk.git", branch = "0.29-alby-v2", default-features = false, features = ["std", "async-interface", "use-esplora-async", "sqlite-bundled", "keys-bip39"]}


reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
rusqlite = { version = "0.28.0", features = ["bundled"] }
bitcoin = "0.30.2"
bitcoin = "0.32.2"
bip39 = "2.0.0"
bip21 = { version = "0.5", features = ["std"], default-features = false }

base64 = { version = "0.22.1", default-features = false, features = ["std"] }
rand = "0.8.5"
chrono = { version = "0.4", default-features = false, features = ["clock"] }
tokio = { version = "1.37", default-features = false, features = [ "rt-multi-thread", "time", "sync" ] }
esplora-client = { version = "0.6", default-features = false }
tokio = { version = "1.37", default-features = false, features = [ "rt-multi-thread", "time", "sync", "macros" ] }
esplora-client = { version = "0.9", default-features = false }
libc = "0.2"
uniffi = { version = "0.25.3", features = ["build"], optional = true }
serde = { version = "1.0.210", default-features = false, features = ["std", "derive"] }
serde_json = { version = "1.0.128", default-features = false, features = ["std"] }

[target.'cfg(vss)'.dependencies]
vss-client = "0.2"
vss-client = "0.3"
prost = { version = "0.11.6", default-features = false}

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["winbase"] }

[dev-dependencies]
lightning = { version = "0.0.123", features = ["std", "_test_utils"] }
#lightning = { git = "https://github.com/tnull/rust-lightning", branch = "2024-03-invoice-generated-event", features = ["std", "_test_utils"] }
electrum-client = { version = "0.15.1", default-features = true }
bitcoincore-rpc = { version = "0.17.0", default-features = false }
lightning = { version = "0.0.125", features = ["std", "_test_utils"] }
#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["std", "_test_utils"] }
electrum-client = { version = "0.21.0", default-features = true }
bitcoincore-rpc = { version = "0.19.0", default-features = false }
proptest = "1.0.0"
regex = "1.5.6"

[target.'cfg(not(no_download))'.dev-dependencies]
electrsd = { version = "0.26.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_25_0"] }
electrsd = { version = "0.29.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_25_0"] }

[target.'cfg(no_download)'.dev-dependencies]
electrsd = { version = "0.26.0", features = ["legacy"] }
electrsd = { version = "0.29.0", features = ["legacy"] }

[target.'cfg(cln_test)'.dev-dependencies]
clightningrpc = { version = "0.3.0-beta.8", default-features = false }
Expand All @@ -87,3 +114,13 @@ rpath = true

[profile.dev]
panic = "abort"

[lints.rust.unexpected_cfgs]
level = "forbid"
# When adding a new cfg attribute, ensure that it is added to this list.
check-cfg = [
"cfg(vss_test)",
"cfg(ldk_bench)",
"cfg(tokio_unstable)",
"cfg(cln_test)",
]
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.3.0"
let checksum = "07c8741768956bf1a51d1c25f751b5e29d1ae9ee2fd786c4282031c9a8a92f0c"
let tag = "v0.4.2"
let checksum = "95ea5307eb3a99203e39cfa21d962bfe3e879e62429e8c7cdf5292cae5dc35cc"
let url = "https://github.com/lightningdevkit/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A ready-to-go Lightning node library built using [LDK][ldk] and [BDK][bdk].
LDK Node is a self-custodial Lightning node in library form. Its central goal is to provide a small, simple, and straightforward interface that enables users to easily set up and run a Lightning node with an integrated on-chain wallet. While minimalism is at its core, LDK Node aims to be sufficiently modular and configurable to be useful for a variety of use cases.

## Getting Started
The primary abstraction of the library is the [`Node`][api_docs_node], which can be retrieved by setting up and configuring a [`Builder`][api_docs_builder] to your liking and calling one of the `build` methods. `Node` can then be controlled via commands such as `start`, `stop`, `connect_open_channel`, `send`, etc.
The primary abstraction of the library is the [`Node`][api_docs_node], which can be retrieved by setting up and configuring a [`Builder`][api_docs_builder] to your liking and calling one of the `build` methods. `Node` can then be controlled via commands such as `start`, `stop`, `open_channel`, `send`, etc.

```rust
use ldk_node::Builder;
Expand All @@ -24,7 +24,7 @@ use std::str::FromStr;
fn main() {
let mut builder = Builder::new();
builder.set_network(Network::Testnet);
builder.set_esplora_server("https://blockstream.info/testnet/api".to_string());
builder.set_chain_source_esplora("https://blockstream.info/testnet/api".to_string(), None);
builder.set_gossip_source_rgs("https://rapidsync.lightningdevkit.org/testnet/snapshot".to_string());

let node = builder.build().unwrap();
Expand All @@ -37,7 +37,7 @@ fn main() {

let node_id = PublicKey::from_str("NODE_ID").unwrap();
let node_addr = SocketAddress::from_str("IP_ADDR:PORT").unwrap();
node.connect_open_channel(node_id, node_addr, 10000, None, None, false).unwrap();
node.open_channel(node_id, node_addr, 10000, None, None).unwrap();

let event = node.wait_next_event();
println!("EVENT: {:?}", event);
Expand All @@ -55,7 +55,7 @@ fn main() {
LDK Node currently comes with a decidedly opinionated set of design choices:

- On-chain data is handled by the integrated [BDK][bdk] wallet.
- Chain data may currently be sourced from an [Esplora][esplora] server, while support for Electrum and `bitcoind` RPC will follow soon.
- Chain data may currently be sourced from the Bitcoin Core RPC interface or an [Esplora][esplora] server, while support for Electrum will follow soon.
- Wallet and channel state may be persisted to an [SQLite][sqlite] database, to file system, or to a custom back-end to be implemented by the user.
- Gossip data may be sourced via Lightning's peer-to-peer network or the [Rapid Gossip Sync](https://docs.rs/lightning-rapid-gossip-sync/*/lightning_rapid_gossip_sync/) protocol.
- Entropy for the Lightning and on-chain wallets may be sourced from raw bytes or a [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) mnemonic. In addition, LDK Node offers the means to generate and persist the entropy bytes to disk.
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
libraryVersion=0.3.0
libraryVersion=0.4.2
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repositories {
}

android {
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-jvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
libraryVersion=0.3.0
libraryVersion=0.4.2
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ class LibraryTest {
println("Config 2: $config2")

val builder1 = Builder.fromConfig(config1)
builder1.setEsploraServer(esploraEndpoint)
builder1.setChainSourceEsplora(esploraEndpoint, null)
val builder2 = Builder.fromConfig(config2)
builder2.setEsploraServer(esploraEndpoint)
builder2.setChainSourceEsplora(esploraEndpoint, null)

val node1 = builder1.build()
val node2 = builder2.build()
Expand Down Expand Up @@ -175,7 +175,7 @@ class LibraryTest {
assertEquals(100000uL, totalBalance1)
assertEquals(100000uL, totalBalance2)

node1.connectOpenChannel(nodeId2, listenAddress2, 50000u, null, null, true)
node1.openChannel(nodeId2, listenAddress2, 50000u, null, null)

val channelPendingEvent1 = node1.waitNextEvent()
println("Got event: $channelPendingEvent1")
Expand Down Expand Up @@ -224,7 +224,7 @@ class LibraryTest {

val invoice = node2.bolt11Payment().receive(2500000u, "asdf", 9217u)

node1.bolt11Payment().send(invoice)
node1.bolt11Payment().send(invoice, null)

val paymentSuccessfulEvent = node1.waitNextEvent()
println("Got event: $paymentSuccessfulEvent")
Expand Down
Loading
Loading