Commit graph

85 commits

Author SHA1 Message Date
Gursharan Singh
66e445811b
Merge pull request #3267 from arik-so/rgs_metrics_2024-08
Update RGS stats for August 2024.
2024-10-21 16:15:43 -07:00
Arik Sosman
2c1e828922
Update processing times for iPhone. 2024-10-21 15:04:27 -07:00
Arik Sosman
160de118a5
Update RGS stats for August 2024. 2024-10-21 15:04:27 -07:00
Matt Corallo
64c12431b7 Drop lightning::ln::features::* type aliases
These were deprecated in 0.0.124, and we drop them here in favor of
`lightning::types::features::*`.
2024-10-13 13:52:56 +00:00
Elias Rohrer
545b037827
Drop no-std feature
We drop the `lightning/no-std` feature and just take
`hashbrown`,`possiblyrandom` and `libm` as required dependencies.
2024-09-18 09:07:58 +02:00
Elias Rohrer
3c1a5d3aa1
Re-add optional std feature dependencies to fix RGS and BP builds
We previously removed these, leading to failure to build under default
features including `std`.
2024-09-18 09:07:58 +02:00
Matt Corallo
c9de257498 Update versions to 0.0.124 and invoice 0.32 types 0.1 release 2024-09-03 18:18:52 +00:00
Matt Corallo
cdcab1ce1b Remove log level filtering in tests
There's no reason why we should be filtering our logs during tests.
It seems mostly like the `TestLogger` was written more as a sample
logger than a test logger, but these days we have samples, so we
should just drop the filtering and show everything.
2024-08-30 17:37:59 +00:00
Matt Corallo
856c980594 Bump versions to rc1 2024-08-29 19:40:09 +00:00
Mirebella
6ff1978eba Add clippy ignore rules for all errors and warnings 2024-08-28 09:47:40 +02:00
Matt Corallo
cd0ca28945 Bump version numbers to 0.0.124-beta/invoice 0.32-beta 2024-08-20 00:29:12 +00:00
Matt Corallo
51f5bc881f Drop the no-std feature from lightning-rapid-gossip-sync
Now that we don't have to have everything in our entire ecosystem
use the same `std`/`no-std` feature combinations we should start by
untangling our own features a bit.

This takes another step by removing the `no-std` feature entirely
from the `lightning-rapid-gossip-sync` crate and removing all
feature implications on dependencies from the remaining `std`
feature.
2024-08-19 15:09:40 +00:00
Matt Corallo
43dcf2f3d8
Merge pull request #3239 from arik-so/bitcoin-0.32.2-upgrade
Bitcoin 0.32.2 upgrade
2024-08-16 20:13:26 +00:00
Arik Sosman
176d2ad599
Upgrade rust-bitcoin to 0.32.2. 2024-08-16 10:31:45 -07:00
Arik Sosman
d1767cdedf
Simplify Readable mutability.
In anticipation of the rust-bitcoin upgrade, which incorporates its
own `io::Read` implementation, we need to make our usage compatible
with dropping `std::io` and `core2::io`.

Notably, in version 0.32.2, `bitcoin::io`'s `Read` is no longer
implemented for `&mut R where R: Read + ?Sized`, which results in
errors anytime `&mut &mut Readable` is passed instead of
`&mut Readable`.

This commit fixes those instances.
2024-08-16 09:23:09 -07:00
Matt Corallo
b3aed9a260 Return slices, rather than Vec references, in addresses
Its a bit strange to return a reference to a `Vec` in Rust, when a
slice is really intended as the way to do so. Worse, the bindings
don't know how to map a reference to a `Vec` (but do have code to
map a slice of `Clone`able objects).

Here, we move `NodeAnnouncementInfo::addresses` to return a slice,
though to do so we have to adapt the `WithoutLength` `Writeable`
impl to support slices as well.
2024-08-14 19:44:13 +00:00
Tobin C. Harding
e9b20cee43
Do not use bitcoin::blockdata
The `rust-bitcoin` project is working towards making the public API
separate from the directory structure; eventually the
`bitcoin::blockdata` will go away, to make maintenance easier here stop
using the `blockdata` module.

