Pseudo-random node generation from fuzzer's input using a strict binary encoding#100
Merged
Conversation
We are going to add a couple of fuzz target generating random Miniscript nodes instead.
There are a few invasive changes that were made following review of the first Bitcoin Core PR: - Renaming NodeType to Fragment - Refactoring various switchs for better readability - Refactoring DecodeScript to use less long lines for parsing of hash fragments
This is the "dumb" version of the Miniscript node generation 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. Co-Authored-By: Pieter Wuille <pieter@wuille.net> who made (a previous version of) this non-recursive.
Contributor
Author
|
A first review happened there: darosior/bitcoin@f003bba. This fixes most of the comment but the one regarding |
Owner
|
ACK 6b37a0c |
sipa
added a commit
that referenced
this pull request
Feb 21, 2022
827ed1b Remove leftover types set (Pieter Wuille) b18669a More auto types (Pieter Wuille) 328fabd Remove redundent ComputeScriptLen expression (Pieter Wuille) 492fced Simplify FindInsaneSub (Pieter Wuille) 5fc20e9 Rename s/NodeType/Fragment/ in compiler (Pieter Wuille) a516e1a Improvements for ParseKey / ParseHexStr (Pieter Wuille) Pull request description: Top commit has no ACKs. Tree-SHA512: 41e3a31a2de9df4bb1055c796d6c54a32646b4b7bc54df175a4beaf41298890810fe35d53f645017af11068139d4b6cbf0bee25b67dfbb9d3882f0e4288a1835
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Based on #99 .
This is the "dumb" version of the Miniscript node generation 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.