Commit graph

57 commits

Author SHA1 Message Date
Matt Corallo
2e7d924d9b Downgrade hashbrown to meet MSRV
`hashbrown` depends on `ahash` which depends on `once_cell`. Sadly,
in https://github.com/matklad/once_cell/issues/201 the `once_cell`
maintainer decided they didn't want to do the work of having an
MSRV policy for `once_cell`, making `ahash`, and thus `hashbrown`
require the latest compiler. I've reached out to `ahash` to suggest
they drop the dependency (as they could trivially work around not
having it), but until then we simply downgrade `hashbrown`.

`rust-bitcoin` also requires an older `hashbrown` so we're actually
reducing our total `no-std` code here anyway.
2022-09-22 15:06:42 +00:00
Matt Corallo
f5473d5051 Bump versions to lightning* 0.0.111 and lightning-invoice 0.19 2022-09-12 22:34:27 +00:00
Devrandom
7e05623bef Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
Matt Corallo
e10dfe4fd0 Bump crate versions to 0.0.110/invoice 0.18 2022-07-26 22:01:09 +00:00
Matt Corallo
156cc77753 Bump crate versions to 0.0.109/invoice 0.17 2022-07-01 16:05:33 +00:00
Matt Corallo
deac430f17 Update crate versions to 0.0.108/invoice 0.16 2022-06-10 14:53:23 +00:00
Jeffrey Czyz
b2e635f619
Bump crate versions to 0.0.107/invoice 0.15 2022-06-08 18:16:48 -05:00
shamardy
a87b53ae9a Update regex to 1.5.6 2022-06-01 17:25:15 +02:00
Devrandom
28d33ff9e0 bitcoin crate 0.28.1 2022-05-05 18:04:42 +02:00
Jeffrey Czyz
de8bb8d261
Bump crate versions to 0.0.106/invoice 0.14 2022-04-03 08:05:08 -05: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]
ca96bb7fb6
Update regex requirement from 0.1.80 to 0.2.11 in /lightning
Updates the requirements on [regex](https://github.com/rust-lang/regex) to permit the latest version.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/0.1.80...0.2.11)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-09 17:38:53 +00:00
Matt Corallo
def0628332 Bump crate versions to 0.0.105/invoice 0.13 2022-03-01 00:43:24 +00:00
Jeffrey Czyz
62b1e01ad9
Generate docs with features for docs.rs
Enable generating docs using --all-features or --features="std" where
applicable. Additionally, use doc_auto_cfg to tag items requiring a
feature.

https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg

This requires building with nightly, which is what is used by docs.rs.

https://docs.rs/about/builds

To test locally, use:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc ...
2022-02-18 15:38:31 -06:00
Matt Corallo
acb4c539f7 Drop fuzztarget feature entirely
Some time ago we started transitioning to `cfg(fuzzing)` instead of
exposing a full feature. Here we complete the transition.
2022-02-18 17:03:04 +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
dependabot[bot]
f39fa69b68
Update hex requirement from 0.3 to 0.4
Updates the requirements on [hex](https://github.com/KokaKiwi/rust-hex) to permit the latest version.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/compare/v0.3...v0.4.3)

---
updated-dependencies:
- dependency-name: hex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 22:05:49 +00:00
Matt Corallo
8f007c7dbb Check lockorders in tests with a trivial lockorder tracker 2022-01-14 15:35:58 +00:00
hackerrdave
d46c2a20e1 update repo name to use lightningdevkit 2021-12-26 22:53:16 -05:00
Matt Corallo
ec86e2a1a7 Bump versions to 0.0.104/invoice 0.12 2021-12-17 21:34:19 +00:00
Matt Corallo
c575429639 Drop allow_wallclock_use feature in favor of simply using std
Fixes #1147.
2021-12-16 18:33:24 +00:00
Elias Rohrer
3b4b74bc66 Add a new log-level for gossip messages. 2021-11-22 18:19:08 +01:00
Matt Corallo
2b837bb272 Bump crate versions to 0.0.103/invoice 0.11 2021-11-03 02:20:51 +00:00
Matt Corallo
f2e47e0db2 Bump crate versions to 0.0.102 and lightning-invoice 0.10 2021-10-18 18:32:36 +00:00
Matt Corallo
43fe3d55f1 Bump Crate versions to 0.0.101 (and invoice to 0.9) 2021-09-23 18:22:59 +00:00
Matt Corallo
11f78798d3 Update versions to 0.0.100 and lightning-invoice to 0.8 2021-08-17 18:55:07 +00:00
Devrandom
32d13a2ff8 Rename no_std feature to no-std
matches rust-bitcoin
2021-08-03 18:53:33 +02:00
Devrandom
0dfcacd22c Actual no_std support 2021-08-03 09:34:56 +02:00
Matt Corallo
3f229052ea Bump dependencies to bitcoin 0.27 and bech32 0.8 2021-07-31 18:29:07 +00:00
Devrandom
a0a3a6b204 Implement dummy Mutex, Condvar and RwLock 2021-07-20 20:59:18 +02:00
Matt Corallo
c9a8b26d58 Bump most crate versions to 0.0.99 and lightning-invoice to 0.7.0 2021-07-09 16:34:46 +00:00
Gene Ferneau
da7a851d47
Use hashbrown replacements for std equivalents 2021-06-18 21:54:21 +00:00
Matt Corallo
9c9081dfcb Bump versions to 0.0.98, lightning-invoice to 0.6.0 2021-06-08 21:08:29 +00:00
Matt Corallo
f551d5946b Bump versions to 0.0.14, lightning-invoice 0.5 2021-05-01 00:43:15 +00:00
Valentine Wallace
6f5d81631a
Make _test_utils depend on bitcoinconsensus feature 2021-04-29 18:39:47 -04:00
Matt Corallo
eeec6fac5c Update licenses and add missing fields in Cargo.toml files 2021-03-09 16:53:03 -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
a51d5cef58 Update rust-bitcoin 2021-02-26 15:15:18 -05:00
Valentine Wallace
12c735ab3a
Add PersistenceNotifier to ChannelManager
This will allow the ChannelManager to signal when it has new
updates to persist, and adds a way for ChannelManager persisters
to be notified when they should re-persist the ChannelManager
to disk/backups.

Feature-gate the wait_timeout function because the core
lightning crate shouldn't depend on wallclock time unless
users opt into it.
2021-02-19 15:00:43 -05:00
Matt Corallo
2ae6b3fad4 Add a trivial benchmark of calculating routes on today's graph
Sadly rust upstream never really figured out the benchmark story,
and it looks like the API we use here may not be long for this
world. Luckily, we can switch to criterion with largely the same
API if that happens before upstream finishes ongoing work with the
custom test framework stuff.

Sadly, it requires fetching the current network graph, which I did
using Val's route-testing script written to test the MPP router.
2021-02-15 16:51:51 -05:00
Matt Corallo
c07b4de983 Expose test_utils to fuzztarget (in addition to _test_utils feature) 2021-01-04 12:40:40 -05:00
Devrandom
2de29ae049 Introduce CommitmentTransaction, ChannelTransactionParameters
CommitmentTransaction maintains the per-commitment transaction fields needed to construct the associated bitcoin transactions (commitment, HTLC).  It replaces passing around of Bitcoin transactions.  The ChannelKeys API is modified accordingly.

By regenerating the transaction when implementing a validating external signer, this allows a higher level of assurance that all relevant aspects of the transactions were checked for policy violations.

ChannelTransactionParameters replaces passing around of individual per-channel fields that are needed to construct Bitcoin transactions.

Eliminate ChannelStaticData in favor of ChannelTransactionParameters.

Use counterparty txid instead of tx in channelmonitor update.
2020-12-30 13:40:18 -08:00
Matt Corallo
4aa8e9cda7 Bump version to 0.0.12 2020-11-24 16:35:20 -05:00
Valentine Wallace
4350cc615c
Put test utilities behind a feature flag.
The utilities will still be part of cfg(test). The purpose of this
is to enable other crates in the workspace to use the test utilities.
2020-10-16 11:30:33 -04:00
Matt Corallo
b9707da138 Update to latest upstream rust-bitcoin 2020-09-10 16:20:01 -04:00
Devrandom
ce0cecd50a export "unsafe_revoked_tx_signing" feature
Allows unsafe signing in dev code, such as functional testing of
justice transactions outside our crate.
2020-08-11 09:23:31 +02:00
joe.miyamoto
1fc6d6b5ee
Improve error message.
... for ChannelError and APIMisuseError
Before this commit, When rl returns error, we don't know
The actual parameter which caused the error.
By returning parameterised `String` instead of predefined `&'static str`,
We can give a caller improved error message.

TestLogger now has two additional methods
1. `assert_log_contains` which checks the logged messsage
  has how many entry which includes the specified string as a substring.
2. `aasert_log_regex` mostly the same with `assert_log_contains`
  but it is more flexible that caller specifies regex which has
  to be satisfied instead of just a substring.
For regex, tests now includes `regex` as dev-dependency.
2020-07-22 10:34:47 +09:00
Jeffrey Czyz
43eed8dd8b
Make test output deterministic
Tests use sources of randomness to produce seeds, preimages, secrets,
and ephemeral data. However, this makes comparing logs between different
test runs difficult. Remove uses of random number generators and the
current time in favor of fixed values in order to make the test output
deterministic.
2020-06-18 19:28:50 -07:00
Gleb Naumenko
6164a95267 Remove non-bitcoin chain helpers 2020-05-12 09:27:11 -04:00
Dr. Maxim Orlovsky
27079e04d7 Adopting new bitcoin hash types and crate version 2020-04-29 12:37:46 +02:00