Commit graph

2103 commits

Author SHA1 Message Date
Matt Corallo
836985a5e5 Drop all HTML-relative links since rustdoc now supports resolution 2021-03-18 11:28:23 -04:00
Matt Corallo
2c7c1a6a7a Enforce no missing docs in all crates (+ add docs that were missing) 2021-03-18 11:28:23 -04:00
Matt Corallo
18a0967758 Enforce doc link correctness during cargo doc runs and in CI 2021-03-18 11:28:23 -04:00
Matt Corallo
98c6566b01 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.
2021-03-18 11:28:23 -04:00
Matt Corallo
c88e3eb452 Expose the constants mentioned in docs, and use doc links 2021-03-18 11:28:23 -04:00
Matt Corallo
32f6205848
Merge pull request #841 from valentinewallace/207-replacement
Expose counterparty forwarding info in ChannelDetails
2021-03-17 22:41:30 +00:00
Valentine Wallace
c318ad87e0
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>
2021-03-17 17:36:26 -04:00
Valentine Wallace
e8a0824dd4
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>
2021-03-17 17:36:26 -04:00
Valentine Wallace
5b28744755
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>
2021-03-17 17:36:21 -04:00
Matt Corallo
8799a2a044
Merge pull request #828 from bmancini55/reply_channel_range
Handle query_channel_range gossip queries
2021-03-17 20:35:03 +00:00
bmancini55
7b842b61f8 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.
2021-03-16 19:36:38 -04:00
bmancini55
7815965bf7 Comment cleanup for handling query_channel_range
Cleans up NetGraphMsgHandler::handle_query_channel_range
2021-03-16 19:36:30 -04:00
bmancini55
f4adb9f013 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.
2021-03-13 14:51:36 -05:00
Matt Corallo
2cb5b1af99
Merge pull request #836 from valentinewallace/invoice-features-methods
Add methods to set invoice features in Features objects.
2021-03-12 23:19:17 +00:00
Valentine Wallace
e0c8ec56dc
Add methods to set features in Features objects. 2021-03-12 12:57:55 -05:00
Matt Corallo
52edab7055
Merge pull request #837 from TheBlueMatt/2021-03-0.0.13 2021-03-10 23:26:50 +00:00
bmancini55
1809ef199e Use constant in QueryChannelRange::end_blocknum
Clarifies u32 max value used as the default.
2021-03-10 06:46:44 -05:00
Matt Corallo
c9321c5ec0
Merge pull request #834 from TheBlueMatt/2021-03-no-pub-internals
Make `util::logger::macro_logger` pub(crate) not pub.
2021-03-10 01:54:55 +00:00
Matt Corallo
eeec6fac5c Update licenses and add missing fields in Cargo.toml files 2021-03-09 16:53:03 -05:00
Matt Corallo
49910a30ac Add missing feature to background-processor dev-dependencies 2021-03-09 16:48:20 -05:00
bmancini55
deffb4a3d8 Clean up iteration in handle_query_channel_range
Refactor to use an enumerator in NetGraphMsgHandler::handle_query_channel_range
2021-03-09 16:30:52 -05:00
Matt Corallo
8a91bd92e1
Merge pull request #835 from TheBlueMatt/2021-03-0.0.13
Bump Version to 0.0.13
2021-03-09 20:57:07 +00:00
bmancini55
dd0bb25694 Use scid_from_parts in Channel::block_connected
Refactors validation and short_channel_id construction to use
the new scid_from_parts function.
2021-03-09 15:42:45 -05:00
bmancini55
d5fd8d96e1 Improve short_channel_id utils
Modifies scid_from_parts to use u64 inputs allowing untruncated
validation. Adds public constants for limits.
2021-03-09 15:34:52 -05:00
Matt Corallo
d65d7e7257 Bump versions to 0.0.13 across the board
We also skip having different versions for different subcrates,
since that is confusing.
2021-03-09 14:11:11 -05:00
Matt Corallo
00550bac19 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.
2021-03-09 14:11:11 -05:00
Matt Corallo
c896461319
Merge pull request #827 from TheBlueMatt/2021-03-invoice-features
Disable MPP routing when the payee does not support it
2021-03-09 17:16:50 +00:00
Matt Corallo
2cb655b3b1
Merge pull request #826 from valentinewallace/raise-max-to-self-delay
Raise max to_self_delay.
2021-03-08 15:44:18 -08:00
Valentine Wallace
b75437dcb1
Raise max to_self_delay.
lnd requires this to_self_delay for the max channel size
(excluding wumbo).
2021-03-08 17:30:02 -05:00
Matt Corallo
b9fef85aa3 Split router benchmark into an MPP and a non-MPP route benchmark 2021-03-08 17:19:23 -05:00
Matt Corallo
ef0f249294 Disable MPP routing when the payee does not support it 2021-03-08 17:19:23 -05:00
Matt Corallo
9e57364a89 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.
2021-03-08 17:19:23 -05:00
Matt Corallo
6b707c6f23
Merge pull request #833 from TheBlueMatt/2021-03-no-xs
Drop C bindings (which are now in a separate repo)
2021-03-08 13:37:27 -08:00
Matt Corallo
05ac59c42f
Merge pull request #830 from TheBlueMatt/2021-03-chanmon-deser-utils
Make chain::Filter slightly easier with some ChannelMonitor utilities.
2021-03-08 13:25:56 -08:00
Matt Corallo
9b55c0349a 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.
2021-03-08 16:23:01 -05:00
Matt Corallo
d793a2fc7a Drop C bindings (which are now in a separate repo)
This allows us to drop the usually-failing C bindings CI check, and
makes Github code search more useful by dropping redundant things.
2021-03-08 13:43:00 -05:00
Matt Corallo
5b230d9137 Create new InvoiceFeatures object for Invoice-specific features
In the past we skipped doing this since invoice parsing occurs in a
different crate. However, we need to accept InvoiceFeatures in routing
now that we support MPP route collection, to detect if we can select
multiple paths or not. Further, we should probably take
rust-lightning-invoice as either a module or a subcrate in this repo.
2021-03-08 13:28:54 -05:00
Matt Corallo
7cda36e26a Add codecov.yml allowing coverage to drop slightly before "failing"
This should remove one big red X in our builds, making it harder
to miss other failing tests.
2021-03-08 12:59:03 -05:00
Matt Corallo
8b4ea56966
Merge pull request #832 from jkczyz/2021-03-typo-fix
Fix misspelling of 'occurred' in public interface
2021-03-08 08:48:15 -08:00
Matt Corallo
f52f777c97 Use the new load_outputs_to_watch util in ChainMonitor
This is slightly more effecient as it avoids a clone, but its also
nice to use our own code more.
2021-03-08 11:45:32 -05:00
Matt Corallo
154dfe5755 Make get_outputs_to_watch return a Vec instead of a HashMap
`get_outputs_to_watch` returned a reference to an existing
`HashMap` avoiding extra clones, but there isn't a huge reason to
do so now that we have to clone to copy it out of the
`ChannelMonitor` mutex. Instead, return a `Vec` since it may be
less memory and it allows us to have a bindings C mapping for the
function.

