--- Day changed Wed Jun 03 2020 03:19 -!- afk11` [~afk11@gateway/tor-sasl/afk11] has quit [Remote host closed the connection] 03:20 -!- afk11` [~afk11@gateway/tor-sasl/afk11] has joined ##miniscript 07:15 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has quit [Quit: ZNC 1.7.5 - https://znc.in] 07:15 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has joined ##miniscript 07:26 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has quit [Read error: Connection reset by peer] 07:26 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has joined ##miniscript 08:19 -!- dr-orlovsky [~Dr_Orlovs@31.14.40.19] has quit [Remote host closed the connection] 08:32 -!- dr-orlovsky [~Dr_Orlovs@31.14.40.19] has joined ##miniscript 11:09 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has joined ##miniscript 11:12 < sanket1729> andytoshi, there is lot of code bloat caused selectively supporting 65 bytes pubkeys for non-segwit descriptors, can we just support 33 bytes only? 11:13 < sanket1729> Basically we are reusing miniscript creation in sh and wsh, and that involves passing down a commpressed flag through all the function calls. 11:15 < sanket1729> If you can think of a better way of doing it, that would be great. Otherwise the current candidate solution basically passes allow_uncompressed flag all through all the recursive calls of FromTree trait. 11:52 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has quit [Ping timeout: 260 seconds] 12:32 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has joined ##miniscript 12:40 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has quit [Ping timeout: 252 seconds] 12:45 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has joined ##miniscript 13:45 < andytoshi> sanket1729: i'm going back and forth on this 13:45 < andytoshi> one thing (which i mentioned on the issue) is that we're going to have a similar issue with taproot 13:45 < andytoshi> where we have a couple new functions that are taproot-only and a couple thnigs that are non-taproot 13:46 < andytoshi> and we'll wind up having to thread shit through everything in a similar way 13:46 < sanket1729> xfinity was down and bouncer was not working. So, I have missed all messages after before "i'm going back and forth on this" if there were any 13:46 < andytoshi> ah cool 13:46 < andytoshi> there were not :) 13:47 < andytoshi> i just switched to this, to procrastinate on some other thing :P 13:47 < sanket1729> I like the idea of having descriptor context 13:47 < andytoshi> sanket1729: so ... i wonder if we should make Descriptor a trait rather than an enum 13:47 < sanket1729> seems more conceptually cleaner 13:47 < andytoshi> and have certain descriptors (Wsh, Wpkh) have tighter restrictions on the kinds of Miniscripts they can contain 13:48 < andytoshi> (i think we might run into trouble with the trait system if we get too clever here ... but i'm just spitballing) 13:49 < andytoshi> BTW currently we disable some miniscript stuff for non-segwit 13:49 < andytoshi> e.g. or_i i think 13:49 < andytoshi> how is it that we do this? 13:50 < sanket1729> I think pass a enum in types 13:50 < sanket1729> LegacySafe 13:50 < andytoshi> ah that's right 13:50 < sanket1729> or SegwitOnly 13:51 < andytoshi> hmm, so, what would be cool is if we could pull that flag out into the Rust type system 13:51 < andytoshi> and however we do that, we can do the same for compressed pubkeys 13:51 < andytoshi> and the same for taproot-only stuff 13:53 < andytoshi> oh, i think i have an idea how to do this actually 13:54 < andytoshi> sanket1729: so, consider https://github.com/apoelstra/rust-miniscript/blob/master/src/miniscript/mod.rs#L128-L130 13:54 < andytoshi> we can split `Miniscript` into a type parameterized by bitcoin version (legacy, segwit v0, segwit v1) 13:54 < andytoshi> and have different impls for that specific function, depending on the parameter 13:54 < andytoshi> which check the `legacy_safe` type, check pubkey compressedness, whatever 13:54 < andytoshi> and return errors there 13:55 < andytoshi> then 13:55 < sanket1729> Yup, I like the idea 13:55 < andytoshi> we can split `Descriptor` out from an enum into a set of disparate types which implement some `Descriptor` trait 13:55 < andytoshi> or maybe we don't even need to do that 13:55 < andytoshi> we just change the enum variants, rather than being like `Wsh(Minisrcipt)` 13:56 < andytoshi> to be `Wsh(Miniscript)` 13:56 < andytoshi> then users who are using descriptors for everything (ideally, all users) will get the right types (and right parser behavior) 13:56 < andytoshi> without even needing to explicitly annotate their types 13:57 < andytoshi> can you tackle this or want me to? I'll need a couple days 13:58 < sanket1729> I can tackle this, but I am not sure about some details, but I can figure it out. 13:59 < sanket1729> I get the idea, I will write the miniscript enum and then we can discuss 14:07 < andytoshi> ok, dope 14:07 < andytoshi> oh - one thing that might not be clear 14:07 < andytoshi> is that i think we can make the version thing a dummy type, like we do for rust-secp contexts 14:08 < andytoshi> i.e. have a sealed trait DescriptorContext 14:08 < andytoshi> and dummy types Legacy, SegwitV0 which implement these 14:08 < andytoshi> by "dummy types" i mean void types (empty enums) 17:22 -!- sanket1729_ [~sanket172@2601:240:8100:9380:4c88:9301:6cdd:e53e] has joined ##miniscript 17:27 -!- sanket1729_ [~sanket172@2601:240:8100:9380:4c88:9301:6cdd:e53e] has quit [Quit: Leaving] 20:24 -!- sanket1729 [~sanket172@2601:240:8100:9380:9124:8e2b:7647:f42d] has quit [Ping timeout: 260 seconds] 22:29 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has quit [Quit: ZNC 1.7.5 - https://znc.in] 22:30 -!- harrigan [~harrigan@ptr-93-89-242-235.ip.airwire.ie] has joined ##miniscript