test: add fuzz testing setup for BOLT8 and BOLT11 #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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