Commit Graph

248 Commits

Author SHA1 Message Date
Matt Corallo
f1761e06e6
Merge pull request #2221 from TheBlueMatt/2023-04-bp-exit-fast
Check for `background-processor` exit condition before+after sleep
2023-04-24 16:47:47 +00:00
Matt Corallo
607727fae7
Merge pull request #2146 from valentinewallace/2023-03-blinded-pathfinding-groundwork
Blinded pathfinding groundwork
2023-04-24 16:46:15 +00:00
Matt Corallo
05535913b3 Check for background-processor exit condition before+after sleep
In a synchronous `BackgroundProcessor`, the exit is done by setting
an atomic flag, which is most likely to happen while we're asleep.
Thus, we previously checked for the exit condition after the sleep
(and after we persisted the `ChannelManager`, if required, though
this is no longer required and dates back to when we didn't do a
re-persist after breaking out of the main loop).

For an async `background-processor`, this is also fine, however
because of the relatively longer sleep time, if the exit flag is
set via a sleep check returning true during event processing, we
may end up delaying exit rather substantially.

In order to avoid this, we simply check for the exit condition both
before and immediately after the sleep in `background-processor`.
2023-04-24 03:49:48 +00:00
Matt Corallo
bc54441424
Merge pull request #2212 from wpaulino/off-by-one-locktime
Fix off-by-one finalized transaction locktime
2023-04-22 21:54:06 +00:00
Wilmer Paulino
e904d68fa8
Catch up test nodes to latest block height
In a future commit, we plan to correctly enforce that the spending
transaction has a valid locktime relative to the chain for the node
broascasting it in `TestBroadcaster::broadcast_transaction` to. We catch
up these test node instances to their expected height, such that we do
not fail said enforcement.
2023-04-22 11:16:32 -07:00
Matt Corallo
5f96d13344
Merge pull request #2199 from tnull/2023-04-fix-async-event-processing
Allow async events processing without holding `total_consistency_lock`
2023-04-22 01:45:06 +00:00
Wilmer Paulino
453b3a1055
Call ChainMonitor::rebroadcast_pending_claims on REBROADCAST_TIMER tick
This will prompt monitors to rebroadcast/fee-bump their pending claims
on a force-closed channel once on startup and every 30 seconds after.
2023-04-21 14:34:42 -07:00
Valentine Wallace
64c26c8a79
Add blinded path {metadata} fields to Path, but disallow paying blinded paths for now 2023-04-21 15:35:04 -04:00
Elias Rohrer
f2453b7fff
Allow events processing without holding total_consistency_lock
Unfortunately, the RAII types used by `RwLock` are not `Send`, which is
why they can't be held over `await` boundaries. In order to allow
asynchronous events processing in multi-threaded environments, we here
allow to process events without holding the `total_consistency_lock`.
2023-04-21 18:02:54 +02:00
Valentine Wallace
d5b05e54c3
Replace Vec<RouteHop> with new Path struct
This lays groundwork for adding blinded path info to Path
2023-04-21 11:48:27 -04:00
Elias Rohrer
b5468226cc
Fix BP prune timer and don't panic on persistence notification failure 2023-04-21 11:44:36 +02:00
Arik
74328bd6e7
Merge pull request #2161 from benthecarman/prune-stale-channels-rgs
Prune stale channels from network graph after RGS sync.
2023-04-07 23:26:19 -07:00
Wilmer Paulino
5037298361
Use signal for handling ChannelPending in test_background_event_handling
This fixes two potential panics within the test if the
`BackgroundProcessor` for `nodes[0]` consumed the `ChannelPending` event
prior to us consuming it manually in `end_open_channel`. The first panic
would happen within the event handler, since `ChannelPending` was not
being handled. The second panic would happen upon expecting the
`ChannelPending` event after handling `nodes[1]`'s `funding_signed` if
the `BackgroundProcessor` handled the event first. To ensure we still
reliably receive a `ChannelPending` event once possible, we let the
`BackgroundProcessor` consume the event and notify it.
2023-04-06 15:10:12 -07:00
benthecarman
cff1b4bce3
Prune stale channels from network graph after RGS sync 2023-04-06 14:09:13 -05:00
Matt Corallo
068d2c65cb Add an async version of BP's test_channel_manager_persist_error
This gives us coverage of an async BP returning an error.
2023-04-04 20:59:56 +00:00
Matt Corallo
2bc55b22d3 Make BP's not_pruning_network_graph_until... test dual async-sync 2023-04-04 20:59:56 +00:00
Matt Corallo
f0b928b06d Make BP's test_payment_path_scoring dual sync/async.
This finally gives us a bit of test coverage of the async BP, which
was embarrassingly missing until now.
2023-04-04 20:59:56 +00:00
Matt Corallo
ca367f5d08 Ensure background-processor exits after any sleep future says to
If the user's sleep future passed to an async background processor
only returns true for exiting once and then reverts back to false,
we should exit anyway when we get a chance to. We do to this here
by always ensuring we check the exit flag even when only polling
sleep futures with no intent to (yet) exit. This is utilized in the
tests added in the coming commit(s).
2023-04-04 20:59:56 +00:00
Matt Corallo
8676c5aa4e Don't immediately exit BP if ChannelManager is persistable
If `ChannelManager` is persistable before the async background
processor even starts, it may not even get around to overwriting
the `should_exit` flag before testing it, and the default value is
(incorrectly) true, causing an immediate unconditional exit.

