]> git.bitcoin.ninja Git - rust-lightning/log
rust-lightning
3 months agoMerge pull request #3082 from valentinewallace/2024-04-bolt12-keysend-invoice
Matt Corallo [Wed, 12 Jun 2024 22:17:48 +0000 (15:17 -0700)]
Merge pull request #3082 from valentinewallace/2024-04-bolt12-keysend-invoice

BOLT 12 static invoice encoding and building

3 months agoMerge pull request #3103 from TheBlueMatt/2024-06-real-bench
Matt Corallo [Wed, 12 Jun 2024 22:17:25 +0000 (15:17 -0700)]
Merge pull request #3103 from TheBlueMatt/2024-06-real-bench

Use a real (probing-generated) scorer in benchmarks

3 months agoStatic invoice parsing tests
Valentine Wallace [Fri, 31 May 2024 20:17:38 +0000 (16:17 -0400)]
Static invoice parsing tests

3 months agoStatic invoice building tests
Valentine Wallace [Tue, 4 Jun 2024 23:12:54 +0000 (19:12 -0400)]
Static invoice building tests

3 months agoBuilder for creating static invoices from offers
Valentine Wallace [Thu, 9 May 2024 21:15:34 +0000 (17:15 -0400)]
Builder for creating static invoices from offers

Add a builder for creating static invoices for an offer. Building produces a
semantically valid static invoice for the offer, which can then be signed with
the key associated with the offer's signing pubkey.

3 months agoDrop unnecessary key derivation in route tests 2024-06-real-bench
Matt Corallo [Wed, 12 Jun 2024 14:06:54 +0000 (14:06 +0000)]
Drop unnecessary key derivation in route tests

In our route tests we need some "random" bytes for the router to
randomize amounts using. We generate this by building an actual
`KeysManager` and then deriving some random bytes using the
`EntropySource` trait. However, `get_route` (what we're normally
testing) doesn't actually use the random bytes, and even if it did,
using a `KeysManager` is just a fancy way of creating a constant,
so there's really no reason to do all the fancy crypto.

Instead, here, we change our routing tests and benchmarks to simply
use `[42; 32]` as the "random" bytes.

3 months agoPush the route benchmark results into a separate uninlined function
Matt Corallo [Sat, 9 Dec 2023 18:51:09 +0000 (18:51 +0000)]
Push the route benchmark results into a separate uninlined function

This ensures the route benchmarks themselves will appear with a
distinct callgraph, making router profiling somewhat easier.

3 months agoUse a real (probing-generated) scorer in benchmarks
Matt Corallo [Sun, 10 Dec 2023 18:23:17 +0000 (18:23 +0000)]
Use a real (probing-generated) scorer in benchmarks

Until now, our routing benchmarks used a synthetic scorer,
generated by scoring random paths to build up some history. This is
pretty far removed from real-world routing conditions, as
alternative paths generally have no scoring information and even
the paths we do take have only one or two past scoring results.

Instead, we fetch a static serialized scorer, generated using
minutely probes. This means future changes to the scorer's data may
be harder to benchmark, but makes for substantially more realistic
benchmarks for changes which don't impact the serialized state.

3 months agoStatic invoice encoding and parsing
Valentine Wallace [Thu, 9 May 2024 18:29:08 +0000 (14:29 -0400)]
Static invoice encoding and parsing

Define an interface for BOLT 12 static invoice messages. The underlying
format consists of the original bytes and the parsed contents.

The bytes are later needed for serialization. This is because it must
mirror all the offer TLV records, including unknown ones, which aren't
represented in the contents.

Invoices may be created from an offer.

3 months agoMerge pull request #3116 from TheBlueMatt/2024-06-3107-nit
Elias Rohrer [Wed, 12 Jun 2024 17:58:06 +0000 (19:58 +0200)]
Merge pull request #3116 from TheBlueMatt/2024-06-3107-nit

Clarify `Display` text for `ClosureReason::HolderForceClosed` some

3 months agoMerge pull request #3113 from TheBlueMatt/2024-04-async-monitor-fuzz
Elias Rohrer [Wed, 12 Jun 2024 17:20:28 +0000 (19:20 +0200)]
Merge pull request #3113 from TheBlueMatt/2024-04-async-monitor-fuzz

