From 66f64f64ec4ec729615b81e0117e7ca8d876f3c7 Mon Sep 17 00:00:00 2001 From: jamillambert Date: Mon, 29 Dec 2025 09:44:12 +0000 Subject: [PATCH 1/4] Fix fuzz dependency Fix the incorrect `jsonrpc` dependency path and add the missing `cfg(jsonrpc_fuzz)` to `unexpected_cfgs`. --- fuzz/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index ac142228..10293ba5 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -11,13 +11,13 @@ cargo-fuzz = true [dependencies] honggfuzz = { version = "0.5.55", default-features = false } -jsonrpc = { path = "..", features = ["bitreq_http"] } +jsonrpc = { path = "../jsonrpc", features = ["bitreq_http"] } serde = { version = "1.0.103", features = [ "derive" ] } serde_json = "1.0" [lints.rust] -unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)'] } +unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)', 'cfg(jsonrpc_fuzz)'] } [[bin]] name = "bitreq_http" From f5a33ea928e93fbc1b2f3122cf4a7a6c2f5cd055 Mon Sep 17 00:00:00 2001 From: jamillambert Date: Mon, 29 Dec 2025 10:34:55 +0000 Subject: [PATCH 2/4] Update rustc version of fuzz job With rustc 1.65 there is an error running the fuzz job: `proc-macro2 v1.0.104` cannot be built because it requires rustc 1.68 or newer Update the job to use 1.75 --- .github/workflows/cron-daily-fuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron-daily-fuzz.yml b/.github/workflows/cron-daily-fuzz.yml index ca6569f0..9f87fe6d 100644 --- a/.github/workflows/cron-daily-fuzz.yml +++ b/.github/workflows/cron-daily-fuzz.yml @@ -35,7 +35,7 @@ jobs: key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - uses: dtolnay/rust-toolchain@stable with: - toolchain: '1.65.0' + toolchain: '1.75.0' - name: fuzz run: | if [[ "${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then From b392ab354d1c5f7679fd563f9d84e64c0ebc5012 Mon Sep 17 00:00:00 2001 From: jamillambert Date: Mon, 29 Dec 2025 10:28:46 +0000 Subject: [PATCH 3/4] Update lockfiles --- Cargo-minimal.lock | 52 ++++++++++++++++++++++++++++++++++++++++++++++ Cargo-recent.lock | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index 3af8e289..285aadad 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -388,6 +388,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" +[[package]] +name = "honggfuzz" +version = "0.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8319f3cc8fe416e7aa1ab95dcc04fd49f35397a47d0b2f0f225f6dba346a07" +dependencies = [ + "lazy_static", + "memmap2", + "rustc_version", + "semver", +] + [[package]] name = "httpdate" version = "1.0.3" @@ -445,6 +457,22 @@ dependencies = [ "socks", ] +[[package]] +name = "jsonrpc-fuzz" +version = "0.0.1" +dependencies = [ + "honggfuzz", + "jsonrpc", + "serde", + "serde_json", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + [[package]] name = "libc" version = "0.2.158" @@ -480,6 +508,15 @@ version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +[[package]] +name = "memmap2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +dependencies = [ + "libc", +] + [[package]] name = "miniz_oxide" version = "0.8.4" @@ -579,6 +616,15 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.37" @@ -709,6 +755,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.203" diff --git a/Cargo-recent.lock b/Cargo-recent.lock index dd1f64c8..5a19989a 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -388,6 +388,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" +[[package]] +name = "honggfuzz" +version = "0.5.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e8319f3cc8fe416e7aa1ab95dcc04fd49f35397a47d0b2f0f225f6dba346a07" +dependencies = [ + "lazy_static", + "memmap2", + "rustc_version", + "semver", +] + [[package]] name = "httpdate" version = "1.0.3" @@ -456,6 +468,22 @@ dependencies = [ "socks", ] +[[package]] +name = "jsonrpc-fuzz" +version = "0.0.1" +dependencies = [ + "honggfuzz", + "jsonrpc", + "serde", + "serde_json", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + [[package]] name = "libc" version = "0.2.169" @@ -491,6 +519,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +dependencies = [ + "libc", +] + [[package]] name = "miniz_oxide" version = "0.8.4" @@ -601,6 +638,15 @@ version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.44" @@ -731,6 +777,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.217" From 154c994ae8ec4d59e4199316915eb53486ff6ad3 Mon Sep 17 00:00:00 2001 From: jamillambert Date: Mon, 29 Dec 2025 10:29:08 +0000 Subject: [PATCH 4/4] Add fuzz to workspace --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c62e9a3a..d3231233 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [ "bitreq", "client", "jsonrpc", "node", "types"] +members = [ "bitreq", "client", "fuzz", "jsonrpc", "node", "types"] exclude = ["integration_test", "verify"] resolver = "2"