The default value should simply be false.

Fixes #2140
2023-04-04 20:59:56 +00:00
Matt Corallo
fcf1282975 Make lightning-background-processor test failures more debugable
Instead of asserting a `Result` `is_ok`, we should always simply
`unwrap` to get a backgrace, and we should avoid doing so if the
thread is already panicking.
2023-04-04 20:59:56 +00:00
Matt Corallo
3b8bf93251
Merge pull request #2090 from TheBlueMatt/2023-03-mon-wake-bp
Wake background-processor on async monitor update completion
2023-04-03 20:12:46 +00:00
Elias Rohrer
9873c7dad8
Add ChannelPending event emitted upon funding_signed
Currently, users don't have good way of being notified when channel open
negotiations have succeeded and new channels are pending confirmation on
chain. To this end, we add a new `ChannelPending` event that is emitted
when send or receive a `funding_signed` message, i.e., at the last
moment before waiting for the confirmation period.

We track whether the event had previously been emitted in `Channel` and
remove it from `internal_funding_created` entirely. Hence, we now
only emit the event after ChannelMonitorUpdate completion, or upon
channel reestablish. This mitigates a race condition where where we
wouldn't persist the event *and* wouldn't regenerate it on restart,
therefore potentially losing it, if async CMU wouldn't complete before
ChannelManager persistence.
2023-04-03 19:04:32 +02:00
Matt Corallo
94a11f7791 Expose an option to substantially reduce sleep time in futures BP
Some users have suggested that waking every 100ms can be
CPU-intensive in deployments with hundreds or thousands of nodes
all running on the same machine. Thus, we add an option to the
futures-based `background-processor` to avoid waking every 100ms to
check for iOS having backgrounded our app and cut our TCP sockets.

This cuts the normal sleep time down from 100ms to 10s, for those
who turn it on.
2023-04-03 16:49:54 +00:00
Matt Corallo
6890e43342 Wake the background processor if an async monitor update completes
If the `ChainMonitor` gets an async monitor update completion, this
means the `ChannelManager` needs to be polled for event processing.
Here we wake it using the new multi-`Future`-await `Sleeper`, or
the existing `select` block in the async BP.