Do not run the formatter, so as to make review easier. This patch was
created mechanically using:

search-and-replace bitcoin::blockdata bitcoin

and having defined

```bash
search-and-replace () {
        if (($# != 2))
        then
                echo "Usage: $0 <this> <that>"
                return
        fi
        local this="$1"
        local that="$2"
        for file in $(git grep -l "$this")
        do
                perl -pi -e "s/$this/$that/g" "$file"
        done
}
```
2024-08-08 07:13:26 +10:00
Duncan Dean
99aa6e27f6
Use native check-cfg lint in cargo beta
This uses the newly introduced conditional configuration checks that are
now configurable withint Cargo (beta).

This allows us to get rid of our custom python script that checks for
expected features and cfgs.

This does introduce a warning regarding the unknown lint in Cargo
versions prior to the current beta, but since these are not rustc errors,
they won't break any builds with the "-D warnings" RUSTFLAG.

Moving to this lint actually exposed the "strict" feature not being
present in the lightning-invoice crate, as our python script didnt
correctly parse the cfg_attr where it appeared.
2024-07-12 11:48:15 +02:00
Matt Corallo
dc3f826123 (Re-)add handling for ChannelUpdate::message_flags
When the `htlc_maximum_msat` field was made mandatory in
`ChannelUpdate` (in b0e8b739b7) we
started ignoring the `message_flags` field entirely and always
writing `1`. The comment updates indicated that the `message_flags`
field was deprecated, but this is not true - only the
`htlc_maximum_msat` indicator bit was deprecated, requiring it to
be 1.

If a node creates a `channel_update` with `message_flags` bits set
other than the low bit, this will cause us to spuriously reject
the message with an invalid signature error as we will check the
message against the wrong hash.

With today's current spec this is totally fine - the only other bit
defined for `message_flags` is the `dont_forward` bit, which when
set indicates we shouldn't accept the message into our gossip store
anyway (though this may lead to spurious `warning` messages being
sent to peers). However, in the future this may mean we start
rejecting valid `channel_update`s if new bits are defiend.
2024-07-01 23:46:34 +00:00
Elias Rohrer
945fb5b3c9
rustfmt: Run on lightning-rapid-gossip-sync/src/lib.rs 2024-06-20 10:55:49 +02:00
Elias Rohrer
6e81e1240b
rustfmt: Run on lightning-rapid-gossip-sync/src/processing.rs 2024-06-20 10:55:08 +02:00
Elias Rohrer
1856fd3d64
rustfmt: Prepare lightning-rapid-gossip-sync/src/processing.rs 2024-06-20 10:53:29 +02:00
Arik Sosman
ab0c35fccc
Update documentation. 2024-06-12 18:35:19 -07:00
Arik Sosman
bfc959259b
Parse v2 gossip. 2024-06-12 18:35:19 -07:00
Jiri Jakes
a8bd4c097f
Upgrade rust-bitcoin to 0.31 2024-05-30 18:35:29 +08:00
Matt Corallo
49b375311b Bump crate versions to 0.0.123-beta/invoice 0.31-beta 2024-04-19 01:03:03 +00:00
Matt Corallo
d639da9d23 Fix new warnings causing CI build failures on rustc beta 2024-04-05 09:05:26 +00:00
Matt Corallo
0a14559297 Drop manual Debug impl on RGS' GraphSyncError
As it does the same thing as a derived `Debug` does anyway.
2024-01-30 23:56:12 +00:00
Matt Corallo
8805d0656b Move RGS GraphSyncError into the top-level module
The top-level module is only a few hundred lines, so there's not a
lot of reason to hide the `GraphSyncError` in its own module.
Instead, we simply move it to the top-level `lib.rs`, which doesn't
change the public API as it was previously re-exported at the top
level.
2024-01-30 23:56:12 +00:00
Matt Corallo
7b31b303c6 Bump versions to LDK 0.0.121/invoice 0.29 2024-01-22 22:32:30 +00:00
Matt Corallo
37017ec39f Bump crate versions to 0.0.120/invoice 0.28 2024-01-17 21:34:29 +00:00
Matt Corallo
c6e4debee9 Bump versions to 0.0.119/lightning-invoice 0.27 2023-12-15 23:53:40 +00:00
Elias Rohrer
ddf2509227
Bump MSRV to rustc 1.63.0 and edition to 2021
.. which is a reasonable common ground, also supported by Debian stable.
2023-12-08 14:03:45 +01:00
henghonglee
0cba31fd38
Pass Record by value to Logger
Instead of passing a reference to a Record, pass the Logger an owned
Record so that it can be decorated with semantic context.
2023-12-01 11:30:19 -06:00
Wilmer Paulino
ec928d55b4
Bump rust-bitcoin to v0.30.2 2023-11-22 15:58:01 -08:00
Matt Corallo
b664875c1b Bump crate versions to lightning 0.0.118, invoice 0.26 2023-10-23 23:41:11 +00:00
Jeffrey Czyz
54f96ef944
Use ChainHash instead of BlockHash as applicable
ChainHash is more appropriate for places where an arbitrary BlockHash is
not desirable. This type was introduced in later versions of the bitcoin
crate, thus BlockHash was used instead.