Co-authored-by: Jeffrey Czyz <jkczyz@gmail.com>
Co-authored-by: Matt Corallo <git@bluematt.me>
2021-03-08 11:45:32 -05:00
Jeffrey Czyz
7a0acf951d
Fix misspelling of 'occurred' in public interface 2021-03-08 00:09:58 -08:00
Matt Corallo
c42ea50cc7
Merge pull request #829 from TheBlueMatt/2021-03-0.0.13-bindings
0.0.13 Bindings Updates
2021-03-07 12:49:15 -08:00
Matt Corallo
f1b4534aad Auto-generated bindings updates 2021-03-07 13:09:37 -05:00
Matt Corallo
14441a0926 [bindings] Check for a wasm32 target before compiling in genbindings 2021-03-07 13:06:07 -05:00
Matt Corallo
33f511dfa0 [bindings] Update demos for new upstream API 2021-03-07 13:06:07 -05:00
Matt Corallo
d039fc5cd1 Make IgnoringMessageHandler and ErroringMessageHandler pub
This is largely useful for bindings, and the off-github discussion
around #814 concluded these should be pub, but the PR was not
updated to capture this. Now that the bindings support generation
for the structs, expose them.
2021-03-07 13:06:07 -05:00
Matt Corallo
f7f7500da5 [bindings] Handle ::-containing paths in generics
Specifically, this is required for some paths which use
`Option<msgs::Message>`.
2021-03-07 13:06:07 -05:00
Matt Corallo
6b4c8e4690 [bindings] Be explicit when calling pointer.is_null()
When the (somewhat anti-pattern)
`impl Deref for X { type Target = X; .. }` is used, this avoids an
infinite dereference exception trying to figure out what type to
resolve `is_null` against.
2021-03-07 13:06:07 -05:00
Matt Corallo
bfa95cd289 [bindings] Avoid double-use'ing traits by writing out the path 2021-03-07 13:06:07 -05:00