Fixes #2052.
2023-04-03 16:49:54 +00:00
Matt Corallo
efcb5e02dc Move the pub wait methods from ChannelManager to Future
Rather than having three ways to await a `ChannelManager` being
persistable, this moves to just exposing the awaitable `Future` and
having sleep functions on that.
2023-04-03 16:49:54 +00:00
Matt Corallo
491100d8e5 Remove futures dependency in lightning-background-processor
As `futures` apparently makes no guarantees on MSRVs even in patch
releases we really can't rely on it at all, and while it currently
has an acceptable MSRV without the macros feature, its best to just
remove it wholesale.

Luckily, removing it is relatively trivial, even if it requires
the most trivial of unsafe tags.
2023-03-31 00:05:24 +00:00
Matt Corallo
54a51f8554 Replace futures select with our own select enum to fix MSRV
`futures` recently broke our MSRV by bumping the `syn` major
version in a patch release. This makes it impractical for us to
use, instead here we replace the usage of its `select_biased` macro
with a trivial enum.

Given its simplicity we likely should have done this without ever
taking the dependency.
2023-03-31 00:01:40 +00:00
Matt Corallo
2d4bf974e5
Merge pull request #2083 from wpaulino/events-module
Move events.rs into its own top-level module
2023-03-28 16:37:55 +00:00
Wilmer Paulino
ca9ca75f08
Move events.rs into its own top-level module
This is largely motivated by some follow-up work for anchors that will
introduce an event handler for `BumpTransaction` events, which we can
now include in this new top-level `events` module.
2023-03-22 11:49:33 -07:00
munjesi
b0bf50fa24 Replacing (C-not exported) in the docs 2023-03-22 14:30:36 +03:00
Valentine Wallace
753e4ce3c3
Remove PaymentPathFailed::retry
We now support automatic retries in ChannelManager and no longer support manual
retries, so the field is useless.
2023-03-13 11:59:03 -04:00
Matt Corallo
2e90ca11ca
Merge pull request #2081 from TheBlueMatt/2023-03-future-poll-panic 2023-03-08 15:49:43 +00:00
Matt Corallo
1751f77edf Avoid polling completed futures in the background-processor
`poll`ing completed futures invokes undefined behavior in Rust
(panics, etc, obviously not memory corruption as its not unsafe).
Sadly, in our futures-based version of
`lightning-background-processor` we have one case where we can
`poll` a completed future - if the timer for the network graph
prune + persist completes without a network graph to prune +
persist we'll happily poll the same future over and over again,
likely panicing in user code.
2023-03-07 18:06:12 +00:00
Matt Corallo
ccac926671
Merge pull request #2049 from douglaz/run-clippy-fix
Run clippy fix
2023-03-06 21:28:38 +00:00
Allan Douglas R. de Oliveira
57017dfc0b Run clippy --fix and cleanup code 2023-03-06 19:26:48 +00:00
Matt Corallo
a361be3544 Update crate versions to 0.0.114/invoice 0.22 2023-03-04 00:06:46 +00:00
Jeffrey Czyz
1d1323a3d0
Fix build warnings 2023-03-03 14:23:18 -06:00
Matt Corallo
d2f5dc01d1 Add some basic logging to Rapid Gossip Sync processing 2023-02-28 17:56:16 +00:00
Matt Corallo
a0c65c32a5
Merge pull request #2043 from valentinewallace/2023-02-initial-send-path-fails
`PaymentPathFailed`: add initial send error details
2023-02-27 18:10:27 +00:00
Matt Corallo
16b3c720a6
Merge pull request #2025 from TheBlueMatt/2023-02-no-pub-genesis-hashes
Remove genesis block hash from public API
2023-02-27 17:50:22 +00:00
Valentine Wallace
1dcb3ecb6c
Change PaymentPathFailed's optional network update to a Failure enum
This let us capture the errors when we fail without committing to an HTLC vs
failing via update_fail.
2023-02-25 16:13:42 -05:00
Valentine Wallace
2037a241f4
Remove all_paths_failed from PaymentPathFailed
This field was previous useful in manual retries for users to know when all
paths of a payment have failed and it is safe to retry. Now that we support
automatic retries in ChannelManager and no longer support manual retries, the
field is no longer useful.

