Skip to content

Add fuzz coverage for SV1 JSON-RPC messages#2163

Open
0xjc65eth wants to merge 1 commit into
stratum-mining:mainfrom
0xjc65eth:add-sv1-fuzz-targets
Open

Add fuzz coverage for SV1 JSON-RPC messages#2163
0xjc65eth wants to merge 1 commit into
stratum-mining:mainfrom
0xjc65eth:add-sv1-fuzz-targets

Conversation

@0xjc65eth
Copy link
Copy Markdown

Summary

  • add deserialize_sv1_json_rpc to fuzz arbitrary SV1 JSON-RPC bytes through serde and method parsing
  • add roundtrip_sv1_messages to generate representative SV1 client/server messages and round-trip them through JSON-RPC parsing
  • wire the sv1_api crate into the existing fuzz manifest

Closes #2124.

Testing

  • cargo +1.89.0 check --manifest-path fuzz/Cargo.toml --bin deserialize_sv1_json_rpc --bin roundtrip_sv1_messages
  • cargo +nightly fuzz run deserialize_sv1_json_rpc -- -max_total_time=5
  • cargo +nightly fuzz run roundtrip_sv1_messages -- -max_total_time=5

late bytes still tell the truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add fuzz coverage for sv1 crate

2 participants