Fuzz reloading with a stale monitor in chanmon_consistency

3 months agoUnblock channels awaiting monitor update based on `ChanMan` queue 2024-04-async-monitor-fuzz
Matt Corallo [Tue, 11 Jun 2024 01:39:48 +0000 (01:39 +0000)]
Unblock channels awaiting monitor update based on `ChanMan` queue

When we have `ChannelMonitorUpdate`s which are completing both
synchronously and asynchronously, we need to consider a channel as
unblocked based on the `ChannelManager` monitor update queue,
rather than by checking the `update_id`s.

Consider the case where a channel is updated, leading to a
`ChannelMonitorUpdate` which completes asynchronously. The update
completes, but prior to the `ChannelManager` receiving the
`MonitorEvent::Completed` it generates a further
`ChannelMonitorUpdate`. This second update completes synchronously.
As a result, when the `MonitorEvent` is processed, the event's
`monitor_update_id` is the first update, but there are no updates
queued and the channel should be free to return to be unblocked.

Here we fix this by looking only at the `ChannelManager` update
queue, rather than the update_id of the `MonitorEvent`.

While we don't anticipate many users having both synchronous and
asynchronous persists in the same application, there isn't much
cost to supporting it, which we do here.

Found by the chanmon_consistency target.

3 months agoFuzz reloading with a stale monitor in chanmon_consistency
Matt Corallo [Mon, 15 Apr 2024 19:25:05 +0000 (19:25 +0000)]
Fuzz reloading with a stale monitor in chanmon_consistency

Now that we are gearing up to support fully async monitor storage,
we really need to fuzz monitor updates not completing before a
reload, which we do here in the `chanmon_consistency` fuzzer.

While there are more parts to async monitor updating that we need
to fuzz, this at least gets us started by having basic async
restart cases handled. In the future, we should extend this to make
sure some basic properties (eg claim/balance consistency) remain
true through `chanmon_consistency` runs.

3 months agoInvoiceTlvStream{Ref}: add message_paths field
Valentine Wallace [Thu, 6 Jun 2024 18:43:10 +0000 (14:43 -0400)]
InvoiceTlvStream{Ref}: add message_paths field

Will be used in static invoices. Also test that we'll fail to decode if these
paths are included in single-use BOLT 12 invoices.

3 months agoClarify `Display` text for `ClosureReason::HolderForceClosed` some 2024-06-3107-nit
Matt Corallo [Tue, 11 Jun 2024 18:59:02 +0000 (18:59 +0000)]
Clarify `Display` text for `ClosureReason::HolderForceClosed` some

... to make it clear that we elected not to broadcast, rather than
failed to broadcast.

3 months agoMerge pull request #3107 from mhrheaume/mhr/closure_reason_abandoned
Matt Corallo [Tue, 11 Jun 2024 18:55:11 +0000 (11:55 -0700)]
Merge pull request #3107 from mhrheaume/mhr/closure_reason_abandoned

Updated `ClosureReason::HolderForceClosed` with whether txn was broadcasted.

3 months agoUse ? instead of matching in BOLT 12 invoice parsing.
Valentine Wallace [Tue, 4 Jun 2024 22:17:45 +0000 (18:17 -0400)]
Use ? instead of matching in BOLT 12 invoice parsing.

Minor cleanup to be more concise.

3 months agoBOLT 12 invoice: extract helper for invoice signing pubkey checks
Valentine Wallace [Tue, 4 Jun 2024 22:21:50 +0000 (18:21 -0400)]
BOLT 12 invoice: extract helper for invoice signing pubkey checks

Will be useful for static invoices.

3 months agoBOLT 12 invoice: expose common helper methods and fields
Valentine Wallace [Thu, 9 May 2024 18:23:40 +0000 (14:23 -0400)]
BOLT 12 invoice: expose common helper methods and fields

Useful for static invoice support.

3 months agoGenericize BOLT 12 invoice{_builder} common macro docs over invoice type
Valentine Wallace [Wed, 22 May 2024 20:13:10 +0000 (16:13 -0400)]
Genericize BOLT 12 invoice{_builder} common macro docs over invoice type

