Commit Graph

8234 Commits

Author SHA1 Message Date
elsirion
64a3bd6856
chore: make Bolt11InvoiceDescriptionRef copy 2024-12-05 16:46:51 +01:00
Elias Rohrer
797993c65d
Merge pull request #3441 from arik-so/2024-12-lint-fixes 2024-12-05 10:37:31 +01:00
Arik Sosman
b4f21d16f4
Explicitly specify elided lifetime for LockTestExt 2024-12-05 00:48:35 -08:00
Arik Sosman
340ef29032
Remove blank lines following doc comments 2024-12-05 00:48:35 -08:00
Arik Sosman
1ff77aef60
Allow manual_div_ceil
Until our MSRV reaches 1.73.0, we're gonna need
to keep allowing it.
2024-12-05 00:48:35 -08:00
Matt Corallo
726dd5cad3
Merge pull request #3429 from andrei-21/feature/channelmonitor-goodies
Clean channelmonitor.rs code
2024-12-04 14:58:05 +00:00
Matt Corallo
1386bef048
Merge pull request #3431 from tnull/2024-11-drop-logging-features
Drop log-limiting features
2024-12-03 17:54:20 +00:00
Elias Rohrer
f6af8e346e
Drop log-limiting features
Previously, LDK offered two ways to limit log outputs:
filtering during runtime client-side by matching on any given `Record`'s `Level` value,
as well as at compile time through the `max_level_*` feature flags.

It turns out the latter approach was always broken when used outside of
the `lightning` crate. Here, we therefore simply drop the feature-based
filtering.
2024-12-03 17:26:49 +01:00
Matt Corallo
a92084b4dc
Merge pull request #3437 from tnull/2024-12-drop-elided-lifetime-name
Drop elided lifetime name from `get_best_block`
2024-12-03 16:23:18 +00:00
Matt Corallo
e1e8ce00c8
Merge pull request #3420 from TheBlueMatt/2024-11-live-success-prob
Add the ability to fetch a probability from live liquidity bounds
2024-12-03 16:10:22 +00:00
Elias Rohrer
2ca1d8fadf
Drop unnecessary elided lifetime name from get_best_block
.. which recently started to yield a warning on the `beta` channel of
rustc.
2024-12-03 11:22:42 +01:00
Matt Corallo
7cfcb14846
Merge pull request #3434 from tnull/2024-12-fix-indexmap-pin
Fix `indexmap` pin as 2.7.0 was just released
2024-12-02 16:47:24 +00:00
Matt Corallo
d3efe5cbb7 Add a fallback-allowed param to historical success prob estimator
`historical_estimated_payment_success_probability` exposes the
historical success probability estimator publicly, but only allows
fetching data from channels where we have sufficient information.

In the previous commit,
`live_estimated_payment_success_probability` was added to enable
querying the live bounds success probability estimator.

Sadly, while the historical success probability estimator falls
back to the live probability estimator, it does so with a different
final parameter to `success_probability`, making
`live_estimated_payment_success_probability` not useful for
calculating the actual historical model output when we have
insufficient data.

Instead, here, we add a new parameter to
`historical_estimated_payment_success_probability` which
determines whether it will return fallback data from the live
model instead.
2024-12-02 16:45:50 +00:00
Matt Corallo
b1770ba8f6 Add the ability to fetch a probability from live liquidity bounds
We already expose the estimated success probability from the
historical liquidity bounds from
`historical_estimated_payment_success_probability`, but we don't
do that for the live liquidity bounds.

Here we add a `live_estimated_payment_success_probability` which
exposes the probability result from the live liquidity bounds as
well.
2024-12-02 16:45:50 +00:00
Elias Rohrer
d80d1dd1ff
Fix indexmap pin as 2.7.0 was just released
I heard you like pins, so I pinned you pin so you can pin while you pin.
2024-12-02 16:20:06 +01:00
Andrei
8ebda06c4e Turn IrrevocablyResolvedHTLC comment into a Rust comment 2024-12-02 00:00:00 +00:00
Jeffrey Czyz
846342eec1
Merge pull request #3433 from andrei-21/fix/iso-typo
Fix `ISO 4712` typo to `ISO 4217`
2024-11-29 16:03:30 -06:00
Andrei
fa731ae832 Fix ISO 4712 typo to ISO 4217 2024-11-28 00:00:00 +00:00
Andrei
553e6c7ec6 Clean channelmonitor.rs code
* Replace deprecated `u64::max_value()`
* Use `Option::is_some()`
* Use `Iterator::any()` instead of `Iterator::find()`
2024-11-27 00:00:00 +00:00
Matt Corallo
12920d8ca4
Merge pull request #3417 from dunxen/2024-11-removenextfundingtxidpersist
Remove `next_funding_txid` tlv from `Channel` read/write
2024-11-26 22:32:40 +00:00
valentinewallace
70ace8184c
Merge pull request #3345 from tankyleo/onion-channel-updates
Stop sending `channel_update` in onion failures
2024-11-26 14:24:10 -05:00
Matt Corallo
ff36405609
Merge pull request #3426 from morehouse/correct_return_value
Correct return value for `apply_post_close_monitor_update`
2024-11-26 17:01:01 +00:00
Matt Morehouse
857d36344d
Correct return value for apply_post_close_monitor_update
A recent change accidentally inverted the returned monitor update for
the case where an update is applied after the channel has been closed.
This commit corrects that mistake.
2024-11-26 10:35:44 -06:00
Matt Corallo
ba3d4ff957
Merge pull request #3421 from arik-so/rgs-cache-doc
Expand on RGS caching requirements
2024-11-25 14:37:07 +00:00
Duncan Dean
7177acb576
Remove next_funding_txid tlv from channel read/write
We want to remove this before release so that we can work on a way to
not persist this but rather get it from other persisted data and just
free up the TLV.

