Skip to content

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
@nGoline nGoline force-pushed the main branch 4 times, most recently from 8c2ed97 to 65b7224 Compare May 21, 2025 14:39
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