For backwards compat, we now always write false for this field. If we didn't do
this, previous versions would default this field's value to true, which can be
problematic because some clients have relied on the field to indicate when a
full payment retry is safe.
2023-02-24 14:21:08 -05:00
Allan Douglas R. de Oliveira
19ef2bb6ac Only import lightning::io if futures are enabled 2023-02-24 02:56:11 +00:00
Matt Corallo
d7c818a3ad Rename BestBlock::from_genesis to from_network for clarity 2023-02-24 00:22:58 +00:00
Matt Corallo
2c3e12e309 Remove genesis block hash from public API
Forcing users to pass a genesis block hash has ended up being
error-prone largely due to byte-swapping questions for bindings
users. Further, our API is currently inconsistent - in
`ChannelManager` we take a `Bitcoin::Network` but in `NetworkGraph`
we take the genesis block hash.

Luckily `NetworkGraph` is the only remaining place where we require
users pass the genesis block hash, so swapping it for a `Network`
is a simple change.
2023-02-24 00:22:58 +00:00
Matt Corallo
4155f54716 Add an inbound flag to the peer_connected message handlers
Its useful for the message handlers to know if a peer is inbound
for DoS decision-making reasons.
2023-02-21 22:00:42 +00:00
Arik Sosman
2f36c921b6
Throw error for RGS data that's more than two weeks old, fixing #1785 2023-02-16 12:17:42 -08:00
Matt Corallo
51a3353740 Move chain::Access to routing and rename it UtxoLookup
The `chain::Access` trait (and the `chain::AccessError` enum) is a
bit strange - it only really makes sense if users import it via the
`chain` module, otherwise they're left with a trait just called
`Access`. Worse, for bindings users its always just called
`Access`, in part because many downstream languages don't have a
mechanism to import a module and then refer to it.

Further, its stuck dangling in the `chain` top-level mod.rs file,
sitting in a module that doesn't use it at all (it's only used in
`routing::gossip`).

Instead, we give it its full name - `UtxoLookup` (and rename the
error enum `UtxoLookupError`) and put it in the a new
`routing::utxo` module, next to `routing::gossip`.
2023-02-08 23:54:00 +00:00
Valentine Wallace
b28bfd382b
Remove InvoicePayer and replace with util methods 2023-02-06 16:28:23 -05:00
Valentine Wallace
2f9c3e5ea1
Score payment paths in BackgroundProcessor 2023-02-03 11:25:20 -05:00
Valentine Wallace
5aea2cf02b
Use TestScorer in BackgroundProcessor testing 2023-02-03 11:19:46 -05:00
Wilmer Paulino
acd2ae606d
Remove NodeSigner::get_node_secret
Secrets should not be exposed in-memory at the interface level as it
would be impossible the implement it against a hardware security
module/secure element.
2023-01-18 17:23:25 -08:00
Wilmer Paulino
19c4468bfc
Sign gossip messages with NodeSigner 2023-01-18 17:23:22 -08:00
Matt Corallo
c86950d510
Merge pull request #1962 from TheBlueMatt/2023-01-bp-no-std
Use the user-provided `SleepFuture` for interval checks in `background-processor`
2023-01-17 23:48:48 +00:00
Matt Corallo
e1b58a810f
Merge pull request #1960 from tnull/2023-01-deref-router-in-invoicepayer
Make `InvoicePayer`'s `Router` `Deref`
2023-01-17 23:21:22 +00:00
Matt Corallo
aa4c6f6418 Make background-processor no-std-friendly (ish)
This makes `background-processor` build without `std` at all. This
isn't particularly useful in the general no-std case as
`background-processor` is only useful with the `futures` feature,
and async will generally need `std` in some way or another. Still,
it ensures we don't end up reintroducing a dependency on the
current time, which breaks `wasm` use-cases.
2023-01-17 20:38:07 +00:00
Matt Corallo
e59b3847a3 Use the user-provided SleepFuture for interval checks in BP
`background-processor` does a number of jobs on various timers.
Instead of doing those by interrogating `std::time::Instant`, this
change swaps to using the existing user-provided sleep future.

