Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #784: expression: implement parsing of policies and miniscripts…
… non-recursively 26c6dc3 miniscript: implement from_tree nonrecursively (Andrew Poelstra) 2c422af policy: make Concrete::from_tree non-recursive (Andrew Poelstra) 61a89a2 policy: make Semantic::from_tree non-recursive (Andrew Poelstra) 8a78025 miniscript: add constructors for all the terminals (Andrew Poelstra) Pull request description: This brings us to the end of my cached "rewrite expression module" branch, by making expression parsing non-recursive. The diff here is actually reasonably short but it's pretty invasive. Hopefully the new fuzz test from the last PR is enough to convince us of correctness. I have some more work to do in two directions: * Breaking up the two `Policy` types into a structs with inner enums (or possibly just a flat tree type), which will allow us to attach metadata to nodes and trees; after this, I will introduce the `ValidationParams` structure and start moving sanity/validation/parsing logic into there as suggested in #723. I have some incomplete commits in this direction but I probably want to redo them with lessons learned from the Taproot work. * Replacing the `TapTree` enum with a non-recursive type, which will let us replace the taproot iteration API with a more natural one (as well as getting some performance benefit). I have more-complete work on this, but I'm getting a bit hamstrung right now handling the difference between `MiniscriptKey` and `ToPublicKey` in this specialization-less language. ACKs for top commit: sanket1729: ACK 26c6dc3 Tree-SHA512: b576d779ec1bf495176867e8e35602e1ed8e2a6a9df99fb0058ab437f9e43cf680a0b3bd459c27ba4e21ac58f534b35f7cac6566273c66615d7dc47015243c9a
- Loading branch information