# Because the function is unused it gets dropped before we link lightning, so
# we have to duplicate build.rs here. Note that this is only required for
# fuzztarget mode.
-build = "../build.rs"
[package.metadata]
cargo-fuzz = true
[features]
afl_fuzz = ["afl"]
honggfuzz_fuzz = ["honggfuzz"]
+libfuzzer_fuzz = ["libfuzzer-sys"]
[dependencies]
+afl = { version = "0.4", optional = true }
lightning = { path = "..", features = ["fuzztarget"] }
-bitcoin = { version = "0.13", features = ["fuzztarget"] }
-secp256k1 = { version = "0.9", features=["fuzztarget"] }
-rust-crypto = "0.2"
+bitcoin = { version = "0.20", features = ["fuzztarget"] }
+bitcoin_hashes = { version = "0.7", features = ["fuzztarget"] }
+hex = "0.3"
honggfuzz = { version = "0.5", optional = true }
-afl = { version = "0.3", optional = true }
+secp256k1 = { version = "0.15", features=["fuzztarget"] }
+libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git", optional = true }
[build-dependencies]
-gcc = "0.3"
+cc = "1.0"
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
+[profile.release]
+lto = true
+codegen-units = 1
+
[[bin]]
name = "peer_crypt_target"
path = "fuzz_targets/peer_crypt_target.rs"
-[[bin]]
-name = "channel_target"
-path = "fuzz_targets/channel_target.rs"
-
[[bin]]
name = "full_stack_target"
path = "fuzz_targets/full_stack_target.rs"
[[bin]]
-name = "channelmonitor_deserialize_target"
-path = "fuzz_targets/channelmonitor_deserialize_target.rs"
+name = "chanmon_fail_consistency"
+path = "fuzz_targets/chanmon_fail_consistency.rs"
+
+[[bin]]
+name = "router_target"
+path = "fuzz_targets/router_target.rs"
+
+[[bin]]
+name = "chanmon_deser_target"
+path = "fuzz_targets/chanmon_deser_target.rs"
# message fuzz targets
[[bin]]
name = "msg_ping_target"
-path = "fuzz_targets/msg_ping_target.rs"
+path = "fuzz_targets/msg_targets/msg_ping_target.rs"
[[bin]]
name = "msg_pong_target"
-path = "fuzz_targets/msg_pong_target.rs"
+path = "fuzz_targets/msg_targets/msg_pong_target.rs"
+
+[[bin]]
+name = "msg_error_message_target"
+path = "fuzz_targets/msg_targets/msg_error_message_target.rs"
+
+[[bin]]
+name = "msg_update_add_htlc_target"
+path = "fuzz_targets/msg_targets/msg_update_add_htlc_target.rs"
[[bin]]
name = "msg_accept_channel_target"
name = "msg_shutdown_target"
path = "fuzz_targets/msg_targets/msg_shutdown_target.rs"
-[[bin]]
-name = "msg_update_add_htlc_target"
-path = "fuzz_targets/msg_targets/msg_update_add_htlc_target.rs"
-
[[bin]]
name = "msg_update_fail_malformed_htlc_target"
path = "fuzz_targets/msg_targets/msg_update_fail_malformed_htlc_target.rs"
[[bin]]
name = "msg_update_fail_htlc_target"
path = "fuzz_targets/msg_targets/msg_update_fail_htlc_target.rs"
+
+[[bin]]
+name = "msg_channel_reestablish_target"
+path = "fuzz_targets/msg_targets/msg_channel_reestablish_target.rs"
+
+[[bin]]
+name = "msg_announcement_signatures_target"
+path = "fuzz_targets/msg_targets/msg_announcement_signatures_target.rs"
+
+[[bin]]
+name = "msg_channel_announcement_target"
+path = "fuzz_targets/msg_targets/msg_channel_announcement_target.rs"
+
+[[bin]]
+name = "msg_channel_update_target"
+path = "fuzz_targets/msg_targets/msg_channel_update_target.rs"
+
+[[bin]]
+name = "msg_decoded_onion_error_packet_target"
+path = "fuzz_targets/msg_targets/msg_decoded_onion_error_packet_target.rs"
+
+[[bin]]
+name = "msg_init_target"
+path = "fuzz_targets/msg_targets/msg_init_target.rs"
+
+[[bin]]
+name = "msg_node_announcement_target"
+path = "fuzz_targets/msg_targets/msg_node_announcement_target.rs"
+
+[[bin]]
+name = "msg_onion_hop_data_target"
+path = "fuzz_targets/msg_targets/msg_onion_hop_data_target.rs"