Will be useful so the docs generated work for static invoices.

3 months agoMerge pull request #3037 from TheBlueMatt/2024-05-close-on-stale-fees
Matt Corallo [Tue, 11 Jun 2024 14:20:00 +0000 (07:20 -0700)]
Merge pull request #3037 from TheBlueMatt/2024-05-close-on-stale-fees

Force-close channels if their feerate gets stale without any update

3 months agoMerge pull request #3086 from alecchendev/2024-05-holder-commitment
valentinewallace [Mon, 10 Jun 2024 22:30:09 +0000 (18:30 -0400)]
Merge pull request #3086 from alecchendev/2024-05-holder-commitment

Add `HolderCommitmentPoint` struct to track commitment points

3 months agoGet per commitment point everywhere else with HolderCommitmentPoint
Alec Chen [Thu, 30 May 2024 22:09:56 +0000 (17:09 -0500)]
Get per commitment point everywhere else with HolderCommitmentPoint

This includes when building TxCreationKeys, as well as for open_channel
and accept_channel messages. Note: this is only for places where we are
retrieving the current per commitment point, which excludes
channel_reestablish.

3 months agoGet per commitment point for channel ready using HolderCommitmentPoint
Alec Chen [Thu, 30 May 2024 22:07:03 +0000 (17:07 -0500)]
Get per commitment point for channel ready using HolderCommitmentPoint

3 months agoUpdated `ClosureReason::HolderForceClosed` with broadcasted txn.
Matthew Rheaume [Thu, 6 Jun 2024 20:54:51 +0000 (13:54 -0700)]
Updated `ClosureReason::HolderForceClosed` with broadcasted txn.

3 months agoUse HolderCommitmentPoint for commitment number
Alec Chen [Thu, 30 May 2024 21:11:08 +0000 (16:11 -0500)]
Use HolderCommitmentPoint for commitment number

3 months agoAdd HolderCommitmentPoint struct to ChannelContext
Alec Chen [Thu, 30 May 2024 20:35:11 +0000 (15:35 -0500)]
Add HolderCommitmentPoint struct to ChannelContext

3 months agoAdd a test of stale-feerate-force-closure behavior 2024-05-close-on-stale-fees
Matt Corallo [Thu, 30 May 2024 20:59:42 +0000 (20:59 +0000)]
Add a test of stale-feerate-force-closure behavior

3 months agoForce-close channels if their feerate gets stale without any update
Matt Corallo [Sun, 5 May 2024 23:22:23 +0000 (23:22 +0000)]
Force-close channels if their feerate gets stale without any update

For quite some time, LDK has force-closed channels if the peer
sends us a feerate update which is below our `FeeEstimator`'s
concept of a channel lower-bound. This is intended to ensure that
channel feerates are always sufficient to get our commitment
transaction confirmed on-chain if we do need to force-close.

However, we've never checked our channel feerate regularly - if a
peer is offline (or just uninterested in updating the channel
feerate) and the prevailing feerates on-chain go up, we'll simply
ignore it and allow our commitment transaction to sit around with a
feerate too low to get confirmed.

Here we rectify this oversight by force-closing channels with stale
feerates, checking after each block. However, because fee
estimators are often buggy and force-closures piss off users, we
only do so rather conservatively. Specifically, we only force-close
if a channel's feerate is below the minimum `FeeEstimator`-provided
minimum across the last day.

Further, because fee estimators are often especially buggy on
startup (and because peers haven't had a chance to update the
channel feerates yet), we don't force-close channels until we have
a full day of feerate lower-bound history.

This should reduce the incidence of force-closures substantially,
but it is expected this will still increase force-closures somewhat
substantially depending on the users' `FeeEstimator`.

Fixes #993

3 months agoSkip fee reads in `full_stack_target` when connecting many blocks
Matt Corallo [Fri, 31 May 2024 17:42:49 +0000 (17:42 +0000)]
Skip fee reads in `full_stack_target` when connecting many blocks

When we connect 100 blocks in a row, requiring the fuzz input to
contain 100 fee estimator results is uneccessary, so add a bool
that lets us skip those reads.

