Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ level = "forbid"
check-cfg = [
"cfg(fuzzing)",
"cfg(secp256k1_fuzz)",
"cfg(hashes_fuzz)",
"cfg(test)",
"cfg(debug_assertions)",
"cfg(c_bindings)",
Expand Down
2 changes: 1 addition & 1 deletion ci/check-compiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ echo "Testing $(git log -1 --oneline)"
cargo check
cargo doc
cargo doc --document-private-items
cd fuzz && RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz" cargo check --features=stdin_fuzz
cd fuzz && RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz" cargo check --features=stdin_fuzz
cd ../lightning && cargo check --no-default-features
cd .. && RUSTC_BOOTSTRAP=1 RUSTFLAGS="--cfg=c_bindings" cargo check -Z avoid-dev-deps
2 changes: 1 addition & 1 deletion fuzz/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build]
rustflags = ["--cfg=fuzzing", "--cfg=secp256k1_fuzz", "--cfg=hashes_fuzz"]
rustflags = ["--cfg=fuzzing", "--cfg=secp256k1_fuzz"]
1 change: 0 additions & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ level = "forbid"
check-cfg = [
"cfg(fuzzing)",
"cfg(secp256k1_fuzz)",
"cfg(hashes_fuzz)",
]
2 changes: 1 addition & 1 deletion fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To run fuzzing using `cargo-fuzz / libFuzzer`, run

```shell
rustup install nightly # Note: libFuzzer requires a nightly version of rust.
export RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz"
export RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz"
cargo +nightly fuzz run --features "libfuzzer_fuzz" msg_ping_target
```
Note: If you encounter a `SIGKILL` during run/build check for OOM in kernel logs and consider
Expand Down
2 changes: 1 addition & 1 deletion fuzz/ci-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rm *_target.rs
[ "$(git diff)" != "" ] && exit 1
popd

export RUSTFLAGS="--cfg=secp256k1_fuzz --cfg=hashes_fuzz"
export RUSTFLAGS="--cfg=secp256k1_fuzz"

mkdir -p hfuzz_workspace/full_stack_target/input
pushd write-seeds
Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/base32_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/bech32_parse_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/bolt11_deser_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/chanmon_consistency_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/chanmon_deser_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/feature_flags_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/fromstr_to_netaddress_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/fs_store_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/full_stack_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/gossip_discovery_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/indexedmap_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/invoice_deser_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/invoice_request_deser_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/lsps_message_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_accept_channel_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_accept_channel_v2_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_announcement_signatures_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_blinded_message_path_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_channel_announcement_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_channel_details_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_channel_ready_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_channel_reestablish_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_channel_update_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_closing_complete_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_closing_sig_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_closing_signed_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_commitment_signed_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_decoded_onion_error_packet_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_error_message_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_funding_created_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_funding_signed_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_gossip_timestamp_filter_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_init_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_node_announcement_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
3 changes: 0 additions & 3 deletions fuzz/src/bin/msg_open_channel_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#[cfg(not(fuzzing))]
compile_error!("Fuzz targets need cfg=fuzzing");

#[cfg(not(hashes_fuzz))]
compile_error!("Fuzz targets need cfg=hashes_fuzz");

#[cfg(not(secp256k1_fuzz))]
compile_error!("Fuzz targets need cfg=secp256k1_fuzz");

Expand Down
Loading
Loading