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 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" 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" 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"