Skip to content

Commit 2a8a396

Browse files
authored
Merge pull request #1217 from TheBlueMatt/2021-12-0.0.104
Cut 0.0.104
2 parents 1c157a2 + 27d5c7a commit 2a8a396

File tree

9 files changed

+126
-22
lines changed

9 files changed

+126
-22
lines changed

CHANGELOG.md

+104
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,107 @@
1+
# 0.0.104 - 2021-12-17
2+
3+
## API Updates
4+
* A `PaymentFailed` event is now provided to indicate a payment has failed
5+
fully. This event is generated either after
6+
`ChannelManager::abandon_payment` is called for a given payment, or the
7+
payment times out, and there are no further pending HTLCs for the payment.
8+
This event should be used to detect payment failure instead of
9+
`PaymentPathFailed::all_paths_failed`, unless no payment retries occur via
10+
`ChannelManager::retry_payment` (#1202).
11+
* Payment secrets are now generated deterministically using material from
12+
the new `KeysInterface::get_inbound_payment_key_material` (#1177).
13+
* A `PaymentPathSuccessful` event has been added to ease passing success info
14+
to a scorer, along with a `Score::payment_path_successful` method to accept
15+
such info (#1178, #1197).
16+
* `Score::channel_penalty_msat` has additional arguments describing the
17+
channel's capacity and the HTLC amount being sent over the channel (#1166).
18+
* A new log level `Gossip` has been added, which is used for verbose
19+
information generated during network graph sync. Enabling the
20+
`max_level_trace` feature or ignoring `Gossip` log entries reduces log
21+
growth during initial start up from many GiB to several MiB (#1145).
22+
* The `allow_wallclock_use` feature has been removed in favor of only using
23+
the `std` and `no-std` features (#1212).
24+
* `NetworkGraph` can now remove channels that we haven't heard updates for in
25+
two weeks with `NetworkGraph::remove_stale_channels{,with_time}`. The first
26+
is called automatically if a `NetGraphMsgHandler` is passed to
27+
`BackgroundProcessor::start` (#1212).
28+
* `InvoicePayer::pay_pubkey` was added to enable sending "keysend" payments to
29+
supported recipients, using the `InvoicePayer` to handle retires (#1160).
30+
* `user_payment_id` has been removed from `PaymentPurpose`, and
31+
`ChannelManager::create_inbound_payment{,_for_hash}` (#1180).
32+
* Updated documentation for several `ChannelManager` functions to remove stale
33+
references to panics which no longer occur (#1201).
34+
* The `Score` and `LockableScore` objects have moved into the
35+
`routing::scoring` module instead of being in the `routing` module (#1166).
36+
* The `Time` parameter to `ScorerWithTime` is no longer longer exposed,
37+
instead being fixed based on the `std`/`no-std` feature (#1184).
38+
* `ChannelDetails::balance_msat` was added to fetch a channel's balance
39+
without subtracting the reserve values, lining up with on-chain claim amounts
40+
less on-chain fees (#1203).
41+
* An explicit `UserConfig::accept_inbound_channels` flag is now provided,
42+
removing the need to set `min_funding_satoshis` to > 21 million BTC (#1173).
43+
* Inbound channels that fail to see the funding transaction confirm within
44+
2016 blocks are automatically force-closed with
45+
`ClosureReason::FundingTimedOut` (#1083).
46+
* We now accept a channel_reserve value of 0 from counterparties, as it is
47+
insecure for our counterparty but not us (#1163).
48+
* `NetAddress::OnionV2` parsing was removed as version 2 onion services are no
49+
longer supported in modern Tor (#1204).
50+
* Generation and signing of anchor outputs is now supported in the
51+
`KeysInterface`, though no support for them exists in the channel itself (#1176)
52+
53+
## Bug Fixes
54+
* Fixed a race condition in `InvoicePayer` where paths may be retried after
55+
the retry count has been exceeded. In this case the
56+
`Event::PaymentPathFailed::all_paths_failed` field is not a reliable payment
57+
failure indicator. There was no acceptable alternative indicator,
58+
`Event::PaymentFailed` as been added to provide one (#1202).
59+
* Reduced the blocks-before-timeout we expect of outgoing HTLCs before
60+
refusing to forward. This check was overly strict and resulted in refusing
61+
to forward som HTLCs to a next hop that had a lower security threshold than
62+
us (#1119).
63+
* LDK no longer attempt to update the channel fee for outbound channels when
64+
we cannot afford the new fee. This could have caused force-closure by our
65+
channel counterparty (#1054).
66+
* Fixed several bugs which may have prevented the reliable broadcast of our
67+
own channel announcements and updates (#1169).
68+
* Fixed a rare bug which may have resulted in spurious route finding failures
69+
when using last-hop hints and MPP with large value payments (#1168).
70+
* `KeysManager::spend_spendable_outputs` no longer adds a change output that
71+
is below the dust threshold for non-standard change scripts (#1131).
72+
* Fixed a minor memory leak when attempting to send a payment that fails due
73+
to an error when updating the `ChannelMonitor` (#1143).
74+
* Fixed a bug where a `FeeEstimator` that returns values rounded to the next
75+
sat/vbyte may result in force-closures (#1208).
76+
* Handle MPP timeout HTLC error codes, instead of considering the recipient to
77+
have sent an invalid error, removing them from the network graph (#1148)
78+
79+
## Serialization Compatibility
80+
* All above new events/fields are ignored by prior clients. All above new
81+
events/fields are not present when reading objects serialized by prior
82+
versions of the library.
83+
* Payment secrets are now generated deterministically. This reduces the memory
84+
footprint for inbound payments, however, newly-generated inbound payments
85+
using `ChannelManager::create_inbound_payment{,_for_hash}` will not be
86+
receivable using versions prior to 0.0.104.
87+
`ChannelManager::create_inbound_payment{,_for_hash}_legacy` are provided for
88+
backwards compatibility (#1177).
89+
* `PaymentPurpose::InvoicePayment::user_payment_id` will be 0 when reading
90+
objects written with 0.0.104 when read by 0.0.103 and previous (#1180).
91+
92+
In total, this release features 51 files changed, 5356 insertions, 2238
93+
deletions in 107 commits from 9 authors, in alphabetical order:
94+
* Antoine Riard
95+
* Conor Okus
96+
* Devrandom
97+
* Duncan Dean
98+
* Elias Rohrer
99+
* Jeffrey Czyz
100+
* Ken Sedgwick
101+
* Matt Corallo
102+
* Valentine Wallace
103+
104+
1105
# 0.0.103 - 2021-11-02
2106

3107
## API Updates
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-background-processor"
3-
version = "0.0.103"
3+
version = "0.0.104"
44
authors = ["Valentine Wallace <[email protected]>"]
55
license = "MIT OR Apache-2.0"
66
repository = "http://github.com/rust-bitcoin/rust-lightning"
@@ -11,9 +11,9 @@ edition = "2018"
1111

1212
[dependencies]
1313
bitcoin = "0.27"
14-
lightning = { version = "0.0.103", path = "../lightning", features = ["std"] }
15-
lightning-persister = { version = "0.0.103", path = "../lightning-persister" }
14+
lightning = { version = "0.0.104", path = "../lightning", features = ["std"] }
15+
lightning-persister = { version = "0.0.104", path = "../lightning-persister" }
1616

1717
[dev-dependencies]
18-
lightning = { version = "0.0.103", path = "../lightning", features = ["_test_utils"] }
19-
lightning-invoice = { version = "0.11.0", path = "../lightning-invoice" }
18+
lightning = { version = "0.0.104", path = "../lightning", features = ["_test_utils"] }
19+
lightning-invoice = { version = "0.12.0", path = "../lightning-invoice" }

lightning-block-sync/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-block-sync"
3-
version = "0.0.103"
3+
version = "0.0.104"
44
authors = ["Jeffrey Czyz", "Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "http://github.com/rust-bitcoin/rust-lightning"
@@ -15,7 +15,7 @@ rpc-client = [ "serde", "serde_json", "chunked_transfer" ]
1515

1616
[dependencies]
1717
bitcoin = "0.27"
18-
lightning = { version = "0.0.103", path = "../lightning" }
18+
lightning = { version = "0.0.104", path = "../lightning" }
1919
tokio = { version = "1.0", features = [ "io-util", "net", "time" ], optional = true }
2020
serde = { version = "1.0", features = ["derive"], optional = true }
2121
serde_json = { version = "1.0", optional = true }

lightning-invoice/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "lightning-invoice"
33
description = "Data structures to parse and serialize BOLT11 lightning invoices"
4-
version = "0.11.0"
4+
version = "0.12.0"
55
authors = ["Sebastian Geisler <[email protected]>"]
66
documentation = "https://docs.rs/lightning-invoice/"
77
license = "MIT OR Apache-2.0"
@@ -10,11 +10,11 @@ readme = "README.md"
1010

1111
[dependencies]
1212
bech32 = "0.8"
13-
lightning = { version = "0.0.103", path = "../lightning" }
13+
lightning = { version = "0.0.104", path = "../lightning" }
1414
secp256k1 = { version = "0.20", features = ["recovery"] }
1515
num-traits = "0.2.8"
1616
bitcoin_hashes = "0.10"
1717

1818
[dev-dependencies]
1919
hex = "0.3"
20-
lightning = { version = "0.0.103", path = "../lightning", features = ["_test_utils"] }
20+
lightning = { version = "0.0.104", path = "../lightning", features = ["_test_utils"] }

lightning-invoice/src/utils.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,20 @@ where
9797
}
9898

9999
/// A [`Router`] implemented using [`find_route`].
100-
pub struct DefaultRouter<G, L: Deref> where G: Deref<Target = NetworkGraph>, L::Target: Logger {
100+
pub struct DefaultRouter<G: Deref<Target = NetworkGraph>, L: Deref> where L::Target: Logger {
101101
network_graph: G,
102102
logger: L,
103103
}
104104

105-
impl<G, L: Deref> DefaultRouter<G, L> where G: Deref<Target = NetworkGraph>, L::Target: Logger {
105+
impl<G: Deref<Target = NetworkGraph>, L: Deref> DefaultRouter<G, L> where L::Target: Logger {
106106
/// Creates a new router using the given [`NetworkGraph`] and [`Logger`].
107107
pub fn new(network_graph: G, logger: L) -> Self {
108108
Self { network_graph, logger }
109109
}
110110
}
111111

112-
impl<G, L: Deref, S: Score> Router<S> for DefaultRouter<G, L>
113-
where G: Deref<Target = NetworkGraph>, L::Target: Logger {
112+
impl<G: Deref<Target = NetworkGraph>, L: Deref, S: Score> Router<S> for DefaultRouter<G, L>
113+
where L::Target: Logger {
114114
fn find_route(
115115
&self, payer: &PublicKey, params: &RouteParameters, _payment_hash: &PaymentHash,
116116
first_hops: Option<&[&ChannelDetails]>, scorer: &S

lightning-net-tokio/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-net-tokio"
3-
version = "0.0.103"
3+
version = "0.0.104"
44
authors = ["Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/rust-bitcoin/rust-lightning/"
@@ -12,7 +12,7 @@ edition = "2018"
1212

1313
[dependencies]
1414
bitcoin = "0.27"
15-
lightning = { version = "0.0.103", path = "../lightning" }
15+
lightning = { version = "0.0.104", path = "../lightning" }
1616
tokio = { version = "1.0", features = [ "io-util", "macros", "rt", "sync", "net", "time" ] }
1717

1818
[dev-dependencies]

lightning-persister/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning-persister"
3-
version = "0.0.103"
3+
version = "0.0.104"
44
authors = ["Valentine Wallace", "Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/rust-bitcoin/rust-lightning/"
@@ -13,11 +13,11 @@ unstable = ["lightning/unstable"]
1313

1414
[dependencies]
1515
bitcoin = "0.27"
16-
lightning = { version = "0.0.103", path = "../lightning" }
16+
lightning = { version = "0.0.104", path = "../lightning" }
1717
libc = "0.2"
1818

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

2222
[dev-dependencies]
23-
lightning = { version = "0.0.103", path = "../lightning", features = ["_test_utils"] }
23+
lightning = { version = "0.0.104", path = "../lightning", features = ["_test_utils"] }

lightning/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lightning"
3-
version = "0.0.103"
3+
version = "0.0.104"
44
authors = ["Matt Corallo"]
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/rust-bitcoin/rust-lightning/"

lightning/src/chain/chaininterface.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ pub enum ConfirmationTarget {
4141
pub trait FeeEstimator {
4242
/// Gets estimated satoshis of fee required per 1000 Weight-Units.
4343
///
44-
/// Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later
44+
/// Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later
4545
/// round-downs don't put us below 1 satoshi-per-byte).
4646
///
47-
/// This method can be implemented with the following unit conversions:
47+
/// This method can be implemented with the following unit conversions:
4848
/// * max(satoshis-per-byte * 250, 253)
4949
/// * max(satoshis-per-kbyte / 4, 253)
5050
fn get_est_sat_per_1000_weight(&self, confirmation_target: ConfirmationTarget) -> u32;

0 commit comments

Comments
 (0)