Skip to content

[UT] Dbft fuzz #3905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

[UT] Dbft fuzz #3905

wants to merge 6 commits into from

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Apr 17, 2025

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)
  • 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?

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

Test Configuration:

  • .NET SDK: 9.0
  • SharpFuzz: Latest version

Checklist:

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

Jim8y added 3 commits April 17, 2025 23:10
* master:
  DBFTPlugin: include consensus time into block interval (neo-project#3900)
  Isolate unit tests (neo-project#3904)
  Use DateTime.UtcNow (neo-project#3902)
  Update workflow (neo-project#3901)
  optimize: show state more readable (neo-project#3899)
  Optimize KeyedCollectionSlim (neo-project#3877)
  Native: move MillisecondsPerBlock setting to native Policy (neo-project#3895)
  optimize: history command support (neo-project#3892)
  Ensure that view interops can't be changed outside (neo-project#3812)
@Jim8y Jim8y added NGD Review This pr is an UT/Benchmark PR, NGD can review. Unit Tests labels Apr 17, 2025
@shargon
Copy link
Member

shargon commented Apr 22, 2025

Are these fuzzers using the same engine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NGD Review This pr is an UT/Benchmark PR, NGD can review. Unit Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants