--- Log opened Sat Jan 02 00:00:04 2021 00:17 -!- shesek [~shesek@unaffiliated/shesek] has quit [Remote host closed the connection] 02:29 -!- shesek [~shesek@164.90.217.137] has joined ##miniscript 02:29 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 02:29 -!- shesek [~shesek@unaffiliated/shesek] has joined ##miniscript 02:50 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 02:50 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined ##miniscript 07:43 < andytoshi> gah rust. how is this open for six years https://github.com/rust-lang/rust/issues/20041 10:42 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-cfnxwtjlejejrkke] has quit [Ping timeout: 272 seconds] 10:50 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-cohaxdkcyarvqtaz] has joined ##miniscript 11:13 < andytoshi> sanket1729: so, i'm about to PR to drop ToPkCtx, and add a (fallible) method for converting DescriptorPublicKeys to bitcoin::PublicKeys 11:14 < andytoshi> i added a bunch of convenience methods to TranslatePk so that it's not too hard to use anymore 11:14 < andytoshi> i'm just testing all the commits and then i'll push.. 11:35 < sanket1729> awesome 11:35 < sanket1729> looking forward to it 11:39 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-cohaxdkcyarvqtaz] has quit [Ping timeout: 260 seconds] 11:50 < andytoshi> heh, oops, i PR'd, but the fuzz part of my scripts was looking for tests in the wrong dir 11:50 < andytoshi> one moment 11:51 < andytoshi> and it wasn't trying to run `cargo test` in the fuzz directory 11:53 < andytoshi> i feel a bit bad for making you do that ToPkCtx thing :P 11:54 < sanket1729> I guess you undid all of it :p 11:58 < andytoshi> yep :P though i think that was much easier, it was mostly vim macros 12:06 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-krcbvlexiytkhjit] has joined ##miniscript 12:22 < sanket1729> reviewing it now. Looks pretty cool 12:29 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Ping timeout: 240 seconds] 12:29 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined ##miniscript 12:32 < andytoshi> pushed 12:32 < andytoshi> second-to-last commit has a single change in the fuzz tests 12:32 < andytoshi> hopefully that doesn't disrupt your review too much 13:31 < sanket1729> andytoshi: reviewed. just some minor thigns. Most of the diff was just ToPkCtx removal. 13:31 < sanket1729> However, I do think we should have better names instead of TranslatePk1/2 . I have to look up everytime what that is :P 13:38 < andytoshi> sanket1729: lol suggestions welcome 13:38 < andytoshi> the problem is that if i give them useful names then they're super long 13:39 < andytoshi> whereas as-written this is basically as though we had function name overloading, except that it's actually possible to look up the definition 14:03 < sanket1729> yup, struggling to come up with names. The best I have isTra nslatePk, TranslatePkSameHash, TranslateOnlyPk, TranslatePkHash160 14:05 < andytoshi> honestly i prefer the numbers 14:05 < andytoshi> they're annoying to write but they're easy to read 14:06 < andytoshi> well, i guess not, they all have the same signature don't they .. so you actually have to look up what it's doing 14:07 < andytoshi> though in the common case there are no hashes at all, and they all do the same thing 14:09 < sanket1729> My rationale is "we write only once, but read multiple times :P " 14:10 < andytoshi> sure, but there's readability value in having short names 14:10 < andytoshi> and -usually- the specific translate_pk method that you're calling doesn't matter 14:10 < sanket1729> yeah, that's true 14:10 < sanket1729> While reading code because of the context we are aware of what are translating to 14:11 < sanket1729> so, the method name does not matter that much 14:11 < sanket1729> We can keep it as it is. 14:15 < andytoshi> woulhd you like me to add commits to address your nits 14:15 < andytoshi> or replace existing ones 14:15 < sanket1729> adding is better :P 14:15 < andytoshi> sounds good 14:40 < andytoshi> ok pushed new commits 14:52 < sanket1729> awesome. Reviewing 14:54 < andytoshi> oops added one more commit which removes the check for hardened paths 14:55 < andytoshi> running CI matrix locally and also working on testing this with icboc 14:59 < andytoshi> hmm i think DescriptorXKey should impl MiniscriptKey 14:59 < andytoshi> that can wait though 15:20 < andytoshi> sighhhh rust 15:21 < andytoshi> so, translate_pk2 takes a Fn rather than a FnMut, which i had to do because i pass two copies of the closure to the inner translation function 15:21 < andytoshi> but if i create a closure with a mutable reference to a Nano S, that is not a Fn 15:21 < andytoshi> only a FnMut 15:22 < andytoshi> in fact, this is a general problem with the existing API .... if you try to pass a key-mapping closure and a hash-mapping closure which both capture a mutable reference to the same dongle, you're gonna have a bad time 15:22 < andytoshi> we need to somehow indicate to the compiler that actually only one of these closures will ever be accessed at once 15:32 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has quit [Ping timeout: 260 seconds] 15:33 < sanket1729> ah. unsafe :P 15:38 < sanket1729> andytoshi, we can change it to have a single function that takes in enum (Key, Hash) and returns the corresponding (Key, Hash) instead of two separate functions 17:06 -!- Netsplit *.net <-> *.split quits: meshcollider 17:09 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-krcbvlexiytkhjit] has joined ##miniscript 17:10 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-krcbvlexiytkhjit] has quit [Ping timeout: 249 seconds] 17:12 -!- meshcollider [meshcollid@gateway/shell/ircnow/x-ouuqpqzypguzxydq] has joined ##miniscript 17:33 -!- andytoshi [~apoelstra@wpsoftware.net] has joined ##miniscript 17:33 -!- andytoshi [~apoelstra@wpsoftware.net] has quit [Changing host] 17:33 -!- andytoshi [~apoelstra@unaffiliated/andytoshi] has joined ##miniscript 17:57 < andytoshi> sorry, power went out, then i had an extended project moving a UPS and tracing down weird forgotten network hardware 17:58 < andytoshi> back now, hopefully for awhile 17:58 < andytoshi> sanket1729: using my PR i am able to generate all my icboc addresses, using descriptors :D 17:58 < andytoshi> am i good to merge it? i see you acked 18:35 -!- jonatack [~jon@134.19.179.179] has quit [Ping timeout: 265 seconds] 18:37 -!- jonatack [~jon@88.124.242.136] has joined ##miniscript 18:39 -!- andytosh1 [~apoelstra@wpsoftware.net] has joined ##miniscript 18:39 -!- otoburb_ [~otoburb@unaffiliated/otoburb] has joined ##miniscript 18:43 -!- Netsplit *.net <-> *.split quits: andytoshi, otoburb, shesek 18:49 -!- shesek [~shesek@164.90.217.137] has joined ##miniscript 18:49 -!- shesek [~shesek@164.90.217.137] has quit [Changing host] 18:49 -!- shesek [~shesek@unaffiliated/shesek] has joined ##miniscript 18:59 < sanket1729> Yes, you can merge it. I am on phone now. I will rebase elements-miniscirpt on it. 19:11 -!- windsok [~windsok@unaffiliated/windsok] has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.] 19:12 -!- windsok [~windsok@rarepepe.cash] has joined ##miniscript 19:12 -!- windsok [~windsok@rarepepe.cash] has quit [Changing host] 19:12 -!- windsok [~windsok@unaffiliated/windsok] has joined ##miniscript 20:50 -!- sipa [~pw@gateway/tor-sasl/sipa1024] has quit [Ping timeout: 240 seconds] 20:56 -!- sipa [~pw@gateway/tor-sasl/sipa1024] has joined ##miniscript 21:07 < sanket1729> andytosh1: Maybe you missed this 21:07 < sanket1729> andytoshi, we can change it to have a single function that takes in enum (Key, Hash) and returns the corresponding (Key, Hash) instead of two separate functions 21:13 -!- otoburb_ [~otoburb@unaffiliated/otoburb] has quit [Quit: leaving] --- Log closed Sun Jan 03 00:00:04 2021