Fixes #1864.
2023-01-17 00:26:21 +00:00
Matt Corallo
d308710d4f Use flexible timer types in background processor's regular jobs
`background-processor` does a number of jobs on various timers.
Currently, those are all done by checking the timers every 100ms
by interrogating `std::time::Instant`. This is fine for the
threaded version, but we'd like more flexibility in the `futures`-
based `background-processor`.

Here we swap the `std::time::Instant` interrogation for a lambda
which we will switch out to the user-provided sleeper in the next
commit.
2023-01-17 00:03:35 +00:00
Elias Rohrer
bc8e1e51e9
Make InvoicePayer's Router Deref
As of HEAD the `ChannelManager` is parametrized by a `Router`, while
`InvoicePayer` also owns a `Router`. In order to allow for a single
object being reused, we make the `InvoicePayer` side `Deref`.
2023-01-16 16:54:53 -06:00
Daniel Granhão
bcf174034a
Stop passing InitFeatures in msg handlers 2023-01-16 21:18:53 +00:00
Wilmer Paulino
abf4e79dcd
Use UserConfig to determine advertised InitFeatures by ChannelManager
This is purely a refactor that does not change the InitFeatures
advertised by a ChannelManager. This allows users to configure which
features should be advertised based on the values of `UserConfig`. While
there aren't any existing features currently leveraging this behavior,
it will be used by the upcoming anchors_zero_fee_htlc_tx feature.

