-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update from the Bitcoin Core PR #99
Merged
Merged
Conversation
This file contains 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
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
sipa
reviewed
Feb 18, 2022
@@ -937,6 +974,22 @@ struct Node { | |||
//! Return the expression type. | |||
Type GetType() const { return typ; } | |||
|
|||
//! Find the deepest insane sub. Null if there is none. | |||
NodeRef<Key> FindInsaneSub() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for (no objection to having it, just wondering)
Oh i forgot to remove it. It's added in the second PR in order to have better reporting for Miniscript descriptor parsing error.
-------- Original Message --------
…On Feb 18, 2022, 17:56, Pieter Wuille wrote:
@sipa commented on this pull request.
---------------------------------------------------------------
In [bitcoin/script/miniscript.h](#99 (comment)):
> @@ -937,6 +974,22 @@ struct Node {
//! Return the expression type.
Type GetType() const { return typ; }
+ //! Find the deepest insane sub. Null if there is none.
+ NodeRef<Key> FindInsaneSub() const {
What is this for?
—
Reply to this email directly, [view it on GitHub](#99 (review)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AFLK3FZYHEFZLPGFNMRUKE3U3Z22JANCNFSM5OX7QOOA).
Triage notifications on the go with GitHub Mobile for [iOS](https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or [Android](https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
ACK 55f2ede. I have a few nits, but I'll open a PR to address those afterwards. |
sipa
added a commit
that referenced
this pull request
Feb 18, 2022
… strict binary encoding 6b37a0c qa: add a fuzz target generating random nodes from a binary encoding (Antoine Poinsot) Pull request description: 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. ACKs for top commit: sipa: ACK 6b37a0c Tree-SHA512: 90afd2eff241014daab801966dd83496a5dcf634b9c9b314c238f5b517a17a90af0349d5f505dabf82f4718c1ca19753e9de88b834d8e9518a7497d1a5c6d08e
This was referenced Feb 19, 2022
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
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 #90. There are a few invasive refactorings. The rename from
NodeType
toFragment
can be more easily reviewed with--word-diff
.