Skip to content

test: add fuzz testing setup for BOLT8 and BOLT11 #42

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 7 commits into
base: main
Choose a base branch
from

Conversation

thgO-O
Copy link
Contributor

@thgO-O thgO-O commented Apr 3, 2025

This PR introduces fuzz testing infrastructure and initial fuzzers for the BOLT8 (act1, act2) and BOLT11 (invoice roundtrip) implementations. The fuzzers are integrated using SharpFuzz and AFL.

Included changes:

  • ActOneFuzzer
  • ActTwoFuzzer
  • InvoiceRoundTripFuzzer
  • fuzz.ps1 script to instrument and run fuzzers with AFL
  • install-fuzz-tools.sh to install afl-fuzz and SharpFuzz.CommandLine

How to run locally:

Before running the fuzzers, make sure the required tools are installed. You can use the included script install-fuzz-tools.sh

Each fuzzer project includes a commented PowerShell command inside the Main method showing how to instrument and run it with AFL:

ActOne (BOLT8 act1)

pwsh ../../fuzz.ps1 ActOneFuzzer.csproj -i Testcases

ActTwo (BOLT8 act2)

pwsh ../../fuzz.ps1 ActTwoFuzzer.csproj -i Testcases

Invoice roundtrip (BOLT11)

pwsh ../../fuzz.ps1 InvoiceRoundTripFuzzer.csproj -i Testcases

Suggestions or feedback are very welcome. Let me know if you'd like adjustments to better fit the project goals.

closes #37

@thgO-O thgO-O force-pushed the test/add-fuzztests branch from 22cc16c to 3d8f065 Compare April 10, 2025 03:12
@thgO-O thgO-O force-pushed the test/add-fuzztests branch from 3d8f065 to 2f9f0d0 Compare April 14, 2025 23:13
@thgO-O thgO-O force-pushed the test/add-fuzztests branch from 2f9f0d0 to f038ac5 Compare April 15, 2025 00:18
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 Testing
1 participant