Using ChainHash also makes it easier to check if ChannelManager is
compatible with an Offer.
2023-10-16 13:29:53 -05:00
Matt Corallo
c74874604e Bump crate versions to 0.0.117/invoice 0.25 2023-10-03 23:00:48 +00:00
Matt Corallo
7036681728 Bump crate versions to 0.0.117-rc1/invoice 0.25-rc1 2023-09-29 23:39:18 +00:00
Matt Corallo
94140b91d8 Bump versions to 0.0.117-alpha2/invoice 0.25.0-alpha2 2023-09-26 20:21:08 +00:00
Matt Corallo
e01b51db67 Update crate version numbers to 0.0.117-alpha1/invoice 0.25-alpha1 2023-09-21 20:27:12 +00:00
Matt Corallo
983f2c1870 Bump crate versions to 0.0.116 release 2023-07-21 20:42:13 +00:00
Matt Corallo
cc5fea84e6 Update version numbers to rc1, from alpha1 2023-07-17 20:07:30 +00:00
Matt Corallo
23e9fc79fd Bump versions to LDK 116-alpha1 and invoice 24.0-alpha1 2023-06-23 19:43:26 +00:00
Duncan Dean
142fdca66e
Fail RGS data processing early if there is a chain hash mismatch
No point in doing any extra processing if we don't even have a match
for the chain hash.
2023-05-29 16:15:42 +02:00
Matt Corallo
1701b02124 Replace std's unmaintained bench with criterion
Rather than using the std benchmark framework (which isn't
maintained and is unlikely to get any further maintenance), we swap
for criterion, which at least gets us a variable number of test
runs so our benchmarks don't take forever.

We also fix the RGS benchmark to pass now that the file in use is
stale compared to today's date.
2023-05-11 06:11:49 +00:00
Matt Corallo
fb424009e3 Bump crate versions to 0.0.115/invoice 0.23 2023-04-24 22:40:17 +00:00
benthecarman
b336b2e92a
Lift std check to function definition 2023-04-06 20:36:17 -05:00
benthecarman
cff1b4bce3
Prune stale channels from network graph after RGS sync 2023-04-06 14:09:13 -05:00
Matt Corallo
6897e5c604 Add some trivial logging during RGS update processing.
Rather than being totally silent, we need to at least note that we
are processing an RGS update when doing so in the logs, which we do
here.

Fixes #1981.
2023-04-04 16:37:35 +00:00