Note that the "added in 0.0.124" comment was incorrect as it was
actually added in #3137 but the comment was stale so it's safe to remove.
2024-11-25 09:19:05 +02:00
Arik Sosman
144340bf0f
Expand on RGS caching requirements 2024-11-23 11:33:16 -05:00
Jeffrey Czyz
2d6720e7e2
Merge pull request #3419 from arik-so/rgs-timestamp-docs
Document RGS timestamp usage
2024-11-22 15:08:33 -06:00
Arik Sosman
f6a9078150
Document RGS timestamp usage. 2024-11-21 08:24:14 -08:00
Jeffrey Czyz
0c31021c6f
Merge pull request #3137 from dunxen/2024-06-non-public-API-v2-channels
Implement accepting dual-funded channels without contributing
2024-11-20 11:54:35 -06:00
Duncan Dean
dd190ae785
Add pending release notes for accepting dual-funded channels 2024-11-20 14:04:18 +02:00
Duncan Dean
85d58ba484
Remove unused muts in channel tests 2024-11-20 14:04:17 +02:00
Duncan Dean
c762c6b5e4
Fix docs to indicate OpenChannelRequest is NOT persisted across restarts 2024-11-20 14:04:15 +02:00
Duncan Dean
2deb41aa5c
Add manual testing for accepting dual-funded channels 2024-11-20 14:04:14 +02:00
Duncan Dean
c3896b55ad
Temporarily allow some unused dual-funding code 2024-11-20 14:04:12 +02:00
Duncan Dean
f793bf8ad6
Add option_dual_fund feature 2024-11-20 14:01:42 +02:00
Duncan Dean
c79b49d5f3
Handle re-establishment next_funding_txid 2024-11-20 14:01:03 +02:00
Duncan Dean
982e25de0e
Handle initial commitment_signed for V2 channels 2024-11-20 14:01:02 +02:00
Duncan Dean
684b3b7244
Introduce InteractiveTxSigningSession for signing interactively constructed txs 2024-11-20 13:57:05 +02:00
Duncan Dean
24ba5848d5
Implement support for accepting V2 channels 2024-11-20 13:57:03 +02:00
Duncan Dean
f71bbb9643
Add features in InteractiveTxConstructor requried for V2 chan accept
1. InteractiveTxConstructorArgs is introduced to act as a single, more
   readable input to InteractiveTxConstructor::new().
2. Various documentation updates.
2024-11-18 15:19:00 +02:00
Duncan Dean
b0dc394505
Remove unused Channel::dual_funding_channel_context
For now this is unneeded as we do not provide any inputs as channel
acceptor and we do not allow creating outbound channels yet. It will
be re-added when that functionality is introduced.
2024-11-18 15:19:00 +02:00
Duncan Dean
bb81598cba
Add interactive tx constructor to all V2-related channel structs
Here we add the `interactive_tx_constructor` field to the `Channel`,
`OutboundV2Channel`, and `InboundV2Channel` structs.
2024-11-18 15:19:00 +02:00
Duncan Dean
7e23afc9a8
Remove dual_funding cfg attributes
We'll only gate public API related to contributing toward an inbound or opening
a dual funded channel.
2024-11-18 15:18:39 +02:00
Duncan Dean
899d5f5ef3
Add dual-funding spec links 2024-11-18 12:43:32 +02:00
Matt Corallo
8da30df223
Merge pull request #3405 from jkczyz/2024-11-bolt11-invoice-utils-follow-up 2024-11-14 21:55:54 +00:00
Matt Corallo
1c5b4c129b
Merge pull request #3355 from TheBlueMatt/2024-10-mon-ids-after-close 2024-11-14 21:53:52 +00:00
Matt Corallo
41f06231ab
Merge pull request #3221 from tnull/2024-08-rustfmt-lightning-invoice
`rustfmt`: Run on `lightning-invoice`
2024-11-14 21:27:18 +00:00
Matt Corallo
4582b201ea Avoid startup PeerState entries for peers with unfunded channels
If a peer creates a channel with us which never reaches the funding
stage (or never gets any commitment updates after creation), we'll
avoid inserting the `update_id` into
`closed_channel_monitor_update_ids` at runtime to avoid keeping a
`PeerState` entry around for no reason. However, on startup we
still create a `ChannelMonitorUpdate` with a `ChannelForceClosed`
update step to ensure the `ChannelMonitor` is locked and shut down.

This is pretty redundant, and results in a bunch of on-startup
`ChannelMonitorUpdate`s for any old but non-archived
`ChannelMonitor`s. Instead, here, we check if a `ChannelMonitor`
already saw a `ChannelForceClosed` update step before we generate
the on-startup `ChannelMonitorUpdate`.

This also allows us to skip the `closed_channel_monitor_update_ids`
insertion as we can be confident we'll never have a
`ChannelMonitorUpdate` for this channel at all.
2024-11-14 20:00:23 +00:00
Elias Rohrer
b5b70e7631
rustfmt: Remove remaining lightning-invoice files from exclusion list 2024-11-14 13:51:44 +01:00
Elias Rohrer
754f393f18
rustfmt: Drop lightning-invoice/tests/ser_de.rs from exclusion list 2024-11-14 13:51:09 +01:00