The UserConfig dependency on provided_init_features caused most
callsites of the main test methods responsible for opening channels to
be updated. This commit foregos that completely by no longer requiring
the InitFeatures of each side to be provided to these methods. The
methods already require a reference to each node's ChannelManager to
open the channel, so we use that same reference to obtain their
InitFeatures. A way to override such features was required for some
tests, so a new `override_init_features` config option now exists on
the test harness.
2023-01-13 23:54:51 -08:00
Arik Sosman
72183bd932
Split up generic parameters that used to comprise KeysInterface. 2023-01-12 16:10:35 -08:00
Arik Sosman
5824e226ca
Remove KeysInterface trait. 2023-01-12 09:18:08 -08:00
Valentine Wallace
682bb9b0ae
Parameterize Simple*ChannelManager with DefaultRouter and ProbScorer 2023-01-05 11:29:00 -05:00
Valentine Wallace
3a274e0415
Implement routing against the netgraph in tests 2023-01-05 11:23:45 -05:00
Valentine Wallace
2e06efe2ff
Parameterize ChannelManager by a Router trait
This will be used in upcoming work to fetch routes on-the-fly for payment
retries, which will no longer be the responsibility of InvoicePayer.
2023-01-03 15:34:14 -05:00
Arik Sosman
9d7bb73b59
Split out KeysInterface into EntropySource, NodeSigner, and SignerProvider. 2022-12-20 10:09:11 -08:00
Matt Corallo
f96ac1d341 Bump crate versions to 0.0.113/invoice 0.21 2022-12-15 22:15:55 +00:00
Matt Corallo
5e577cb94a
Merge pull request #1862 from valentinewallace/2022-11-chanman-retries-prep
Prepare for Payment Retries in `ChannelManager`
2022-12-01 04:24:10 +00:00
Valentine Wallace
8a51a792aa
Move DefaultRouter to router module 2022-11-30 16:29:57 -05:00
Matt Corallo
46333affb9 Drop verbose log entries in BP when no network graph is provided
If no network graph is provided to the `BackgroundProcessor`, we
log every time the processor loop goes around (at least every
100ms, if not more) which fille up logs with useless indications
that we have no network graph.
2022-11-22 17:27:29 +00:00
Matt Corallo
49c9f1885d
Merge pull request #1806 from arik-so/2022-10-background-processor-deparametrization
Remove generic `Signer` parameter where it can be inferred from `KeysInterface`
2022-11-11 06:08:51 +00:00
Wilmer Paulino
9787b28e89
Drop DecoratingEventHandler in favor of inline closure 2022-11-10 10:57:20 -08:00
Wilmer Paulino
8d20ebc376
Handle events asynchronously in the BackgroundProcessor's async variant 2022-11-10 10:57:16 -08:00
Wilmer Paulino
05cb467234
Consume events by value in EventHandler's handle_event 2022-11-10 10:57:09 -08:00
Wilmer Paulino
b0d0f3d749
Apply network graph updates through NetworkUpdate's instead of Event's 2022-11-10 10:56:59 -08:00
Matt Corallo
384c4dc775
Merge pull request #1843 from TheBlueMatt/2022-11-fix-bp-exit-docs
Correct async `lightning-background-processor` exit check docs
2022-11-10 00:42:20 +00:00
Arik Sosman
1c8a06cf61
Remove generic Signer parameter where it can be inferred from KeysInterface 2022-11-09 16:15:11 -08:00
Matt Corallo
71739dbe04 Correct async lightning-background-processor exit check docs
The check to stop the background processor is true -> break, not
false -> break. This simply updates the docs and leaves the code
as-is.
2022-11-09 18:39:51 +00:00
Elias Rohrer
f4c2d40700
Add ChannelReady event
This adds a `ChannelReady` event that is emitted as soon as a new
channel becomes usable, i.e., after both sides have sent
`channel_ready`.
2022-11-03 11:45:28 +01:00
valentinewallace
2e343e78ca
Merge pull request #1797 from arik-so/2022-10-channel-manager-deparameterization
Deparametrize `ChannelManager` to infer `Signer` from its `KeysInterface`.
2022-10-26 13:32:09 -04:00
Arik Sosman
22c367b13b
Deparametrize ChannelManager to infer Signer from its KeysInterface. 2022-10-25 10:02:28 -07:00
Matt Corallo
35154a15c3 Bump crate versions to 0.0.112/invoice 0.20 2022-10-24 18:53:58 +00:00
Gabriel Comte
aa916bb594
Derive Eq for all structs that derive PartialEq 2022-10-14 13:24:02 +02:00
Elias Rohrer
0038a3f7de
Add futures CI check
This adds testing of the `futures` feature to CI. In order to avoid
introducing a dependency on `std`, we switch to using the `futures-util`
crate directly enabling only a subset of features. To this end, we also
switch to using the `select_biased!` macro, which is equivalent to
`select!` except that it doesn't choose ready futures pseudo-randomly
at runtime.
2022-10-10 14:47:18 -04:00
Elias Rohrer
d3c369dce7
Fix background-processor doc build for futures 2022-10-10 10:40:17 -04:00
Duncan Dean
63d7b2bf3e
Remove and track perm failed nodes & channels
We never had the `NetworkGraph::node_failed` method implemented. The
scorer now handles non-permanent failures by downgrading nodes, so we
don't want that implemented.

The method is renamed to `node_failed_permanent` to explicitly indicate
that this is the only case it handles. We also add tracking in the form
of two maps as fields of `NetworkGraph`, namely, `removed_nodes` and
`removed_channels`. We track these removed graph entries to ensure we
don't just resync them right away from gossip soon after removing them.
We stop tracking these removed nodes whenever `remove_stale_channels_and_tracking()`
is called and the entries have been tracked for longer than
`REMOVED_ENTRIES_TRACKING_AGE_LIMIT_SECS` which is currently set to one
week.
2022-10-07 12:00:39 +02:00
Jeffrey Czyz
ca76d0675b
Merge pull request #1694 from jurvis/jurvis/2022-08-move-scorer-from-router
Move `LockableScore` requirement away from `Router` trait
2022-09-16 14:01:38 -05:00
Jurvis Tan
c353c3ed7c
Move Scorer requirement away from Router trait
We do this to enable users to create routers that do not need a scorer.
This can be useful if they are running a node the delegates pathfinding.

