Commit graph

100 commits

Author SHA1 Message Date
Matt Corallo
d186c683b9 Reduce disk usage in CI
Recently github appears to have reduced the available free disk
space in actions runs, causing CI to fail with out of space errors.
Here we simply run `cargo clean` a few times in CI to reduce our
disk usage somewhat.
2023-10-14 18:41:34 +00:00
Matt Corallo
b78f93694f Move coverage generation to llvm-cov in the hopes its more stable 2023-09-17 00:56:56 +00:00
Jeffrey Czyz
1227dfc1ee
Use rustc stable for check_commits
Otherwise, the compiler will panic when using 1.57 for upcoming commits.
2023-07-14 15:02:29 -05:00
Elias Rohrer
98bef2aa4b
Update Github Actions to remove deprecated actions 2023-07-06 14:30:31 +02:00
Wilmer Paulino
82b646c548
Remove anchors config flag
Now that all of the core functionality for anchor outputs has landed,
we're ready to remove the config flag that was temporarily hiding it
from our API.
2023-06-23 13:32:08 -07: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
Wilmer Paulino
d63006dcc0
Cancel in-progress jobs on updated push
At times, PRs can go through multiple pushes in a short amount of time,
spawning a workflow run for each. Most of the time, there's no need to
let the previous jobs running if the code itself has changed (e.g., via
a force push), and we'd benefit from having those slots be used by other
PRs/branches instead.
2023-04-17 11:32:53 -07:00
Wilmer Paulino
f471a1b9da
Ignore workflow runs on master branch
This master branch is just an alias to the main branch for legacy
reasons, so there's no need to run workflows on both branches.
2023-04-17 11:30:30 -07:00
Arik Sosman
bc97b82de4
Add Taproot CI test. 2023-04-03 13:17:12 -07:00
Wilmer Paulino
881656ba9e
Test anchors build in CI 2023-03-20 16:46:38 -07:00
Matt Corallo
6558b510cf Replace the bulk of CI with a (much simpler) bash script 2023-03-16 19:15:06 +00:00
Matt Corallo
4e32de71df Remove build-features CI flag now that its always true 2023-03-15 18:18:08 +00:00
Matt Corallo
263173f06c Remove build-no-std CI flag now that its always true 2023-03-15 18:17:02 +00:00
Matt Corallo
fb4f34cb2c Remove build-net-tokio flag in CI since its now always true 2023-03-15 18:16:01 +00:00
Matt Corallo
11a0d266c5 Bump MSRV to 1.48
1.48.0 was released at the end of 2020, nearly 2.5 years ago. It
has been the rustc available on Debian stable since bullseye,
released in 2021. supporting Debian oldstable for more than a year
seems more than sufficient time to give Debian folks to upgrade,
and bullseye is set to become `oldstable` later this year with the
release of `bookworm`, likely this summer.

This also allows us to clean up our MSRV substantially, having a
single MSRV across our crates rather than a number of separate
ones. Sadly, windows already requires 1.49.
2023-03-15 18:11:43 +00:00
Elias Rohrer
73306a3503
Pin tokio to 1.26 on windows to fix CI 2023-03-12 14:12:21 +01:00
Elias Rohrer
7a30f3e118
Support HTTPS Esplora endpoints via new feature
To support HTTPS endpoints, the async HTTP library `reqwest` needs one of
the `-tls` features enabled. While the users could specify this in their
own cargo dependencies, we here provide a new `esplora-async-https`
feature for conveinience.
2023-03-08 19:25:23 +01:00
Matt Corallo
1a18b881bb Do not auto-select the lightning std feature from tx-sync crate
We have some downstream folks who are using LDK in wasm compiled
via the normal rust wasm path. To ensure nothing breaks they want
to use `no-std` on the lightning crate, disabling time calls as
those panic. However, the HTTP logic in
`lightning-transaction-sync` gets automatically stubbed out by the
HTTP client crates when targeting wasm via `wasm_bindgen`, so it
works fine despite the std restrictions.

In order to make both work, `lightning-transaction-sync` can remain
`std`, but needs to not automatically enable the `std` flag on the
`lightning` crate, ie by setting `default-features = false`. We do
so here.
2023-03-03 19:26:14 +00:00
Matt Corallo
22662efbc4 Export RUST_BACKTRACE=1 in --feature backtrace CI test
as this test often fails on windows which is hard to debug locally
for most contributors.
2023-02-28 01:06:35 +00:00
Matt Corallo
64a7567928 Move lightning-transaction-sync out of the main workspace
Because `lightning-transaction-sync` does not have an MSRV (and
because its dev-dependencies are huge), we can't build it by
default when devs run `cargo test`, so it is moved out of the
top-level workspace.
2023-02-27 19:01:29 +00:00
Matt Corallo
0fc5a3ae0f Remove the lightning-transaction-sync MSRV
Apparently it has dependencies that don't track an MSRV at all, so
we can't practically enforce one in CI.
2023-02-27 18:28:40 +00:00
Jeffrey Czyz
9876a08aab
Add CI testing for lightning-custom-message crate 2023-02-14 18:20:56 -06:00
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