3 months agoAdd a new `ClosureReason::PeerFeerateTooLow`
Matt Corallo [Sun, 5 May 2024 23:21:13 +0000 (23:21 +0000)]
Add a new `ClosureReason::PeerFeerateTooLow`

Closure due to feerate disagreements are a specific closure reason
which admins can understand and tune their config (in the form of
their `FeeEstimator`) to avoid, so having a separate
`ClosureReason` for it is useful.

3 months agoAllow `ChannelError` to specify the `ClosureReason`
Matt Corallo [Mon, 6 May 2024 00:02:09 +0000 (00:02 +0000)]
Allow `ChannelError` to specify the `ClosureReason`

This will allow us to add more granular failure reasons when
returning the general `ChannelError::Close`.

3 months agoUse `ChannelError::close` constructor when building a close variant
Matt Corallo [Sun, 5 May 2024 23:52:08 +0000 (23:52 +0000)]
Use `ChannelError::close` constructor when building a close variant

In the next commit we'll add a second field to
`ChannelError::Close` so here we prep by converting existing calls
to the constructor function, which is almost a full-file sed.

3 months agoAdd `ChannelError::close` constructor
Matt Corallo [Sun, 5 May 2024 23:10:39 +0000 (23:10 +0000)]
Add `ChannelError::close` constructor

3 months agoMerge pull request #3101 from tnull/2024-06-fix-tx-sync
Elias Rohrer [Mon, 10 Jun 2024 08:04:49 +0000 (10:04 +0200)]
Merge pull request #3101 from tnull/2024-06-fix-tx-sync

tx-sync: Make confirmables `Deref` and run `rustfmt`

3 months agoMerge pull request #3111 from tnull/2024-06-rustfmt-fuzz-the-easy-part
Matt Corallo [Fri, 7 Jun 2024 19:44:17 +0000 (12:44 -0700)]
Merge pull request #3111 from tnull/2024-06-rustfmt-fuzz-the-easy-part

`rustfmt`: Reformat the `fuzz` dir – the easy part

3 months agoMerge pull request #3083 from valentinewallace/2024-05-ignore-onion-err-chan-upd
Matt Corallo [Fri, 7 Jun 2024 19:25:46 +0000 (12:25 -0700)]
Merge pull request #3083 from valentinewallace/2024-05-ignore-onion-err-chan-upd

Ignore channel updates in onion errors

3 months agoStill ignore `fuzz/src/lib.rs` for now
Elias Rohrer [Fri, 7 Jun 2024 16:56:17 +0000 (18:56 +0200)]
Still ignore `fuzz/src/lib.rs` for now