* Move `Score` type parameterization from `InvoicePayer` and `Router` to
`DefaultRouter`
* Adds a new field, `scorer`, to `DefaultRouter`
* Move `AccountsForInFlightHtlcs` to `DefaultRouter`, which we
will use to wrap the new `scorer` field, so scoring only happens in
`DefaultRouter` explicitly.
* Add scoring related functions to `Router` trait that we used to call
directly from `InvoicePayer`.
* Instead of parameterizing `scorer` in `find_route`, we replace it with
inflight_map so `InvoicePayer` can pass on information about inflight
HTLCs to the router.
* Introduced a new tuple struct, InFlightHtlcs, that wraps functionality
for querying used liquidity.
2022-09-16 08:38:56 -07:00
Matt Corallo
d33f7268fb Stop relying on *Features::known in BP and persister tests
As we move towards specify supported/required feature bits in the
module(s) where they are supported, the global `known` feature set
constructors no longer make sense.

Here we stop relying on the `known` method in the
`lightning-background-processor` and `lightning-persister` crate
tests.
2022-09-14 20:09:36 +00:00
valentinewallace
d2a9ae0b8e
Merge pull request #1717 from TheBlueMatt/2022-09-req-features-in-handlers
Move checking of specific require peer feature bits to handlers
2022-09-13 16:17:57 -04:00
Matt Corallo
f725c5a90a Add now-missing unwraps on test calls to peer_connected. 2022-09-13 16:59:30 +00:00
Matt Corallo
f5473d5051 Bump versions to lightning* 0.0.111 and lightning-invoice 0.19 2022-09-12 22:34:27 +00:00
Matt Corallo
989cb064b5 Move broadcast_node_announcement to PeerManager
Some `NodeFeatures` will, in the future, represent features which
are not enabled by the `ChannelManager`, but by other message
handlers handlers. Thus, it doesn't make sense to determine the
node feature bits in the `ChannelManager`.

The simplest fix for this is to change to generating the
node_announcement in `PeerManager`, asking all the connected
handlers which feature bits they support and simply OR'ing them
together. While this may not be sufficient in the future as it
doesn't consider feature bit dependencies, support for those could
be handled at the feature level in the future.

This commit moves the `broadcast_node_announcement` function to
`PeerHandler` but does not yet implement feature OR'ing.
2022-09-08 19:50:36 +00:00
valentinewallace
8c6cb9953a
Merge pull request #1657 from TheBlueMatt/2022-08-async-man-update
Add a background processor which is async
2022-09-06 16:06:06 -04:00
Matt Corallo
2a5bac22bf Add a background processing function that is async.
Adds a method which operates like BackgroundProcessor::start but
instead of functioning by spawning a background thread it is async.
2022-09-06 17:42:24 +00:00
Valentine Wallace
4adff1039f
Add boilerplate for sending and receiving onion messages in PeerManager
Adds the boilerplate needed for PeerManager and OnionMessenger to work
together, with some corresponding docs and misc updates mostly due to the
PeerManager public API changing.
2022-08-26 19:02:59 -04:00
Matt Corallo
b414c0641b
Merge pull request #1658 from lightning-signer/2022-08-bitcoin-0-29
Update bitcoin crate to 0.29.0
2022-08-12 23:51:06 +00:00
Devrandom
7e05623bef Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
Valentine Wallace
c242003dd3
Fix CI to error on doc links to private items
Somehow we weren't doing this.
2022-08-07 13:49:12 -04:00