Commit graph

78 commits

Author SHA1 Message Date
Elias Rohrer
ce8b5ba0f7
Build and test transaction sync crate in CI 2023-02-09 15:28:46 -06:00
Matt Corallo
608c8adfd5 Update the lightning graph snapshot used in benchmarks
The previous copy was more than one and a half years old, the
lightning network has changed a lot since!

As of this commit, performance on my Xeon W-10885M with a
SK hynix Gold P31 storing a BTRFS volume is as follows:

```
test ln::channelmanager::bench::bench_sends                                  ... bench:   5,896,492 ns/iter (+/- 512,421)
test routing::gossip::benches::read_network_graph                            ... bench: 1,645,740,604 ns/iter (+/- 47,611,514)
test routing::gossip::benches::write_network_graph                           ... bench: 234,870,775 ns/iter (+/- 8,301,775)
test routing::router::benches::generate_mpp_routes_with_probabilistic_scorer ... bench: 166,155,032 ns/iter (+/- 30,206,162)
test routing::router::benches::generate_mpp_routes_with_zero_penalty_scorer  ... bench: 136,843,661 ns/iter (+/- 67,111,218)
test routing::router::benches::generate_routes_with_probabilistic_scorer     ... bench:  52,954,598 ns/iter (+/- 11,360,547)
test routing::router::benches::generate_routes_with_zero_penalty_scorer      ... bench:  37,598,126 ns/iter (+/- 17,262,519)
test bench::bench_sends                                                      ... bench:  37,760,922 ns/iter (+/- 5,179,123)
test bench::bench_reading_full_graph_from_file                               ... bench:      25,615 ns/iter (+/- 1,149)
```
2023-01-19 05:06:29 +00:00
Matt Corallo
26b1674da8 Only do backtrace builds on stable to fix MSRV break in CI 2022-12-15 22:15:55 +00:00
Matt Corallo
2ef3d18906 Use rustc stable for benchmark CI run to fix current breakage 2022-10-31 18:46:31 +00: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
Matt Corallo
ada0df2d9f Test a full no-std build in the no-std-check crate in CI
Rust is incredibly forgiving in attempts to access `std`, making it
rather difficult to test `no-std` properly. In practice, the only
decent way to do so is to actually build for a platform that does
not have `std`, which we do here by building the `no-std-check`
crate for `arm-thumbv7m-none-eabi`.
2022-10-07 17:19:12 +00:00
Matt Corallo
e2e8847254 Test rapid-gossip-sync in no-std in CI 2022-10-06 23:59:30 +00:00
Matt Corallo
54fa6280cf Don't make references to std in lightning-invoice in bindings
As we support `no-std` for `lightning-invoice` builds, we should
support them in `c_bindings` as well, which we add a test for in
CI here.
2022-09-26 10:39:14 +00:00
Duncan Dean
88e562053a
Workaround GH Actions issue for 1.45 2022-08-23 10:54:43 +02:00
Elias Rohrer
b0e8b739b7 Make htlc_maximum_msat a required field. 2022-07-25 20:35:51 +02:00
Elias Rohrer
c21593db99 Check release build profile in CI
So far, CI did not check the code in the `release` build profile, which
could result in some things not getting caught. To fix this, we now
implement a new CI job that runs checks in the `release` profile.

Switch to stable toolchain.
2022-06-10 15:22:31 +02:00
Arik Sosman
a58ae4c97b
Introduce graph sync crate for fast-forwarding through gossip data downloaded from a server. 2022-05-25 01:21:33 -07:00
dependabot[bot]
d1d0189b2d
Bump codecov/codecov-action from 2 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 17:32:54 +00:00
Matt Corallo
7671ae5452
Merge pull request #1351 from TheBlueMatt/2022-03-scid-privacy
Implement the SCIDAlias Channel Type and provide SCID Privacy
2022-03-28 20:33:55 +00:00
Matt Corallo
41fb56b5be Bump check_commits CI job rustc to 1.57
1.51 (and other earlier versions of `rustc`) appear to refuse to
accept our documentation links due to a bogus failure to resolve
`ChannelTypeFeatures::supports_scid_privacy`.
2022-03-27 17:12:17 +00:00
Devrandom
8d7b38fcf1 Add low_r signature grinding
default on, can be turned off via a feature gate
2022-03-25 20:34:02 +01:00
dependabot[bot]
e418bdff76
Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 17:38:00 +00:00
Jeffrey Czyz
1a734492d9
Merge pull request #1347 from jkczyz/2022-03-log-approximation
Use log approximation in ProbabilisticScorer
2022-03-09 10:19:25 -06:00
Jeffrey Czyz
f041a64fca
Check for no-std compatibility across dependencies
To ensure no-std is honored across dependencies, add a crate depending
on lightning crates supporting no-std. This should ensure any
regressions are caught. Otherwise, cargo doesn't seem to catch some
incompatibilities (e.g., f64::log10 unavailable in core) and seemingly
across other dependencies as describe here:

