neo icon indicating copy to clipboard operation
neo copied to clipboard

[UT] Dbft fuzz

Open Jim8y opened this issue 10 months ago • 1 comments

Description

This PR adds a comprehensive fuzzing system for the DBFT consensus plugin. The fuzzing system is designed to test the robustness and correctness of the DBFT consensus algorithm by generating diverse test cases and simulating various scenarios, including Byzantine behavior, network partitions, and recovery processes.

The system includes:

  • A corpus generator that creates diverse test cases for all message types
  • A fuzzing harness that processes messages and checks invariants
  • Simulation of various consensus scenarios (normal consensus, view changes, recovery)
  • Long-term fuzzing support with checkpointing and reporting
  • Comprehensive documentation in the README.md

Fixes #N/A (This is a new feature, not fixing a specific issue)

Type of change

  • [ ] Optimization (the change is only an optimization)
  • [ ] Style (the change is only a code style for better maintenance or standard purpose)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How Has This Been Tested?

  • [x] Built and ran the fuzzing system locally
  • [x] Generated corpus files and verified their correctness
  • [x] Ran the fuzzer for extended periods to verify stability
  • [x] Verified that the fuzzer can detect intentionally introduced bugs

Test Configuration:

  • .NET SDK: 9.0
  • SharpFuzz: Latest version

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

Jim8y avatar Apr 17 '25 15:04 Jim8y

Are these fuzzers using the same engine?

shargon avatar Apr 22 '25 06:04 shargon

this is just a draft, incomplete and wont maintain further

Jim8y avatar Sep 22 '25 09:09 Jim8y