3 months ago`rustfmt`: `src/zbase32.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:18:56 +0000 (13:18 +0200)]
`rustfmt`: `src/zbase32.rs`

3 months ago`rustfmt`: `src/utils/*`
Elias Rohrer [Thu, 6 Jun 2024 11:18:20 +0000 (13:18 +0200)]
`rustfmt`: `src/utils/*`

3 months ago`rustfmt`: `fuzz/src/router.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:17:20 +0000 (13:17 +0200)]
`rustfmt`: `fuzz/src/router.rs`

3 months ago`rustfmt`: `fuzz/src/refund_deser.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:12:07 +0000 (13:12 +0200)]
`rustfmt`: `fuzz/src/refund_deser.rs`

3 months ago`rustfmt`: `fuzz/src/process_network_graph.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:11:36 +0000 (13:11 +0200)]
`rustfmt`: `fuzz/src/process_network_graph.rs`

3 months ago`rustfmt`: `fuzz/src/peer_crypt.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:11:19 +0000 (13:11 +0200)]
`rustfmt`: `fuzz/src/peer_crypt.rs`

3 months ago`rustfmt`: `fuzz/src/offer_deser.rs`
Elias Rohrer [Fri, 7 Jun 2024 18:42:27 +0000 (20:42 +0200)]
`rustfmt`: `fuzz/src/offer_deser.rs`

3 months ago`rustfmt`: `fuzz/src/offer_deser.rs`
Elias Rohrer [Fri, 7 Jun 2024 18:41:50 +0000 (20:41 +0200)]
`rustfmt`: `fuzz/src/offer_deser.rs`

3 months ago`rustfmt`: `fuzz/src/msg_targets/*`
Elias Rohrer [Thu, 6 Jun 2024 11:09:43 +0000 (13:09 +0200)]
`rustfmt`: `fuzz/src/msg_targets/*`

3 months ago`rustfmt`: `fuzz/src/lib.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:09:20 +0000 (13:09 +0200)]
`rustfmt`: `fuzz/src/lib.rs`

3 months ago`rustfmt`: `fuzz/src/invoice*.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:08:51 +0000 (13:08 +0200)]
`rustfmt`: `fuzz/src/invoice*.rs`

3 months ago`rustfmt`: `fuzz/src/indexedmap.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:08:20 +0000 (13:08 +0200)]
`rustfmt`: `fuzz/src/indexedmap.rs`

3 months ago`rustfmt`: `fuzz/src/fromstr_to_netaddress.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:07:24 +0000 (13:07 +0200)]
`rustfmt`: `fuzz/src/fromstr_to_netaddress.rs`

3 months ago`rustfmt`: `fuzz/src/chanmon_deser.rs`
Elias Rohrer [Thu, 6 Jun 2024 11:06:59 +0000 (13:06 +0200)]
`rustfmt`: `fuzz/src/chanmon_deser.rs`

3 months ago`rustfmt`: `fuzz/src/bin/*`
Elias Rohrer [Thu, 6 Jun 2024 10:32:50 +0000 (12:32 +0200)]
`rustfmt`: `fuzz/src/bin/*`

3 months ago`rustfmt`: `fuzz/src/bech32_parse.rs`
Elias Rohrer [Thu, 6 Jun 2024 10:34:26 +0000 (12:34 +0200)]
`rustfmt`: `fuzz/src/bech32_parse.rs`

3 months ago`rustfmt`: `fuzz/src/base32.rs`
Elias Rohrer [Thu, 6 Jun 2024 10:31:41 +0000 (12:31 +0200)]
`rustfmt`: `fuzz/src/base32.rs`

3 months agoAdd `rustfmt::skip` to the target template
Elias Rohrer [Fri, 7 Jun 2024 08:47:51 +0000 (10:47 +0200)]
Add `rustfmt::skip` to the target template

3 months agoAdd `rustfmt::skip` to the `msg_target` template
Elias Rohrer [Fri, 7 Jun 2024 08:49:20 +0000 (10:49 +0200)]
Add `rustfmt::skip` to the `msg_target` template

3 months agoMerge pull request #3080 from jkczyz/2024-05-compact-blinded-path-creation-trait
valentinewallace [Fri, 7 Jun 2024 18:32:24 +0000 (14:32 -0400)]
Merge pull request #3080 from jkczyz/2024-05-compact-blinded-path-creation-trait

Optional compact blinded path creation

3 months agoMerge pull request #3096 from alecchendev/2024-06-drop-one-signer-call
Arik [Fri, 7 Jun 2024 16:26:39 +0000 (09:26 -0700)]
Merge pull request #3096 from alecchendev/2024-06-drop-one-signer-call

Cache commitment point on ExternalHTLCClaim to drop a signer call

3 months agoMerge pull request #3105 from johncantrell97/johncantrell97/add-peer-dis/connected...
Elias Rohrer [Fri, 7 Jun 2024 16:01:18 +0000 (18:01 +0200)]
Merge pull request #3105 from johncantrell97/johncantrell97/add-peer-dis/connected-to-cmh

add peer_(dis)connected to custom message handler

3 months agoPass our `edition` to `rustfmt`
Elias Rohrer [Thu, 6 Jun 2024 07:30:30 +0000 (09:30 +0200)]
Pass our `edition` to `rustfmt`

.. as it otherwise doesn't seem to pick up the right one when checkin
integration tests.

3 months ago`rustfmt`: `lightning-transaction-sync/tests/integration_tests.rs`
Elias Rohrer [Fri, 7 Jun 2024 09:18:43 +0000 (11:18 +0200)]
`rustfmt`: `lightning-transaction-sync/tests/integration_tests.rs`

3 months agoadd peer_(dis)connected to custom message handler
John Cantrell [Thu, 6 Jun 2024 17:59:29 +0000 (13:59 -0400)]
add peer_(dis)connected to custom message handler

3 months ago`rustfmt`: Reformat `lightning-transaction-sync/src/lib.rs`
Elias Rohrer [Thu, 6 Jun 2024 07:26:35 +0000 (09:26 +0200)]
`rustfmt`: Reformat `lightning-transaction-sync/src/lib.rs`

3 months ago`rustfmt`: Reformat `lightning-transaction-sync/src/error.rs`
Elias Rohrer [Thu, 6 Jun 2024 07:26:08 +0000 (09:26 +0200)]
`rustfmt`: Reformat `lightning-transaction-sync/src/error.rs`

3 months ago`rustfmt`: Reformat `lightning-transaction-sync/src/esplora.rs`
Elias Rohrer [Thu, 6 Jun 2024 07:25:18 +0000 (09:25 +0200)]
`rustfmt`: Reformat `lightning-transaction-sync/src/esplora.rs`

3 months ago`rustfmt`: Reformat `lightning-transaction-sync/src/electrum.rs`
Elias Rohrer [Thu, 6 Jun 2024 07:23:47 +0000 (09:23 +0200)]
`rustfmt`: Reformat `lightning-transaction-sync/src/electrum.rs`

3 months ago`rustfmt`: Reformat `lightning-transaction-sync/src/common.rs`
Elias Rohrer [Thu, 6 Jun 2024 07:21:15 +0000 (09:21 +0200)]
`rustfmt`: Reformat `lightning-transaction-sync/src/common.rs`

3 months agoMake `confirmables` `Deref`
Elias Rohrer [Thu, 6 Jun 2024 07:18:04 +0000 (09:18 +0200)]
Make `confirmables` `Deref`

.. the bindings branch needed a small patch as it doesn't support `dyn`
traits. Here, we opt to use `Deref` in the hopes this works with
bindings, rendering the patch unnecessary.

3 months agoClarify docs regarding one-hop blinded paths
Jeffrey Czyz [Thu, 30 May 2024 19:38:15 +0000 (14:38 -0500)]
Clarify docs regarding one-hop blinded paths

The docs assumed ChannelManager is parameterized by DefaultRouter, which
may not be the case. Clarify the behavior is specific to using
DefaultRouter.

3 months agoExclude disconnected peers from BlindedPath
Jeffrey Czyz [Tue, 4 Jun 2024 23:48:07 +0000 (18:48 -0500)]
Exclude disconnected peers from BlindedPath

When calling MessageRouter::create_blinded_path, ChannelManager was
including disconnected peers. Filter peers such that only connected ones
are included. Otherwise, the resulting BlindedPath may not work.

3 months agoFix functional_test_utils::reconnect_nodes
Jeffrey Czyz [Tue, 4 Jun 2024 23:42:51 +0000 (18:42 -0500)]
Fix functional_test_utils::reconnect_nodes

When reconnecting nodes, make sure to notify OnionMessenger that the
nodes are now connected.

3 months agoUse compact blinded paths for short-lived offers
Jeffrey Czyz [Tue, 28 May 2024 23:43:45 +0000 (18:43 -0500)]
Use compact blinded paths for short-lived offers

When an offer is short-lived, the likelihood of a channel used in a
compact blinded path going away is low. Require passing the absolute
expiry of an offer to ChannelManager::create_offer_builder so that it
can be used to determine whether or not compact blinded path should be
used.

Use the same criteria for creating blinded paths for refunds as well.

3 months agoDon't use compact blinded paths for reply paths
Jeffrey Czyz [Wed, 22 May 2024 21:35:57 +0000 (16:35 -0500)]
Don't use compact blinded paths for reply paths

There's no need to save space when creating reply paths since they are
part of onion messages rather than in QR codes. Use normal blinded paths
for these instead as they are less likely to become invalid in case of
channel closure.

3 months agoRefactor MessageRouter::create_blinded_paths
Jeffrey Czyz [Wed, 22 May 2024 20:32:32 +0000 (15:32 -0500)]
Refactor MessageRouter::create_blinded_paths

Using compact blinded paths isn't always necessary or desirable. For
instance, reply paths are communicated via onion messages where space
isn't a premium unlike in QR codes. Additionally, long-lived paths could
become invalid if the channel associated with the SCID is closed.
Refactor MessageRouter::create_blinded_paths into two methods: one for
compact blinded paths and one for normal blinded paths.

3 months agoMove DefaultMessageRouter::create_blinded_paths
Jeffrey Czyz [Wed, 22 May 2024 19:43:05 +0000 (14:43 -0500)]
Move DefaultMessageRouter::create_blinded_paths

An upcoming change to the MessageRouter trait will require reusing
DefaultMessageRouter::create_blinded_paths. Move the code to a utility
function so facilitate this.

3 months agoMerge pull request #3072 from arik-so/arik/gossip-v2-parsing
Matt Corallo [Wed, 5 Jun 2024 21:39:21 +0000 (14:39 -0700)]
Merge pull request #3072 from arik-so/arik/gossip-v2-parsing

Reintroduce addresses to NodeAnnouncementInfo.

3 months agoCache commitment point on ExternalHTLCClaim to drop a signer call
Alec Chen [Wed, 5 Jun 2024 21:08:41 +0000 (16:08 -0500)]
Cache commitment point on ExternalHTLCClaim to drop a signer call

3 months agoMerge pull request #3095 from TheBlueMatt/2024-06-tx-sync-bindings-upstream
valentinewallace [Wed, 5 Jun 2024 20:16:33 +0000 (16:16 -0400)]
Merge pull request #3095 from TheBlueMatt/2024-06-tx-sync-bindings-upstream

Mark BDK types exported from transaction-sync as no-export

3 months agoReintroduce addresses to NodeAnnouncementInfo.
Arik Sosman [Thu, 9 May 2024 16:42:37 +0000 (09:42 -0700)]
Reintroduce addresses to NodeAnnouncementInfo.

3 months agoMark BDK types exported from transaction-sync as no-export 2024-06-tx-sync-bindings-upstream
Matt Corallo [Wed, 5 Jun 2024 13:38:56 +0000 (13:38 +0000)]
Mark BDK types exported from transaction-sync as no-export

3 months agoMerge pull request #3091 from TheBlueMatt/2024-06-channel_state_ser
Matt Corallo [Tue, 4 Jun 2024 23:31:34 +0000 (16:31 -0700)]
Merge pull request #3091 from TheBlueMatt/2024-06-channel_state_ser

Move serialization of `channel_state` fields to `channel_state.rs`

3 months agoMerge pull request #3081 from G8XSU/2024-05-08-claimable-persist-3049-outputs
Matt Corallo [Tue, 4 Jun 2024 21:02:41 +0000 (14:02 -0700)]
Merge pull request #3081 from G8XSU/2024-05-08-claimable-persist-3049-outputs

Watch all outputs irrespective of claimable outpoints

3 months agoMove common BOLT 12 accessor methods to new macro.
Valentine Wallace [Thu, 9 May 2024 18:19:41 +0000 (14:19 -0400)]
Move common BOLT 12 accessor methods to new macro.

Will be useful when we support static BOLT 12 invoices.

3 months agoMove common BOLT 12 invoice builder setters to new macro.
Valentine Wallace [Fri, 19 Apr 2024 20:04:38 +0000 (16:04 -0400)]
Move common BOLT 12 invoice builder setters to new macro.

Will be useful when we later add support for static BOLT 12 invoices.

3 months agoRemove redundant checks in BOLT 12 invoice tests.
Valentine Wallace [Thu, 23 May 2024 15:00:40 +0000 (11:00 -0400)]
Remove redundant checks in BOLT 12 invoice tests.

3 months agoFromat moved code in `channel_state.rs` 2024-06-channel_state_ser
Matt Corallo [Tue, 4 Jun 2024 19:10:06 +0000 (19:10 +0000)]
Fromat moved code in `channel_state.rs`

3 months agoMove serialization of `channel_state` fields to `channel_state.rs`
Matt Corallo [Tue, 4 Jun 2024 14:46:15 +0000 (14:46 +0000)]
Move serialization of `channel_state` fields to `channel_state.rs`

1f616c0058f77e074c429fa7fb8b2f4594cdb9ad moved a handful of structs
to the new `channel_state.rs` but forgot to move their
serialization logic with them, which is corrected here.

3 months agoMerge pull request #3060 from TheBlueMatt/2024-05-parallel-async-om-events
Matt Corallo [Tue, 4 Jun 2024 19:10:43 +0000 (12:10 -0700)]
Merge pull request #3060 from TheBlueMatt/2024-05-parallel-async-om-events

Add a parallel async event handler to OnionMessenger and pass it directly to BackgroundProcessor

3 months agoMerge pull request #3088 from alecchendev/2024-06-fc-no-disconnect
Matt Corallo [Tue, 4 Jun 2024 15:47:22 +0000 (08:47 -0700)]
Merge pull request #3088 from alecchendev/2024-06-fc-no-disconnect

Don't disconnect on manual force closes

3 months agoMerge pull request #3089 from TheBlueMatt/2024-06-channel_state-module
Elias Rohrer [Tue, 4 Jun 2024 14:28:39 +0000 (16:28 +0200)]
Merge pull request #3089 from TheBlueMatt/2024-06-channel_state-module

Move the public channel state API into a new module

3 months agoMove the public path for `channel_state` types to their new path 2024-06-channel_state-module
Matt Corallo [Tue, 4 Jun 2024 01:25:52 +0000 (01:25 +0000)]
Move the public path for `channel_state` types to their new path

3 months agoReformat `channel_state.rs` to match rustfmt requirements
Matt Corallo [Tue, 4 Jun 2024 01:13:40 +0000 (01:13 +0000)]
Reformat `channel_state.rs` to match rustfmt requirements

3 months agoMove the public channel state API into a new module
Matt Corallo [Tue, 4 Jun 2024 01:06:54 +0000 (01:06 +0000)]
Move the public channel state API into a new module

Our "what is the channel's current state" structs have slowly
grown to be rather nontrivial, and now include eight structs with
many fields. Thus, it makes sense to pull them out of
`ln::channelmanager` and into their own module.

This also makes things easier for the C bindings which don't
support `pub use` from a private module.

3 months agoMerge pull request #2965 from tnull/2024-03-impl-readable-writeable-offer-invoice...
Matt Corallo [Tue, 4 Jun 2024 14:19:42 +0000 (07:19 -0700)]
Merge pull request #2965 from tnull/2024-03-impl-readable-writeable-offer-invoice-refund

Implement `Readable` for `Offer` and `Refund`

3 months agoImplement `Readable` for `Refund`
Elias Rohrer [Mon, 25 Mar 2024 13:07:21 +0000 (14:07 +0100)]
Implement `Readable` for `Refund`

When storing `Refund`s, it's useful for them to implement LDK's
deserialization trait.

3 months agoImplement `Readable` for `Offer`
Elias Rohrer [Mon, 25 Mar 2024 13:04:57 +0000 (14:04 +0100)]
Implement `Readable` for `Offer`

When storing `Offer`s, it's useful for them to implement LDK's
deserialization trait.

3 months agoDon't disconnect on manual force closes
Alec Chen [Mon, 3 Jun 2024 22:03:46 +0000 (17:03 -0500)]
Don't disconnect on manual force closes

3 months agoMerge pull request #2889 from Sharmalm/2840
Arik [Mon, 3 Jun 2024 21:48:52 +0000 (14:48 -0700)]
Merge pull request #2889 from Sharmalm/2840

Allow for user-specified error message during force close channel

3 months agoWatch all outputs irrespective of claimable outpoints.
G8XSU [Fri, 31 May 2024 22:26:57 +0000 (15:26 -0700)]
Watch all outputs irrespective of claimable outpoints.

This removes dependency of watched_outputs from
per_commitment_claimable_outpoints, it is required since we will
no longer have direct access to per_commitment_claimable_outpoints
once we start publishing PersistClaimInfo as part of #3049.