https://blog.dbrgn.ch/2019/12/24/testing-for-no-std-compatibility/
2022-03-08 23:23:26 -06:00
valentinewallace
b89f8815c3
Merge pull request #1343 from lightningdevkit/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-03 14:35:01 -05:00
Matt Corallo
5e86bbf970
Merge pull request #1310 from TheBlueMatt/2022-02-bump-msrv
Bump MSRV to 1.41.1.
2022-03-02 19:09:14 +00:00
dependabot[bot]
670aebe07a
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 17:35:18 +00:00
Matt Corallo
5da22534cd Pin rustc in fuzzing to 1.58 due to honggfuzz-rs regression 2022-02-25 22:09:30 +00:00
Matt Corallo
f96dec2db1 Bump MSRV to 1.41.1.
1.41.1 is currently the Firefox ESR MSRV, which means its also the
version several Linux distros ship. Further, rust-bitcoin is likely
to make a similar change soon, see
https://github.com/rust-bitcoin/rust-bitcoin/issues/510.
2022-02-15 21:07:28 +00:00
Matt Corallo
c8e3078ff7 Make router benchmarks more realistic by not running test-only code
`cargo bench` sets `cfg(test)`, causing us to hit some test-only
code in the router when benchmarking, throwing off our benchmarks
substantially. Here we swap from the `unstable` feature to a more
clearly internal feature (`_bench_unstable`) and also checking for
it when enabling test-only code.
2022-02-10 22:28:38 +00:00
Matt Corallo
8f007c7dbb Check lockorders in tests with a trivial lockorder tracker 2022-01-14 15:35:58 +00:00
Matt Corallo
b62b244c3c
Merge pull request #1223 from lightning-signer/2021-12-invoice-nostd
Adapt lightning-invoice to no_std
2022-01-06 19:25:36 +00:00
Devrandom
01915810d4 Adapt lightning-invoice to no_std 2022-01-05 23:18:03 +01:00
Matt Corallo
ffbef9fec7 Support building cfg=c_bindings with no-std
This will be needed for JavaScript bindings eventually.
2022-01-05 07:24:46 +00:00
hackerrdave
d46c2a20e1 update repo name to use lightningdevkit 2021-12-26 22:53:16 -05:00
Matt Corallo
01ef55ae86 Build no-std on 1.47 now that core2 supports it 2021-12-16 02:22:56 +00:00
Matt Corallo
144145e4f9 Pin tokio to 1.14.0 in CI for older rustc's 2021-12-16 02:22:56 +00:00
Matt Corallo
4fc7bcee58 Upgrade to codecov uploader v2
Some time ago codecov stopped supporting their old v1 uploader, and
it seems they've now finally turned it off, so we aren't getting
any coverage reports anymore. Hopefully upgrading is pretty trivial.
2021-12-07 22:16:41 +00:00
Matt Corallo
1a743672b9
Merge pull request #1184 from TheBlueMatt/2021-11-c-bindings-tweaks
C Bindings Compatibility Tweaks
2021-11-24 20:03:14 +00:00
Matt Corallo
4831de41ec Test all log-limiting features in CI 2021-11-24 02:52:53 +00:00
Matt Corallo
016eb96fc7 Support logger::Record in C by String-ing the fmt::Arguments
This adds a new (non-feature) cfg argument `c_bindings` which will
be set when building C bindings. With this, we can (slightly) tweak
behavior and API based on whether we are being built for Rust or C
users.

Ideally we'd never need this, but as long as we can keep the API
consistent-enough to avoid material code drift, this gives us a
cheap way of doing the "right" thing for both C and Rust when the
two are in tension.

We also move lightning-background-processor to support the same
MSRV as the main lightning crate, instead of only
lightning-net-tokio's MSRV.
2021-11-23 03:30:48 +00:00
Matt Corallo
57feb26307
Merge pull request #1028 from lightning-signer/2021-08-no-std
Actual no_std support
2021-08-03 17:06:59 +00:00
Devrandom
32d13a2ff8 Rename no_std feature to no-std
matches rust-bitcoin
2021-08-03 18:53:33 +02:00
Matt Corallo
75f77a5708
Merge pull request #1033 from TheBlueMatt/2021-07-fix-beta
Fix lightning-persister tests for upcoming rustc changes
2021-08-03 14:41:35 +00:00
Jeffrey Czyz
b4c3a33f29
Fail linter on #[warn(clippy::try_err)]
Some heavily used macros are using ? directly on an Err. Using a return
is easier to read and removes hundreds of linter warnings.

https://rust-lang.github.io/rust-clippy/master/index.html#try_err
2021-08-02 10:32:02 -05:00
Matt Corallo
0fa18658cd Add CI runs on rustc beta on Windows and MacOS
This should catch any platform-specific behavior changes in rustc
before they land in stable.
2021-08-02 14:52:35 +00:00
Matt Corallo
24ae779652 Drop MSRV for no_std to 1.47 as that's what Ubuntu LTS ships with
...but disable it for now given core2 is broken (it claims an MSRV
of 1.47 but does not build).
2021-07-31 18:31:16 +00:00
Matt Corallo
a7934d7ece Disable fast-fail to let CI actually run even though beta is broken 2021-07-29 17:40:42 +00:00
Devrandom
2e8f4fef2f Test no_std instead of just hashbrown 2021-07-20 20:59:18 +02:00
Gene Ferneau
da7a851d47
Use hashbrown replacements for std equivalents 2021-06-18 21:54:21 +00:00
Matt Corallo
27d9feda58 Only check docs on rustc 1.52 as rustc stable now crashes 2021-06-17 15:41:16 +00:00
Matt Corallo
73576574a9 Update network graph sample used in benchmarks 2021-06-01 21:53:06 +00:00
Matt Corallo
ad20bc7f5a Update net_graph used for benchmarks to use new ser format. 2021-05-27 21:46:38 +00:00
Matt Corallo
3d1c72e73f Update net graph copy used in tests and bench for new format 2021-05-25 20:06:45 +00:00
Matt Corallo
5625c3ab52 Test lightning-persister on rustc 1.36 as well 2021-04-27 00:36:52 +00:00