Commit graph

68 commits

Author SHA1 Message Date
optout
aa2f6b47df
Upgrade bech32 dependency, bech32 serialization improvements 2024-10-02 21:21:07 +02: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
Arik Sosman
176d2ad599
Upgrade rust-bitcoin to 0.32.2. 2024-08-16 10:31:45 -07:00
Tobin C. Harding
aeee8fe31e
Remove explicit dependency on hex-conservative
The `hex` crate is re-exported by `rust-bitcoin` so we can get it from
there instead of explicitly depending on it. Doing so reduces the
maintenance burden and helps reduce the likelyhood of getting two
versions in the dependency graph.
2024-08-09 08:20:09 +10:00
Jiri Jakes
a8bd4c097f
Upgrade rust-bitcoin to 0.31 2024-05-30 18:35:29 +08:00
Matt Corallo
d14ea82b5d Move existing BOLT11 fuzz test to the fuzz crate 2024-05-08 19:36:15 +00:00
Matt Corallo
3096061bef Drop ahash dependency in favor of core's SipHasher
https://github.com/tkaitchuck/aHash/pull/196 bumped the MSRV of
`ahash` in a patch release, which makes it rather difficult for us
to have it as a dependency.

Further, it seems that `ahash` hasn't been particularly robust in
the past, notably
https://github.com/tkaitchuck/aHash/issues/163 and
https://github.com/tkaitchuck/aHash/issues/166.

Luckily, `core` provides `SipHasher` even on no-std (sadly its
SipHash-2-4 unlike the SipHash-1-3 used by the `DefaultHasher` in
`std`). Thus, we drop the `ahash` dependency entirely here and
simply wrap `SipHasher` for our `no-std` HashMaps.
2024-02-16 20:34:41 +00:00
Matt Corallo
dedc8306f6 Bump hashbrown dependency to 0.13
While this isn't expected to materially improve performance, it
does get us ahash 0.8, which allows us to reduce fuzzing
randomness, making our fuzzers much happier.

