Valentine Wallace [Wed, 7 Apr 2021 17:04:04 +0000 (13:04 -0400)]
Clean up lightning-invoice CI, license, and add to workspaces
Sebastian [Wed, 7 Apr 2021 16:48:01 +0000 (12:48 -0400)]
Pure import of lightning-invoice crate
Original repo: https://github.com/rust-bitcoin/rust-lightning-invoice
Devrandom [Fri, 9 Apr 2021 09:16:22 +0000 (11:16 +0200)]
Test that BaseSign can have a vtable
Devrandom [Fri, 9 Apr 2021 09:18:45 +0000 (11:18 +0200)]
Move Writeable from BaseSign to Sign
Devrandom [Thu, 1 Apr 2021 10:24:21 +0000 (12:24 +0200)]
Separate Clone from Sign
Clone requires Sized, which prevents Sign from being a dyn object.
Devrandom [Thu, 1 Apr 2021 10:40:35 +0000 (12:40 +0200)]
Eliminate unnecessary generics from Sign
The generic methods prevent Sign from being a dyn object.
Use Secp256k1<All> as part of removing generics from Secp256k1 contexts passed into Sign methods.
Matt Corallo [Thu, 8 Apr 2021 15:07:24 +0000 (15:07 +0000)]
Merge pull request #871 from TheBlueMatt/2021-03-bench-sends
Run FS bench in CI as well
Matt Corallo [Thu, 8 Apr 2021 02:55:10 +0000 (22:55 -0400)]
Run FS bench in CI as well
Matt Corallo [Thu, 8 Apr 2021 02:06:13 +0000 (02:06 +0000)]
Merge pull request #815 from TheBlueMatt/2021-03-router-fuzzzzzzzz
Track full-path htlc-minimum-msat while routing
Matt Corallo [Thu, 1 Apr 2021 22:31:34 +0000 (18:31 -0400)]
[router] Add and clarify comments describing router internals
Matt Corallo [Sat, 27 Mar 2021 22:16:38 +0000 (18:16 -0400)]
Drop unreachable underflow-handling block in route calculation
See comment in the removed block, note that the subsequent
subtraction will underflow if the block would otherwise have been
reached.
Matt Corallo [Fri, 5 Mar 2021 02:42:42 +0000 (21:42 -0500)]
Don't clone Features during Dijkstras graph walk
We currently copy the features objects in each channel as we walk
the graph during route calculation. This implies a significant
amount of malloc traffic as the features flags object are stored
on the heap.
Instead, because they features being referenced are in the network
graph which we hold a reference to, we can simply store references
to them.
This nontrivially improves our get_route benchmark by around 5%.
Matt Corallo [Sat, 27 Mar 2021 16:49:42 +0000 (12:49 -0400)]
[router] Avoid re-processing peers when a score component decreases
While walking the graph doing Dijkstra's, we may decrease the
amount being sent along one path, and not others, based on the
htlc_minimum_msat value. This may result in a lower relative fees
on that path in comparison to others. In the extreme, this may
result in finding a second path to a node with a lower fee than the
first path found (normally impossible in a Dijkstra's
implementation, as we walk next hops in fee-order).
In such a case, we end up with parts of our state invalid as
further hops beyond that node have been filled in using the
original total fee information.
Instead, we simply track which nodes have been processed and ignore
and further updates to them (as it implies we've reduced the amount
we're sending to find a lower absolute fee, but a higher relative
fee, which isn't a better route).
We check that we are in exactly this case in test builds with new
in-line assertions. Note that these assertions successfully detect
the bug in the previous commit.
Sadly this requires an extra HashMap lookup every time we pop an
element off of our heap, though we can skip a number of heap pushes
during the channel walking.
Matt Corallo [Sat, 27 Mar 2021 01:50:54 +0000 (21:50 -0400)]
Add a random real-world-network-graph test for the router
This is the same code as was recently failing in our benchmarks,
adapted to use a random starting seed instead of a fixed one and
a smaller iteration to reduce runtime.
Matt Corallo [Sat, 27 Mar 2021 16:27:44 +0000 (12:27 -0400)]
[router] Calc min-to-node fees based on min value, not est value
When walking the network graph to calculate a route, we always
calculate the minimum fee which is required to make one further
hop. This avoids some extra hop processing at the end of each path
selection loop (saving around 10% runtime in our benchmarks).
However, if we use the real value which we expect
to send over a channel in that calculation, we may find an
alternate path to the same node which is more expensive but
capacity-constrained, resulting in us considering it cheaper as the
relative fee paid will be lower.
Instead, we can use the `minimal_value_contribution_msat`, which is
a constant through an entire path finding iteration, as the amount,
preventing any basis change in the relative fee paid.
Matt Corallo [Sat, 27 Mar 2021 02:56:37 +0000 (22:56 -0400)]
[router] Make Dijkstra's path scoring non-decreasing + consistent
Currently, the "best source" for a given node tracked during
Dijkstra's is updated with a different critera from the heap
sorting, resulting in loops in calculated paths.
This adds a test for the specific failure currently seen, utilizing
the new path-htlc-minimum tracking in the heap entries in place of
the per-hop htlc-minimum values which the MPP changeset partially
used.
Matt Corallo [Sat, 27 Mar 2021 02:31:57 +0000 (22:31 -0400)]
[router] Avoid re-selecting the same path over and over again
If we walk the network graph and find a route that meets are
payment amount and has a liquidiy limit far in excess of our
payment amount, we may select the same path several times in the
main path-gathering loop.
Instead, if the path we selected was not limited by the available
liquidity, we set the middle hop in the path's liquidity available
to zero, disabling that channel in future path finding steps.
Matt Corallo [Sat, 27 Mar 2021 02:53:35 +0000 (22:53 -0400)]
[router] Track full-path htlc-minimum-msat while graph-walking
Previously, we'd happily send funds through a path where, while
generating the path, in some middle hope we reduce the value being
sent to meet an htlc_maximum, making a later hop invalid due to it
no longer meeting its htlc_minimum. Instead, we need to track the
path's htlc-minimum while we're transiting the graph.
Matt Corallo [Sat, 27 Mar 2021 02:51:41 +0000 (22:51 -0400)]
[router] Do not fail if we are exactly (or 3x) limited by a maximum
The new MPP routing algorithm attempts to build paths with a higher
value than our payment to find paths which may allow us to pay a
fee to meet an htlc_minimum limit. This is great if we're
min-bounded, however it results in us rejecting paths where we are
bounded by a maximum near the end of the path, with fees, and then
bounded by a minimum earlier in the path. Further, it means we will
not find the cheapest path where paths have a lower relative fee
but a higher absolute fee.
Instead, we calculate routes using the actual amount we wish to
send. To maintain the previous behavior of searching for cheaper
paths where we can "pay the difference" to meet an htlc_minimum, we
detect if we were minimum-bounded during graph walking and, if we
are, we walk the graph again with a higher value.
Matt Corallo [Tue, 2 Mar 2021 01:20:16 +0000 (20:20 -0500)]
Add comment in get_route describing our dijkstra's mods
Matt Corallo [Mon, 5 Apr 2021 22:12:45 +0000 (22:12 +0000)]
Merge pull request #838 from TheBlueMatt/2021-03-skip-blocks
Make `Channel`'s block connection API more electrum-friendly
Matt Corallo [Wed, 10 Mar 2021 03:05:21 +0000 (22:05 -0500)]
Handle 1-conf funding_locked in channel no matter the event order
See comment in the diff for more details
Matt Corallo [Sat, 20 Mar 2021 04:28:10 +0000 (00:28 -0400)]
Allow changing the way we [dis]connect blocks in funtional tests
Matt Corallo [Sat, 20 Mar 2021 04:22:09 +0000 (00:22 -0400)]
Drop ChannelManager::block_disconnected() entirely
It is now entirely redundant with ChannelManager::update_best_block
and is still accessible via `Listen::block_disconnected`.
Matt Corallo [Sat, 20 Mar 2021 05:00:54 +0000 (01:00 -0400)]
Make the ChannelManager::block_connected API more electrum-friendly
See the similar commit that operates on `Channel`'s internal API
for more details on the reasoning.
Matt Corallo [Mon, 5 Apr 2021 20:23:13 +0000 (16:23 -0400)]
Log the node generating an onion error
Matt Corallo [Fri, 19 Mar 2021 00:32:30 +0000 (20:32 -0400)]
Move ChannelManager to Channel's new block data API
This also moves the scanning of the block for commitment
transactions into channel, unifying the error path.
Matt Corallo [Fri, 19 Mar 2021 00:32:20 +0000 (20:32 -0400)]
More regularly send an Error message when we force-close a channel
When we force-close a channel, for whatever reason, it is nice to
send an error message to our peer. This allows them to closes the
channel on their end instead of trying to send through it and
failing. Further, it may induce them to broadcast their commitment
transaction, possibly getting that confirmed and saving us on fees.
This commit adds a few more cases where we should have been sending
error messages but weren't. It also includes an almost-global
replace in tests of the second argument in
`check_closed_broadcast!()` from false to true (indicating an error
message is expected). There are only a few exceptions, notably
those where the closure is the result of our counterparty having
sent *us* an error message.
Matt Corallo [Mon, 5 Apr 2021 16:51:40 +0000 (16:51 +0000)]
Merge pull request #864 from valentinewallace/background-process-peer-events
Call peer_manager.process_events() in BackgroundProcessor
Valentine Wallace [Fri, 2 Apr 2021 22:40:57 +0000 (18:40 -0400)]
Call peer_manager.process_events() in BackgroundProcessor
Matt Corallo [Tue, 16 Mar 2021 00:28:22 +0000 (20:28 -0400)]
Make `Channel`'s block connection API more electrum-friendly
Electrum clients primarily operate in a world where they query (and
subscribe to notifications for) transactions by script_pubkeys.
They may never learn very much about the actual blockchain and
orient their events around individual transactions, not the
blockchain.
This makes our ChannelManager interface somewhat more amenable to
such a client by splitting `block_connected` into
`transactions_confirmed` and `update_best_block`. The first handles
checking the funding transaction and storing its height/confirmation
block, whereas the second handles funding_locked and reorg logic.
Sadly, this interface is somewhat easy to misuse - notifying the
channel of the funding transaction being reorganized out of the
chain is complicated when the only notification received is that
a new block is connected at a given height. This will be addressed
in a future commit.
Matt Corallo [Tue, 16 Mar 2021 00:13:57 +0000 (20:13 -0400)]
Switch to height-based funding-tx tracking from conf-based tracking
Previously, we expected every block to be connected in-order,
allowing us to track confirmations by simply incrementing a counter
for each new block connected. In anticipation of moving to a
update-height model in the next commit, this moves to tracking
confirmations by simply storing the height at which the funding
transaction was confirmed.
This commit also corrects our "funding was reorganized out of the
best chain" heuristic, instead of a flat 6 blocks, it uses half the
confirmation count required as the point at which we force-close.
Even still, for low confirmation counts (eg 1 block), an ill-timed
reorg may still cause spurious force-closes, though that behavior
is not new in this commit.
Matt Corallo [Thu, 1 Apr 2021 21:38:03 +0000 (21:38 +0000)]
Merge pull request #860 from TheBlueMatt/2021-03-bench-sends
Add a simple send-funds benchmark in channelmanager
Matt Corallo [Thu, 1 Apr 2021 00:16:21 +0000 (20:16 -0400)]
Also benchmark sending funds with a FilesystemPersister
Matt Corallo [Thu, 1 Apr 2021 14:37:41 +0000 (14:37 +0000)]
Merge pull request #859 from TheBlueMatt/2021-03-fix-warns
Matt Corallo [Wed, 31 Mar 2021 23:54:32 +0000 (19:54 -0400)]
Cache our node ID in ChannelManager
While its not necessarily a common operation on a running node,
`get_our_node_id()` is used incredibly heavily in tests, and there
is no reason to not eat the extra ~64 bytes to just cache it.
Matt Corallo [Wed, 31 Mar 2021 23:52:37 +0000 (19:52 -0400)]
Add a simple send-funds benchmark in channelmanager
Matt Corallo [Wed, 31 Mar 2021 23:51:15 +0000 (19:51 -0400)]
Implement Persist for any Signer in TestPersister
Matt Corallo [Wed, 31 Mar 2021 03:21:00 +0000 (23:21 -0400)]
Fix two new compiler warnings in fuzz
This fixes two trivial compiler warnings in fuzz that point to
broken usage of explicit `panic!()`s.
Matt Corallo [Sun, 28 Mar 2021 19:47:09 +0000 (19:47 +0000)]
Merge pull request #840 from jkczyz/2021-03-rescan-logic
Rescan dependent transactions in ChainMonitor
Jeffrey Czyz [Sun, 21 Mar 2021 04:42:58 +0000 (00:42 -0400)]
Test register_output is called on dependent txn
chain::Filter::register_output may return an in-block dependent
transaction that spends the output. Test the scenario where the txdata
given to ChainMonitor::block_connected includes a commitment transaction
whose HTLC output is spent in the same block but not included in txdata.
Instead, it is returned by chain::Filter::register_output when given the
commitment transaction's HTLC output. This is a common scenario for
Electrum clients, which provided filtered txdata.
Jeffrey Czyz [Sun, 21 Mar 2021 03:54:21 +0000 (23:54 -0400)]
Mock-like expectations for TestChainSource
Add a method to TestChainSource to test chain::Filter expectations. This
is limited to register_output, allowing tests to assert that the method
was called with a specific output and dictate what the return value is.
Multiple expectations are checked in the order in which they were added.
Failure occurs if a call doesn't match the next expectation or if there
are unsatisfied expectations. If not expectations are added, then no
calls are checked.
Jeffrey Czyz [Wed, 10 Mar 2021 22:39:34 +0000 (14:39 -0800)]
Add rescan logic to ChainMonitor::block_connected
Electrum clients will only provide transaction data for outputs that
have been explicitly registered. Hence, upon registering new outputs,
recursively register any outputs to watch contained within dependent
transactions from the same block.
Jeffrey Czyz [Tue, 16 Mar 2021 00:32:28 +0000 (17:32 -0700)]
Include block hash for watched transaction output
When registering a watched transaction output, any in-block descendant
transactions spending the output must be supplied. Give the block hash
when registering such outputs such that this is possible. Otherwise,
spends from other blocks may be returned inadvertently.
Matt Corallo [Fri, 26 Mar 2021 19:41:55 +0000 (19:41 +0000)]
Merge pull request #855 from valentinewallace/expose-asyncblocksourceresult
Expose AsyncBlockSourceResult as pub
Valentine Wallace [Wed, 24 Mar 2021 20:03:36 +0000 (16:03 -0400)]
Expose AsyncBlockSourceResult and BlockSourceResult as pub
Useful for writing objects that implement BlockSource trait.
Sergi Delgado Segura [Mon, 22 Mar 2021 10:14:25 +0000 (11:14 +0100)]
Adds zbase32 encoding
Jeffrey Czyz [Wed, 10 Mar 2021 17:13:21 +0000 (09:13 -0800)]
Return optional Transaction from register_output
Electrum clients primarily operate by subscribing to notifications of
transactions by script pubkeys. Therefore, they will send filtered
transaction data without including dependent transactions. Outputs for
such transactions must be explicitly registered with these clients.
Therefore, upon block_connected, provide a mechanism for an Electrum-
backed chain::Filter to return new transaction data to scan.
Matt Corallo [Sat, 20 Mar 2021 04:03:27 +0000 (04:03 +0000)]
Merge pull request #846 from TheBlueMatt/2021-03-test-chains
Require syntactically-valid blockchains in functional and unit tests
Matt Corallo [Thu, 18 Mar 2021 17:16:58 +0000 (13:16 -0400)]
[functional tests] Drop unused disconnect_block utility
This also reduces some needless clones and indirections.
Matt Corallo [Thu, 18 Mar 2021 02:00:47 +0000 (22:00 -0400)]
Drop height parameter from [dis]connect_block in functional tests
Matt Corallo [Thu, 18 Mar 2021 00:42:59 +0000 (20:42 -0400)]
[tests] Demonstrate that the commit is trivially safe
See comment in the code, This commit exists only to aid reviewers.
Matt Corallo [Wed, 17 Mar 2021 03:22:59 +0000 (23:22 -0400)]
[tests] Drop redundant parameters from connect_blocks
Matt Corallo [Wed, 17 Mar 2021 03:24:41 +0000 (23:24 -0400)]
[test] Demonstrate that the next commit is trivially safe
See comment in the code. This commit exists only to aid reviewers.
Matt Corallo [Mon, 15 Mar 2021 23:49:51 +0000 (19:49 -0400)]
Enforce block connection ordering in unit and functional tests
This expands the assertions on block ordering to apply to
`#[cfg(test)]` builds in addition to normal builds, requiring that
unit and functional tests have syntactically-valid (ie the previous
block hash pointer and the heights match the blocks) blockchains.
This requires a reasonably nontrivial diff in the functional tests
however it is mostly straightforward changes.
Matt Corallo [Wed, 17 Mar 2021 17:11:48 +0000 (13:11 -0400)]
Fix block connection ordering in a number of functional tests
Many functional tests rely on being able to call block_connected
arbitrarily, jumping back in time to confirm a transaction at a
specific height. Instead, this takes us one step towards having a
well-formed blockchain in the functional tests.
We also take this opportunity to reduce the number of blocks
connected during tests, requiring a number of constant tweaks in
various functional tests.
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
Co-authored-by: Matt Corallo <git@bluematt.me>
Matt Corallo [Fri, 5 Mar 2021 16:02:42 +0000 (11:02 -0500)]
Add assertions for in-order block [dis]connection in ChannelManager
Sadly the connected-in-order tests have to be skipped in our normal
test suite as many tests violate it. Luckily we can still enforce
it in the tests which run in other crates.
Co-authored-by: Matt Corallo <git@bluematt.me>
Co-authored-by: Jeffrey Czyz <jkczyz@gmail.com>
Matt Corallo [Sat, 13 Mar 2021 02:30:26 +0000 (21:30 -0500)]
Add `Debug` to derive list in MessageSendEvent
It can be quite useful in debugging, and potentially also so for
users.
Matt Corallo [Mon, 15 Mar 2021 03:26:15 +0000 (23:26 -0400)]
Clean up log warning in the event ChannelMonitor force-closed
Matt Corallo [Sat, 20 Mar 2021 02:52:51 +0000 (02:52 +0000)]
Merge pull request #849 from TheBlueMatt/2021-03-config-cltv-delta
Make cltv_expiry_delta configurable and reduce the min/default some
Matt Corallo [Thu, 18 Mar 2021 03:12:47 +0000 (23:12 -0400)]
Ignore patch codecov as long as total coverage is within 1% of base
In some PRs, codecov gets mad that the coverage of the patch itself
is lower than the base. In most cases, we largely don't want a Big
Red X, at least as long as the total coverage has not gone down
substantially.
Matt Corallo [Fri, 19 Mar 2021 14:44:24 +0000 (10:44 -0400)]
Tweak our_to_self_delay documentation wording to make it flow better
Matt Corallo [Wed, 17 Mar 2021 16:49:49 +0000 (12:49 -0400)]
Make cltv_expiry_delta configurable and reduce the min/default some
We allow users to configure the to_self_delay, which is analogous to
the cltv_expiry_delta in terms of its security context, so we should
allow users to specify both.
We similarly bound it on the lower end, but reduce that bound
somewhat now that it is configurable.
Matt Corallo [Thu, 18 Mar 2021 15:59:44 +0000 (15:59 +0000)]
Merge pull request #848 from TheBlueMatt/2021-03-doc-cleanups
Clean up doc links and enforce them in CI
Matt Corallo [Wed, 17 Mar 2021 19:56:02 +0000 (15:56 -0400)]
Also correct/check links in private item documentation
Matt Corallo [Wed, 17 Mar 2021 19:53:29 +0000 (15:53 -0400)]
Drop all HTML-relative links since rustdoc now supports resolution
Matt Corallo [Wed, 17 Mar 2021 18:18:37 +0000 (14:18 -0400)]
Enforce no missing docs in all crates (+ add docs that were missing)
Matt Corallo [Wed, 17 Mar 2021 18:05:09 +0000 (14:05 -0400)]
Enforce doc link correctness during `cargo doc` runs and in CI
Matt Corallo [Wed, 17 Mar 2021 18:04:02 +0000 (14:04 -0400)]
Clean up some doc links in lightning_block_sync.
Relative HTML doc paths in doc links works locally, but breaks on
crates.io. Luckily, we can now use explicit full paths and rustdoc
will resolve them for us.
Matt Corallo [Wed, 17 Mar 2021 17:40:10 +0000 (13:40 -0400)]
Expose the constants mentioned in docs, and use doc links
Matt Corallo [Wed, 17 Mar 2021 22:41:30 +0000 (22:41 +0000)]
Merge pull request #841 from valentinewallace/207-replacement
Expose counterparty forwarding info in ChannelDetails
Valentine Wallace [Fri, 12 Mar 2021 21:02:17 +0000 (16:02 -0500)]
Expose counterparty forwarding info in ChannelDetails.
Useful for constructing route hints for private channels in invoices.
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
Co-authored-by: Antoine Riard <ariard@student.42.fr>
Valentine Wallace [Fri, 12 Mar 2021 20:25:56 +0000 (15:25 -0500)]
Pass channel updates to ChannelManager and Channel.
This will be used to expose forwarding info for route hints in the next commit.
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
Co-authored-by: Antoine Riard <ariard@student.42.fr>
Valentine Wallace [Fri, 12 Mar 2021 19:23:20 +0000 (14:23 -0500)]
Add CounterpartyForwardingInfo field to channel.
This will be filled in in upcoming commits, then exposed in ChannelDetails
to allow constructing route hints for invoices.
Also update the cltv_expiry_deta comment in msgs::ChannelUpdate
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
Co-authored-by: Antoine Riard <ariard@student.42.fr>
Matt Corallo [Wed, 17 Mar 2021 20:35:03 +0000 (20:35 +0000)]
Merge pull request #828 from bmancini55/reply_channel_range
Handle query_channel_range gossip queries
bmancini55 [Tue, 16 Mar 2021 20:30:22 +0000 (16:30 -0400)]
Simplify sequencing of handle_query_channel_range
Modify NetGraphMsgHandler::handle_query_channel_range to always use
first_blocknum=0 in replies. This is spec compliant after changes to
make sequence completion explicity using sync_complete.
bmancini55 [Sun, 14 Mar 2021 19:45:45 +0000 (15:45 -0400)]
Comment cleanup for handling query_channel_range
Cleans up NetGraphMsgHandler::handle_query_channel_range
bmancini55 [Sat, 13 Mar 2021 19:51:36 +0000 (14:51 -0500)]
Use constant MAX_REPLY_SCID
Modifies NetGraphMsgHandler::handle_query_channel_range to use a constant
max value in replies. Modifies tests to generate 8000 channels instead
of making this value configurable.
Matt Corallo [Fri, 12 Mar 2021 23:19:17 +0000 (23:19 +0000)]
Merge pull request #836 from valentinewallace/invoice-features-methods
Add methods to set invoice features in Features objects.
Valentine Wallace [Mon, 8 Mar 2021 00:26:01 +0000 (19:26 -0500)]
Add methods to set features in Features objects.
Matt Corallo [Wed, 10 Mar 2021 23:26:50 +0000 (23:26 +0000)]
Merge pull request #837 from TheBlueMatt/2021-03-0.0.13
bmancini55 [Wed, 10 Mar 2021 11:46:44 +0000 (06:46 -0500)]
Use constant in QueryChannelRange::end_blocknum
Clarifies u32 max value used as the default.
Matt Corallo [Wed, 10 Mar 2021 01:54:55 +0000 (01:54 +0000)]
Merge pull request #834 from TheBlueMatt/2021-03-no-pub-internals
Make `util::logger::macro_logger` pub(crate) not pub.
Matt Corallo [Tue, 9 Mar 2021 21:51:14 +0000 (16:51 -0500)]
Update licenses and add missing fields in Cargo.toml files
Matt Corallo [Tue, 9 Mar 2021 21:47:43 +0000 (16:47 -0500)]
Add missing feature to background-processor dev-dependencies
bmancini55 [Tue, 9 Mar 2021 21:30:52 +0000 (16:30 -0500)]
Clean up iteration in handle_query_channel_range
Refactor to use an enumerator in NetGraphMsgHandler::handle_query_channel_range
Matt Corallo [Tue, 9 Mar 2021 20:57:07 +0000 (20:57 +0000)]
Merge pull request #835 from TheBlueMatt/2021-03-0.0.13
Bump Version to 0.0.13
bmancini55 [Tue, 9 Mar 2021 20:42:45 +0000 (15:42 -0500)]
Use scid_from_parts in Channel::block_connected
Refactors validation and short_channel_id construction to use
the new scid_from_parts function.
bmancini55 [Tue, 9 Mar 2021 20:34:52 +0000 (15:34 -0500)]
Improve short_channel_id utils
Modifies scid_from_parts to use u64 inputs allowing untruncated
validation. Adds public constants for limits.
Matt Corallo [Mon, 8 Mar 2021 23:50:35 +0000 (18:50 -0500)]
Bump versions to 0.0.13 across the board
We also skip having different versions for different subcrates,
since that is confusing.
Matt Corallo [Mon, 8 Mar 2021 23:48:24 +0000 (18:48 -0500)]
Rename `background-processor` to `lightning-background-processor`
This matches our naming scheme better and fits better on crates.io.
Also drop the version to 0.0.1 to match our versioning scheme
better.
Matt Corallo [Tue, 9 Mar 2021 17:16:50 +0000 (17:16 +0000)]
Merge pull request #827 from TheBlueMatt/2021-03-invoice-features
Disable MPP routing when the payee does not support it
Matt Corallo [Mon, 8 Mar 2021 23:44:18 +0000 (15:44 -0800)]
Merge pull request #826 from valentinewallace/raise-max-to-self-delay
Raise max to_self_delay.
Valentine Wallace [Thu, 4 Mar 2021 18:28:35 +0000 (13:28 -0500)]
Raise max to_self_delay.
lnd requires this to_self_delay for the max channel size
(excluding wumbo).
Matt Corallo [Fri, 5 Mar 2021 03:37:18 +0000 (22:37 -0500)]
Split router benchmark into an MPP and a non-MPP route benchmark
Matt Corallo [Fri, 5 Mar 2021 03:36:34 +0000 (22:36 -0500)]
Disable MPP routing when the payee does not support it
Matt Corallo [Fri, 5 Mar 2021 03:13:18 +0000 (22:13 -0500)]
Add an Option<>al InvoiceFeatures object for the payee in get_route
We currently only use it to override the graph-specific features
returned in the route, though we should also use it to enable or
disable MPP.
Note that tests which relied on MPP behavior have had all of their
get_route calls upgraded to provide the MPP flag.
Matt Corallo [Mon, 8 Mar 2021 21:37:27 +0000 (13:37 -0800)]
Merge pull request #833 from TheBlueMatt/2021-03-no-xs
Drop C bindings (which are now in a separate repo)
Matt Corallo [Mon, 8 Mar 2021 21:25:56 +0000 (13:25 -0800)]
Merge pull request #830 from TheBlueMatt/2021-03-chanmon-deser-utils
Make chain::Filter slightly easier with some ChannelMonitor utilities.
Matt Corallo [Sun, 7 Mar 2021 21:24:05 +0000 (16:24 -0500)]
Make `util::logger::macro_logger` pub(crate) not pub.
There is no reason for it to be pub, its a largely-internal
implementation detail of how we format our own objects for logging.