Skip to content

Commit

Permalink
qa: add a fuzz target generating random nodes from a binary encoding
Browse files Browse the repository at this point in the history
This is a "dumb" way of randomly generating a Miniscript node from
fuzzer input. It defines a strict binary encoding and will always generate
a node defined from the encoding without "helping" to create valid nodes.
It will cut through as soon as it encounters an invalid fragment so
hopefully the fuzzer can tend to learn the encoding and generate valid
nodes with a higher probability.

On a valid generated node a number of invariants are checked, especially
around the satisfactions and testing them against the Script
interpreter.

The node generation and testing is modular in order to later introduce
other ways to generate nodes from fuzzer inputs with minimal code.

Co-Authored-By: Pieter Wuille <pieter@wuille.net>
  • Loading branch information
darosior and sipa committed Feb 11, 2023
1 parent 611e125 commit 17e3547
Showing 1 changed file with 447 additions and 3 deletions.
Loading

0 comments on commit 17e3547

Please sign in to comment.