You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a195c8197c7029d13110cfb9c71df2fe2db5e079 fuzz: add compile_taproot fuzztest (Andrew Poelstra)
a6ca4cea5c042188aea108af526a5f7a3a02606d policy: clean up error types in compile_tr (Andrew Poelstra)
bedb6d707f84973e7076a9a56cce4d20a5686688 policy: unwrap a few impossible error cases in compile_tr (Andrew Poelstra)
a3338fb8386e78893c659b049e9bf4bbc6bb3c44 policy: use new tapleaf_probability_iter for num_tap_leaves (Andrew Poelstra)
3522703accce948357400108cb8e45a75977e611 policy: reduce error paths in Concrete::extract_key to one (Andrew Poelstra)
9f53c01c7c2d7c154f3b3a1289e628d40f64ca05 compiler: split segwit_limits test into 2 (Andrew Poelstra)
7de96d3507f3d725eff277c30e36360378c98444 policy: split up error enum for concrete and semantic (Andrew Poelstra)
Pull request description:
Right now our Taproot compiler does some complicated analysis to identify a key within a policy that may be extracted to use as an internal key. Specifically, if you look at the "disjunction tree" at the root of a policy, every leaf of this tree can be a tapbranch and any leaf which is just a pubkey-check and nothing else is a candidate to be the internal key.
However, our logic to do this is convoluted, has many unnecessary error paths, and lots of gratuitous allocations (which ironically make the code harder, not easier, to follow).
This PR smooths all that out by introducing a new iterator over the potential tapbranches of a policy (along with their probabilities). It also cleans up much of the error handling in the policy module, eliminating 3 calls to the stringly-typed `errstr` function.
ACKs for top commit:
sanket1729:
ACK a195c8197c7029d13110cfb9c71df2fe2db5e079
Tree-SHA512: 62278a0d778c4e68faf69f757d2ad2fedc43e6b213df7cf9fef6d5a898c6db9b18d5c9a753d974bad26cda693c5eb170bf5e5b28d14c7196d12d64fb6f49e712
0 commit comments