Skip to content

feat(fuzz): add gossipsub message decode fuzz target#820

Open
wangzishuai1987 wants to merge 1 commit into
jarchain:masterfrom
wangzishuai1987:feat/fuzz-gossipsub-message
Open

feat(fuzz): add gossipsub message decode fuzz target#820
wangzishuai1987 wants to merge 1 commit into
jarchain:masterfrom
wangzishuai1987:feat/fuzz-gossipsub-message

Conversation

@wangzishuai1987
Copy link
Copy Markdown

Summary

  • Add fuzz_gossipsub_message fuzz target that decodes arbitrary bytes as each gossipsub topic message type (Block, FinalityVotes, Guarantee, Assurance, Ticket, EquivocationEvidence, Announcements)
  • Verifies that decoding arbitrary network bytes never panics — the core safety property for message handlers

Context

This addresses the fuzz_gossipsub_message item from #229 (Property-based testing and fuzzing infrastructure):

fuzz_gossipsub_message: random network message bytes → handler doesn't panic

Test plan

  • cargo build -p grey-fuzz --bin fuzz_gossipsub_message compiles
  • Run cargo fuzz run fuzz_gossipsub_message for 60+ seconds — no panics

Fuzz all gossipsub topic message types (Block, FinalityVotes,
Guarantee, Assurance, Ticket, EquivocationEvidence, Announcements)
to verify that decoding arbitrary bytes never panics.

Ref: jarchain#229
@github-actions
Copy link
Copy Markdown
Contributor

Genesis Review

Comparison targets:

How to review

Post a comment with the following format (rank from best to worst):

/review
difficulty: <commit1>, <commit2>, ..., <commitN>, currentPR
novelty: <commit1>, <commit2>, ..., <commitN>, currentPR
design: <commit1>, <commit2>, ..., <commitN>, currentPR
verdict: merge

Use the short commit hashes above and currentPR for this PR.
Each line ranks all comparison targets + this PR from best to worst.

To meta-review another reviewer's comment, react with 👍 or 👎.

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.

1 participant