Sadly, by default `ahash` no longer tries to autodetect a
randomness source, so we cannot simply rely on `hashbrown` to do
randomization for us, but rather have to also explicitly depend on
`ahash`.
2024-02-02 18:05:08 +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
Wilmer Paulino
ec928d55b4
Bump rust-bitcoin to v0.30.2 2023-11-22 15:58:01 -08:00
Matt Corallo
358d980e64 Always set _test_utils when building lightning for some tests
This ensures that we hit additional assertions which are intended
to always be run in tests.
2023-01-17 23:47:45 +00:00
Matt Corallo
fb5b427cba Make fuzz assertions explicit in Cargo.toml 2023-01-15 23:32:09 +00:00
Matt Corallo
7bdbbca3b0 Switch to hashbrown in fuzzing
hashbrown by default uses ahash, which may be a bit faster, but
more importantly, if we upgrade to hashbrown 0.13/ahash 0.8 we can
make it use a constant randomization factor, making fuzzers happier.
2023-01-15 23:31:06 +00:00
Matt Corallo
3259996e50 Bump fuzz afl dependency to latest upstream version 2023-01-15 23:31:06 +00:00
Wilmer Paulino
f4f1093edc
Bump workspace to rust edition 2018
Mostly motivated by the need of async/await.
2022-10-21 14:47:34 -07:00
Matt Corallo
7223f70616 Drop honggfuzz arbitrary dependency to meet MSRV 2022-08-30 15:15:00 +00:00
Devrandom
7e05623bef Update bitcoin crate to 0.29.0 2022-08-11 00:21:26 +02:00
Matt Corallo
353b1e7e46 Update libfuzzer-sys to new upstream inclusion method
Dunno why they changed it, but the old "depend directly on git"
thing that cargo-fuzz used forever is now deprecated that that
repo is archived, they've now moved to another repo and publish
properly on crates.io.
2022-08-07 19:02:33 +00: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
Devrandom
28d33ff9e0 bitcoin crate 0.28.1 2022-05-05 18:04:42 +02: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
3f229052ea Bump dependencies to bitcoin 0.27 and bech32 0.8 2021-07-31 18:29:07 +00:00
Matt Corallo
95f9523097 Drop rust-bitcoin crate patches in fuzz now that they're merged
These patches have been merged upstream and are in releases now so
we don't need to patch them locally.
2021-06-23 01:35:26 +00:00
Matt Corallo
2ef384db2d Fix fuzz secp patch by bumping the rust-secp version number in patch 2021-04-28 15:17:59 -04:00
Matt Corallo
33da665647 Use lowmemory mode for secp256k1 fuzzing, reducing memcpy time 2021-02-26 23:47:03 -05:00
Matt Corallo
4594f6eee5 Use rust-secp256k1 PR 282 and bitcoin_hashes PR 111 in fuzzing 2021-02-26 23:47:03 -05:00
Matt Corallo
a51d5cef58 Update rust-bitcoin 2021-02-26 15:15:18 -05:00
Matt Corallo
b9707da138 Update to latest upstream rust-bitcoin 2020-09-10 16:20:01 -04:00
Dr. Maxim Orlovsky
27079e04d7 Adopting new bitcoin hash types and crate version 2020-04-29 12:37:46 +02:00
Matt Corallo
6745aff9b6 Thread fuzz test cases
Adds threading (with logger capture) to fuzz targets so that we can
more effeciently test a failing fuzz corpus on new code changes.
2020-04-24 16:06:34 -04:00
Matt Corallo
6fc775da45 Bump bitcoin dep to 0.21 2019-12-11 18:17:54 -05:00
Matt Corallo
e28fd78e67 Refactor fuzzing to be a C-callable library plus rust binaries
This should help us avoid rust's at-load syscalls by calling the
tests from a C program.
2019-12-11 15:13:14 -05:00
Matt Corallo
9501ecce49 Move fuzz to top level. 2019-11-25 15:42:07 -05:00
RJ Rybarczyk
88fef649b1 Use workspaces to separate crates 2019-11-15 02:44:30 +00:00
Elichai Turkel
20302064a8
Update the fuzz and net-tokio crates 2019-08-24 11:05:38 -04:00
Matt Corallo
882f7307c8 Bump rust-bitcoin dep to 0.18 2019-06-01 07:40:21 -04:00
Tamas Blummer
02b541607b migration to rust-bitcoin 0.17
typedef Sha256dHash with bitcoin_hashes::sha256d::Hash
SecretKey -> PrivateKey.key
assume compressed public keys
2019-03-07 18:50:02 +01:00
Matt Corallo
49d63302c3 Add a fuzz target to test monitor update failure handling
Sadly this requires reducing the honggfuzz iterations to fit within
Travis' runtime limits.
2019-01-24 13:17:00 -05:00
Matt Corallo
12d25576c1 Upgrade to secp256k1 v12, bitcoin v16, and crates bitcoin_hashes 2019-01-22 13:49:15 -05:00
Matt Corallo
cdf9b4f8ba Add option to use libfuzzer sys in full_stack_target
Note that there doesn't appear to be a way to conditionally set
 #[no_main] so that has to happen manually at compile-time.
2019-01-08 14:04:06 -05:00
Matt Corallo
7ea39a13b2 Use bitcoin_hashes' fixed_time_eq, removing the rust-crypto dep 2018-12-19 20:02:36 -05:00
Matt Corallo
f1e400f142 Switch Sha256 to using bitcoin_hashes and our own HKDF 2018-12-19 17:13:25 -05:00
Matt Corallo
3a066ccbf2 Ensure fuzz release builds use codegen-units=1 and LTO 2018-11-18 16:17:06 -05:00
Steven Roose
7ff7561f2d Update to rust-bitcoin v0.15 2018-11-14 11:43:54 +00:00
Matt Corallo
da6171d50d Remove fuzz channel_target.
It has bitrotted a lot and doesn't really make sense given all the
precondition enforcement that is in channelmanager, sadly.
2018-09-19 22:47:07 -04:00
Yuntai Kyong
63cb37d346 Add fuzz targets for Writeable messages/migrate fuzz test 2018-09-12 10:19:36 -04:00
Matt Corallo
335012640a Update msg_targets with new, must-roundtrip, and hole messages 2018-08-29 18:04:55 -04:00
Matt Corallo
42e908883f Return a malformed HTLC message when ephemeral pubkey is garbage
This resolves a spec-compliance bug with BOLT 4 where we simply
failed to deserialize the message and thus could never return an
HTLC failure message. However, note that BOLT 4 incorrectly hints
that a non-malformed message should be used ("...MUST report a
route failure to the origin node") which we cannot do as we cannot
derive a SharedSecret to encrypt a regular update_fail_htlc message
2018-08-27 11:47:11 -04:00
Matt Corallo
755b76bf83 Update error deserialization in compliance with BOLT #1 2018-08-25 17:21:09 -04:00
Matt Corallo
11e5975523 Update to rust-secp256k1 v0.11 and rust-bitcoin v0.14 2018-08-23 14:52:43 -04:00