--- Log opened Sat Feb 06 00:00:38 2021 03:22 -!- afilini [~user@gateway/tor-sasl/afilini] has quit [Remote host closed the connection] 03:23 -!- afilini [~user@gateway/tor-sasl/afilini] has joined ##miniscript 05:30 < dr_orlovsky> apoelstra: I need to cover script generation for LN-related outputs, and I can't use miniscript for that as is today. So the question: is it possible to have a dedicated miniscript terminal code for embedding custom raw bitcoin script? 05:31 < dr_orlovsky> Otherwise descriptor type system must have a non-miniscript version and it complicates all type system (for instance in case of wallet) A LOT 05:33 < dr_orlovsky> Another point: can we have a deterministic detection whether a given bitcoin script can be represented with miniscript in such form that with script1 -> miniscript -> script2 we will have script1 = script2? 05:34 < dr_orlovsky> (of course we can always try the conversion, but I am talking about analytical detection) 05:37 < darosior> dr_orlovsky: miniscript <-> Bitcoin Script is deterministic 05:37 < dr_orlovsky> nope 05:37 < dr_orlovsky> miniscript -> Bitcoin Script is deterministic 05:37 < dr_orlovsky> and Bitcoin script -> miniscript is deterministic 05:38 < dr_orlovsky> but what I am talking about is not determinism 05:38 < dr_orlovsky> miniscript::parse(bitcoin_script).compile() != bitcoin_script 05:38 < dr_orlovsky> sometimes at least 05:39 < dr_orlovsky> that's why you can't represent LN outputs with miniscript to get a correct bitcoin script for them - checked that with sipa 05:39 < darosior> It is, or at least should be. Also you said "nope" but then kinda demonstrated it yourself.. See https://github.com/rust-bitcoin/rust-miniscript/blob/master/fuzz/fuzz_targets/roundtrip_miniscript_script.rs 05:40 < darosior> And current LN Scripts are not Miniscript-compatible 05:41 < darosior> I have a proposal for converting them somewhere.. Will start a discussion on the lightning-RFC soon :tm: 05:42 < dr_orlovsky> leaving terminology aside, I need to represent existing "non-miniscript" compatible LN output as a descriptor using miniscript. It is not possible today. I am asking to make it possible by adding some sort of `raw` terminal to miniscript 05:43 < dr_orlovsky> "can we have a deterministic detection" - replace it with "can we have a miniscript compatibility detection for a given bitcoin script" if you like 05:49 < dr_orlovsky> re lightning-rfc: even if it will move on miniscript, software will still have to support previous version of the script outputs, so it will not solve type system problem 05:50 < andytoshi> dr_orlovsky: no, you cannot embed non-miniscript in minisrcipt 05:50 < andytoshi> there is no typesafe way to do this 05:50 < andytoshi> idk what you mean by miniscript::parse(bitcoin_script).compile(), miniscripts are never compiled 05:52 < dr_orlovsky> s/compile/encode/ 05:54 < dr_orlovsky> andytoshi: ok, thanks. This means we need non-miniscript descriptors additionally to miniscript-based descriptors 05:54 < andytoshi> yeah you could propose an HTLC descritpro 05:55 < andytoshi> or even implement one outside of rust-miniscript, now that we've turned it into a trait 05:56 < dr_orlovsky> not sure I understood what "propose an HTLC descritpro" means 06:00 < andytoshi> it means create a new Htlc struct and implement DescriptorTrait on it 06:01 < andytoshi> you could PR that to rust-miniscript, but you wouldn't have to, it'd work fine without being in the main lib 06:04 < dr_orlovsky> ok, I see 08:06 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has quit [Ping timeout: 258 seconds] 08:39 < dr_orlovsky> andytoshi, sanket1729: I think the problem (LN outputs as descriptors) can be solved by (1) adding to `ShInner` new variant `Script(ScriptTemplate)` and (2) doing `ScriptTemplate` which is a bitcoin Script able to abstract on key type (I already have its implementation elsewhere). Would you be ok with such approach? 08:39 < dr_orlovsky> I need it at miniscript library level so I can use `Descriptor` enum 08:41 < andytoshi> how are you going to implement any of DescriptorTrait on a generic script? 08:41 < andytoshi> how do you estimate fees? how do you construct witnesses? how do you determine satisfiability? 08:43 < dr_orlovsky> you are right, this will not work :( 09:13 -!- jonatack [~jon@88.124.242.136] has joined ##miniscript 09:18 -!- jonatack [~jon@88.124.242.136] has quit [Ping timeout: 265 seconds] 09:20 -!- jonatack [jon@gateway/vpn/airvpn/jonatack] has joined ##miniscript 11:03 -!- shesek [~shesek@164.90.217.137] has joined ##miniscript 11:03 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 11:03 -!- shesek [~shesek@unaffiliated/shesek] has joined ##miniscript 12:03 -!- darosior [~darosior@194.36.189.246] has quit [Quit: Ping timeout (120 seconds)] 12:03 -!- darosior [~darosior@194.36.189.246] has joined ##miniscript 16:45 -!- shesek [~shesek@unaffiliated/shesek] has quit [Remote host closed the connection] 17:39 -!- shesek [~shesek@164.90.217.137] has joined ##miniscript 17:39 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 17:39 -!- shesek [~shesek@unaffiliated/shesek] has joined ##miniscript --- Log closed Sun Feb 07 00:00:38 2021