Skip to content

Commit 6de8c4f

Browse files
committed
Merge tag 'v0.0.115' into 89b585b
0.0.115 - Apr 24, 2023 - "Rebroadcast the Bugfixes" API Updates =========== * The MSRV of the main LDK crates has been increased to 1.48 (lightningdevkit#2107). * Attempting to claim an un-expired payment on a channel which has closed no longer fails. The expiry time of payments is exposed via `PaymentClaimable::claim_deadline` (lightningdevkit#2148). * `payment_metadata` is now supported in `Invoice` deserialization, sending, and receiving (via a new `RecipientOnionFields` struct) (lightningdevkit#2139, lightningdevkit#2127). * `Event::PaymentFailed` now exposes a failure reason (lightningdevkit#2142). * BOLT12 messages now support stateless generation and validation (lightningdevkit#1989). * The `NetworkGraph` is now pruned of stale data after RGS processing (lightningdevkit#2161). * Max inbound HTLCs in-flight can be changed in the handshake config (lightningdevkit#2138). * `lightning-transaction-sync` feature `esplora-async-https` was added (lightningdevkit#2085). * A `ChannelPending` event is now emitted after the initial handshake (lightningdevkit#2098). * `PaymentForwarded::outbound_amount_forwarded_msat` was added (lightningdevkit#2136). * `ChannelManager::list_channels_by_counterparty` was added (lightningdevkit#2079). * `ChannelDetails::feerate_sat_per_1000_weight` was added (lightningdevkit#2094). * `Invoice::fallback_addresses` was added to fetch `bitcoin` types (lightningdevkit#2023). * The offer/refund description is now exposed in `Invoice{,Request}` (lightningdevkit#2206). Backwards Compatibility ======================= * Payments sent with the legacy `*_with_route` methods on LDK 0.0.115+ will no longer be retryable via the LDK 0.0.114- `retry_payment` method (lightningdevkit#2139). * `Event::PaymentPathFailed::retry` was removed and will always be `None` for payments initiated on 0.0.115 which fail on an earlier version (lightningdevkit#2063). * `Route`s and `PaymentParameters` with blinded path information will not be readable on prior versions of LDK. Such objects are not currently constructed by LDK, but may be when processing BOLT12 data in a coming release (lightningdevkit#2146). * Providing `ChannelMonitorUpdate`s generated by LDK 0.0.115 to a `ChannelMonitor` on 0.0.114 or before may panic (lightningdevkit#2059). Note that this is in general unsupported, and included here only for completeness. Bug Fixes ========= * Fixed a case where `process_events_async` may `poll` a `Future` which has already completed (lightningdevkit#2081). * Fixed deserialization of `u16` arrays. This bug may have previously corrupted the historical buckets in a `ProbabilisticScorer`. Users relying on the historical buckets may wish to wipe their scorer on upgrade to remove corrupt data rather than waiting on it to decay (lightningdevkit#2191). * The `process_events_async` task is now `Send` and can thus be polled on a multi-threaded runtime (lightningdevkit#2199). * Fixed a missing macro export causing `impl_writeable_tlv_based_enum{,_upgradable}` calls to not compile (lightningdevkit#2091). * Fixed compilation of `lightning-invoice` with both `no-std` and serde (lightningdevkit#2187) * Fix an issue where the `background-processor` would not wake when a `ChannelMonitorUpdate` completed asynchronously, causing delays (lightningdevkit#2090). * Fix an issue where `process_events_async` would exit immediately (lightningdevkit#2145). * `Router` calls from the `ChannelManager` now call `find_route_with_id` rather than `find_route`, as was intended and described in the API (lightningdevkit#2092). * Ensure `process_events_async` always exits if any sleep future returns true, not just if all sleep futures repeatedly return true (lightningdevkit#2145). * `channel_update` messages no longer set the disable bit unless the peer has been disconnected for some time. This should resolve cases where channels are disabled for extended periods of time (lightningdevkit#2198). * We no longer remove CLN nodes from the network graph for violating the BOLT spec in some cases after failing to pay through them (lightningdevkit#2220). * Fixed a debug assertion which may panic under heavy load (lightningdevkit#2172). * `CounterpartyForceClosed::peer_msg` is now wrapped in UntrustedString (lightningdevkit#2114) * Fixed a potential deadlock in `funding_transaction_generated` (lightningdevkit#2158). Security ======== * Transaction re-broadcasting is now substantially more aggressive, including a new regular rebroadcast feature called on a timer from the `background-processor` or from `ChainMonitor::rebroadcast_pending_claims`. This should substantially increase transaction confirmation reliability without relying on downstream `TransactionBroadcaster` implementations for rebroadcasting (lightningdevkit#2203, lightningdevkit#2205, lightningdevkit#2208). * Implemented the changes from BOLT PRs lightningdevkit#1031, lightningdevkit#1032, and lightningdevkit#1040 which resolve a privacy vulnerability which allows an intermediate node on the path to discover the final destination for a payment (lightningdevkit#2062). In total, this release features 110 files changed, 11928 insertions, 6368 deletions in 215 commits from 21 authors, in alphabetical order: * Advait * Alan Cohen * Alec Chen * Allan Douglas R. de Oliveira * Arik Sosman * Elias Rohrer * Evan Feenstra * Jeffrey Czyz * John Cantrell * Lucas Soriano del Pino * Marc Tyndel * Matt Corallo * Paul Miller * Steven * Steven Williamson * Steven Zhao * Tony Giorgio * Valentine Wallace * Wilmer Paulino * benthecarman * munjesi
2 parents cd48372 + b734735 commit 6de8c4f

File tree

106 files changed

+10291
-4650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+10291
-4650
lines changed

.github/workflows/build.yml

+44-203
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,37 @@
11
name: Continuous Integration Checks
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
pull_request:
8+
branches-ignore:
9+
- master
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
414

515
jobs:
616
build:
717
strategy:
818
fail-fast: false
919
matrix:
10-
platform: [ ubuntu-latest ]
11-
toolchain: [ stable,
12-
beta,
13-
# 1.41.1 is MSRV for Rust-Lightning, lightning-invoice, and lightning-persister
14-
1.41.1,
15-
# 1.45.2 is MSRV for lightning-net-tokio, lightning-block-sync, lightning-background-processor
16-
1.45.2,
17-
# 1.47.0 will be the MSRV for no-std builds using hashbrown once core2 is updated
18-
1.47.0]
20+
platform: [ ubuntu-latest, windows-latest, macos-latest ]
21+
toolchain: [ stable, beta ]
1922
include:
2023
- toolchain: stable
21-
build-net-tokio: true
22-
build-no-std: true
23-
build-futures: true
24-
build-tx-sync: true
24+
platform: ubuntu-latest
2525
coverage: true
26-
- toolchain: stable
27-
platform: macos-latest
28-
build-net-tokio: true
29-
build-no-std: true
30-
build-futures: true
31-
build-tx-sync: true
32-
- toolchain: stable
33-
test-custom-message: true
34-
- toolchain: beta
35-
platform: macos-latest
36-
build-net-tokio: true
37-
build-no-std: true
38-
build-futures: true
39-
build-tx-sync: true
40-
- toolchain: stable
26+
# 1.48.0 is the MSRV for all crates except lightning-transaction-sync and Win/Mac
27+
- toolchain: 1.48.0
28+
platform: ubuntu-latest
29+
# Windows requires 1.49.0 because that's the MSRV for supported Tokio
30+
- toolchain: 1.49.0
4131
platform: windows-latest
42-
build-net-tokio: true
43-
build-no-std: true
44-
build-futures: true
45-
build-tx-sync: false
46-
- toolchain: beta
47-
platform: windows-latest
48-
build-net-tokio: true
49-
build-no-std: true
50-
build-futures: true
51-
build-tx-sync: false
52-
- toolchain: beta
53-
build-net-tokio: true
54-
build-no-std: true
55-
build-futures: true
56-
build-tx-sync: true
57-
- toolchain: beta
58-
test-custom-message: true
59-
- toolchain: 1.41.1
60-
build-no-std: false
61-
test-log-variants: true
62-
build-futures: false
63-
build-tx-sync: false
64-
- toolchain: 1.45.2
65-
build-net-old-tokio: true
66-
build-net-tokio: true
67-
build-no-std: false
68-
build-futures: true
69-
build-tx-sync: false
70-
- toolchain: 1.47.0
71-
build-futures: true
72-
build-no-std: true
73-
build-tx-sync: false
32+
# MacOS-latest requires 1.54.0 because that's what's required for linking to work properly
33+
- toolchain: 1.54.0
34+
platform: macos-latest
7435
runs-on: ${{ matrix.platform }}
7536
steps:
7637
- name: Checkout source code
@@ -81,154 +42,24 @@ jobs:
8142
toolchain: ${{ matrix.toolchain }}
8243
override: true
8344
profile: minimal
84-
- name: Pin tokio to 1.14 for Rust 1.45
85-
if: "matrix.build-net-old-tokio"
86-
run: cargo update -p tokio --precise "1.14.0" --verbose
87-
env:
88-
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
89-
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio
90-
if: "matrix.build-net-tokio && !matrix.coverage"
91-
run: cargo build --verbose --color always
92-
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio, and full code-linking for coverage generation
93-
if: matrix.coverage
94-
run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always
95-
- name: Build on Rust ${{ matrix.toolchain }}
96-
if: "! matrix.build-net-tokio"
97-
run: |
98-
cargo build --verbose --color always -p lightning
99-
cargo build --verbose --color always -p lightning-invoice
100-
cargo build --verbose --color always -p lightning-persister
101-
- name: Build on Rust ${{ matrix.toolchain }} with all Log-Limiting features
102-
if: matrix.test-log-variants
103-
run: |
104-
cd lightning
105-
for FEATURE in $(cat Cargo.toml | grep '^max_level_' | awk '{ print $1 }'); do
106-
cargo build --verbose --color always --features $FEATURE
107-
done
108-
- name: Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features
109-
if: "matrix.build-net-tokio && !matrix.coverage"
110-
run: |
111-
cd lightning-block-sync
112-
cargo build --verbose --color always --features rest-client
113-
cargo build --verbose --color always --features rpc-client
114-
cargo build --verbose --color always --features rpc-client,rest-client
115-
cargo build --verbose --color always --features rpc-client,rest-client,tokio
116-
- name: Build Block Sync Clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
117-
if: matrix.coverage
118-
run: |
119-
cd lightning-block-sync
120-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rest-client
121-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client
122-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client
123-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features rpc-client,rest-client,tokio
124-
- name: Build Transaction Sync Clients on Rust ${{ matrix.toolchain }} with features
125-
if: "matrix.build-tx-sync && !matrix.coverage"
126-
run: |
127-
cd lightning-transaction-sync
128-
cargo build --verbose --color always --features esplora-blocking
129-
cargo build --verbose --color always --features esplora-async
130-
- name: Build transaction sync clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
131-
if: "matrix.build-tx-sync && matrix.coverage"
132-
run: |
133-
cd lightning-transaction-sync
134-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-blocking
135-
RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always --features esplora-async
136-
- name: Test transaction sync clients on Rust ${{ matrix.toolchain }} with features
137-
if: "matrix.build-tx-sync"
138-
run: |
139-
cd lightning-transaction-sync
140-
cargo test --verbose --color always --features esplora-blocking
141-
cargo test --verbose --color always --features esplora-async
142-
- name: Test backtrace-debug builds on Rust ${{ matrix.toolchain }}
143-
if: "matrix.toolchain == 'stable'"
144-
shell: bash # Default on Winblows is powershell
45+
- name: Install no-std-check dependencies for ARM Embedded
46+
if: "matrix.platform == 'ubuntu-latest'"
14547
run: |
146-
cd lightning && RUST_BACKTRACE=1 cargo test --verbose --color always --features backtrace
147-
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio
148-
if: "matrix.build-net-tokio && !matrix.coverage"
149-
run: cargo test --verbose --color always
150-
- name: Test on Rust ${{ matrix.toolchain }} with net-tokio, and full code-linking for coverage generation
151-
if: matrix.coverage
152-
run: RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always
153-
- name: Test no-std builds on Rust ${{ matrix.toolchain }}
154-
if: "matrix.build-no-std && !matrix.coverage"
155-
shell: bash # Default on Winblows is powershell
156-
run: |
157-
for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
158-
cd $DIR
159-
cargo test --verbose --color always --no-default-features --features no-std
160-
# check if there is a conflict between no-std and the default std feature
161-
cargo test --verbose --color always --features no-std
162-
# check that things still pass without grind_signatures
163-
# note that outbound_commitment_test only runs in this mode, because of hardcoded signature values
164-
cargo test --verbose --color always --no-default-features --features std
165-
# check if there is a conflict between no-std and the c_bindings cfg
166-
RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
167-
cd ..
168-
done
169-
# check no-std compatibility across dependencies
170-
cd no-std-check
171-
cargo check --verbose --color always --features lightning-transaction-sync
172-
- name: Build no-std-check on Rust ${{ matrix.toolchain }} for ARM Embedded
173-
if: "matrix.build-no-std && matrix.platform == 'ubuntu-latest'"
174-
run: |
175-
cd no-std-check
17648
rustup target add thumbv7m-none-eabi
17749
sudo apt-get -y install gcc-arm-none-eabi
178-
cargo build --target=thumbv7m-none-eabi
179-
- name: Test on no-std builds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
180-
if: "matrix.build-no-std && matrix.coverage"
50+
- name: shellcheck the CI script
51+
if: "matrix.platform == 'ubuntu-latest'"
18152
run: |
182-
cd lightning
183-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features no-std
184-
- name: Test futures builds on Rust ${{ matrix.toolchain }}
185-
if: "matrix.build-futures && !matrix.coverage"
53+
sudo apt-get -y install shellcheck
54+
shellcheck ci/ci-tests.sh
55+
- name: Run CI script with coverage generation
56+
if: matrix.coverage
18657
shell: bash # Default on Winblows is powershell
187-
run: |
188-
cd lightning-background-processor
189-
cargo test --verbose --color always --no-default-features --features futures
190-
- name: Test futures builds on Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
191-
if: "matrix.build-futures && matrix.coverage"
58+
run: LDK_COVERAGE_BUILD=true ./ci/ci-tests.sh
59+
- name: Run CI script
60+
if: "!matrix.coverage"
19261
shell: bash # Default on Winblows is powershell
193-
run: |
194-
cd lightning-background-processor
195-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --no-default-features --features futures
196-
- name: Test on Rust ${{ matrix.toolchain }}
197-
if: "! matrix.build-net-tokio"
198-
run: |
199-
cargo test --verbose --color always -p lightning
200-
cargo test --verbose --color always -p lightning-invoice
201-
cargo test --verbose --color always -p lightning-rapid-gossip-sync
202-
cargo test --verbose --color always -p lightning-persister
203-
cargo test --verbose --color always -p lightning-background-processor
204-
- name: Test C Bindings Modifications on Rust ${{ matrix.toolchain }}
205-
if: "! matrix.build-net-tokio"
206-
run: |
207-
RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always -p lightning
208-
RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always -p lightning-invoice
209-
RUSTFLAGS="--cfg=c_bindings" cargo build --verbose --color always -p lightning-persister
210-
RUSTFLAGS="--cfg=c_bindings" cargo build --verbose --color always -p lightning-background-processor
211-
- name: Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features
212-
if: "matrix.build-net-tokio && !matrix.coverage"
213-
run: |
214-
cd lightning-block-sync
215-
cargo test --verbose --color always --features rest-client
216-
cargo test --verbose --color always --features rpc-client
217-
cargo test --verbose --color always --features rpc-client,rest-client
218-
cargo test --verbose --color always --features rpc-client,rest-client,tokio
219-
- name: Test Block Sync Clients on Rust ${{ matrix.toolchain }} with features and full code-linking for coverage generation
220-
if: matrix.coverage
221-
run: |
222-
cd lightning-block-sync
223-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rest-client
224-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client
225-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client
226-
RUSTFLAGS="-C link-dead-code" cargo test --verbose --color always --features rpc-client,rest-client,tokio
227-
- name: Test Custom Message Macros on Rust ${{ matrix.toolchain }}
228-
if: "matrix.test-custom-message"
229-
run: |
230-
cd lightning-custom-message
231-
cargo test --verbose --color always
62+
run: ./ci/ci-tests.sh
23263
- name: Install deps for kcov
23364
if: matrix.coverage
23465
run: |
@@ -358,6 +189,16 @@ jobs:
358189
cargo check --no-default-features --features=no-std --release
359190
cargo check --no-default-features --features=futures --release
360191
cargo doc --release
192+
RUSTDOCFLAGS="--cfg=anchors" cargo doc --release
193+
- name: Run cargo check for Taproot build.
194+
run: |
195+
cargo check --release
196+
cargo check --no-default-features --features=no-std --release
197+
cargo check --no-default-features --features=futures --release
198+
cargo doc --release
199+
env:
200+
RUSTFLAGS: '--cfg=anchors --cfg=taproot'
201+
RUSTDOCFLAGS: '--cfg=anchors --cfg=taproot'
361202

362203
fuzz:
363204
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)