--- Log opened Sun May 09 00:00:49 2021 01:27 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has quit [Read error: Connection reset by peer] 01:28 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has joined ##miniscript 02:20 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 02:21 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined ##miniscript 02:32 < sgeisler> I'm using rust-miniscript to satisfy all inputs of the global transaction of a PSBT using the PSBT satisfier. Am I correct in assuming this makes the finalization and extraction step of the PSBT workflow obsolete? The satisfier does not alter the PSBT and only works on the transaction, so I'd have to copy the transaction back into the PSBT afterwards otherwise which would feel odd (and it should be satisfied 02:32 < sgeisler> already afaik, so nothing else to do). 02:34 < darosior> sgeisler: hmm the satisfier does use the PSBT workflow, as it fills the finalized_witness (or similar name) on success 02:36 < sgeisler> darosior: Sure, but it does so in the raw tx and not the PSBT. Iiuc the normal workflow (for wsh) would be a finalizer putting the witness into final_script_witness field of the PSBT input and the extractor assembling a raw transaction from that. 02:37 < sgeisler> But the satisfier does not touch the PSBT and finalizes the raw tx in place 02:37 < darosior> sgeisler: it's not what it does? Just a sec, double checking 02:38 < darosior> You are talking about the finalizer, right 02:38 < darosior> It does fill the PSBT fields https://github.com/rust-bitcoin/rust-miniscript/blob/f550b9b87a26710db9228c47e84199611ccc7aa4/src/psbt/finalizer.rs#L293-L329 02:39 < sgeisler> I'm arguing that after calling satisfy (https://docs.rs/miniscript/5.1.0/miniscript/descriptor/trait.DescriptorTrait.html#method.satisfy) on all inputs there is nothing left to do for the finalizer or extractor 02:39 < sgeisler> because it does not do anything with the PSBT, only with raw tx inputs 02:41 < sgeisler> The PSBT is a mere data source as the PsbtInputSatisfier https://docs.rs/miniscript/5.1.0/miniscript/psbt/struct.PsbtInputSatisfier.html 02:41 < sgeisler> and the raw tx I'm working on can't even be the one in the PSBT because of borrowing rules (need mut borrow of raw tx inputs and immutable of PSBT) 02:42 < sgeisler> so either I'd copy it back in and do the finalization and extraction dance, which I did so far but am quite sure is useless, or just use the raw tx I've been working on directly 02:43 < darosior> oh, yea if you are not using the finalizer API then yes. Yes i ran into the borrowing rules too. And yes an "already finalized" PSBT is usually a very transient state 02:43 < darosior> Yeah now i doubt that i should do that too haha (i'm doing the finalization + extraction dance at the moment) 02:45 < sgeisler> I mean, that was the obvious thing to do when looking at it from a high level, but after banging my head against this for some time now it just feels silly. 02:49 < sgeisler> sanket1729, andytoshi: what would you say is the right way(tm) to use that API? 08:58 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has quit [Read error: Connection reset by peer] 09:23 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has joined ##miniscript 11:58 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has quit [Ping timeout: 240 seconds] 12:05 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has joined ##miniscript 12:10 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has quit [Quit: jonatack] 12:14 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has joined ##miniscript 16:40 -!- shesek [~shesek@unaffiliated/shesek] has quit [Remote host closed the connection] 16:41 -!- shesek [~shesek@164.90.217.137] has joined ##miniscript 16:41 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 16:41 -!- shesek [~shesek@unaffiliated/shesek] has joined ##miniscript --- Log closed Mon May 10 00:00:51 2021