--- Log opened Sat Mar 19 00:00:30 2022 10:56 < jeremyrubin> sanket1729: hey i think i found a relatively big bug in the PSBT Satisfier logic 10:57 < jeremyrubin> it seems more than just CTV logic would be impacted, but naturally my test case is CTV based 10:58 < jeremyrubin> bug is in construct_tap_witness, the call to satisfy with PsbtInputSatisfier leads to a type downcast of the satisfier type to use a different impl of the trait than intended 11:00 < jeremyrubin> view the last patch here https://github.com/rust-bitcoin/rust-miniscript/compare/master...sapio-lang:debug-error?expand=1 11:00 < jeremyrubin> "add printouts for debugging" 11:01 < jeremyrubin> tracing outputs something like this: 11:01 < jeremyrubin> Looking up Key Sig 11:01 < jeremyrubin> Parsed 11:01 < jeremyrubin> Satifying mall =true 11:01 < jeremyrubin> Using Correct CTV Satisfier 11:01 < jeremyrubin> Checking Manually true 11:01 < jeremyrubin> ERROR: Using Default CTV Satisfier 11:01 < jeremyrubin> satisfy_malleable: Checking Manually false 11:01 < jeremyrubin> Evaluating: [B/zufsm]t:[V/zfsm]txtmpl(4ae59a56fdecf9cdf46d1c85037bbf0ea1eed0bc49027cc860e203ed127a40c5) 11:01 < jeremyrubin> ERROR: Using Default CTV Satisfier 11:01 < jeremyrubin> Got: false 11:01 < jeremyrubin> so you can see when we call into satisfy_malleable, the method available becomes corrupted 11:02 < jeremyrubin> I'd guess that this also impacts *all* clauses, not just CTV 11:02 < jeremyrubin> IIRC this didn't used to be an issue (e.g., i had a rev that didn't have this finalization bug), so probably got introduced some time in the last few weeks. 11:03 < jeremyrubin> here's an example PSBT https://gist.github.com/JeremyRubin/825572ea5a7f61f612f5b035b044fec2 11:29 < jeremyrubin> sanket1729: this can be fixed IMO by moving to &dyn Satisfier 11:49 < jeremyrubin> hmm maybe this can also be fixed because the deref impls 12:01 < jeremyrubin> yeah, so fixing my satisfier impls for &S and &mut S did the trick --- Log closed Sun Mar 20 00:00:31 2022