--- Log opened Mon Jul 11 00:00:17 2022 04:41 <@sipa> @darosior I'm not working this week and will mostly not be online; I'll review things again next week 04:41 < darosior> sipa: Ok, have fun offline :) 10:06 -!- instagibbs [~instagibb@pool-100-15-132-66.washdc.fios.verizon.net] has joined ##miniscript 10:19 < instagibbs> sipa, andytoshi said you might know best, why is OP_VERIFY used instead of OP_DROP, which seems to disallow 0 value time values 10:20 < instagibbs> most "useful" think I know of would likely be "0 OP_CSV" which requires the spending tx to opt into bip125 signaling. Mostly just curious 10:21 <@sipa> In what context? 10:21 < instagibbs> context being OP_CSV, clearing the value off the stack 10:21 < instagibbs> sorry 10:22 < instagibbs> e.g. anchor outputs, "<1> OP_CSV OP_VERIFY" vs "<1> OP_CSV OP_DROP" 10:22 <@sipa> Ok, I got that far, but I still don't know what you're talking about. Some standard script? Miniscript? If so, which fragment? 10:23 <@sipa> Miniscript only allows non-zero arguments to after/older 10:25 < instagibbs> ok rephrase: why is it disallowed 10:26 <@sipa> otherwise it wouldn't be a valid B expression in miniscript (which is expected to leave a true/false value on the stack; (0 OP_CLTV) would leave a 0 on the stack despite being succesful) 10:27 < instagibbs> sounds like something I can read up on, thanks 10:28 <@sipa> the type system has no way to express "a script which leaves 0 on the stack, even when succesful". That's just a limitation of Miniscript. 10:29 <@sipa> It'd be possible to add a type for that, and then there could be a wrapper to turn that into a V type (which leaves nothing on the stack) by adding an OP_DROP. 10:29 <@sipa> But I think before today I never knew that checklocktimes with argument 0 were useful at all. 10:29 <@sipa> Are you sure that even works? (honest question, I have no idea) 10:29 < instagibbs> yeah, but honestly it should die so... 10:30 < instagibbs> (opt in rbf that is) 10:30 < instagibbs> thanks 10:30 <@sipa> yes 10:31 <@sipa> > "B" Base expressions. These take their inputs from the top of the stack. When satisfied, they push a nonzero value of up to 4 bytes onto the stack. When dissatisfied, they push an exact 0 onto the stack (if dissatisfaction without aborting is possible at all). This type is used for most expressions, and required for the top level expression. An example is older(n) = CHECKSEQUENCEVERIFY. 10:31 <@sipa> From the miniscrip site. 10:31 <@sipa> +t 10:31 < instagibbs> yeah reading it now 10:33 <@sipa> there are 3 other types, but none permit a 0 being pushed onto the stack when dissatisfying 10:33 <@sipa> eh, satisfying 14:18 < andytoshi> instagibbs: to summarize -- we support CLTV/CSV *without* dropping the value. in this case we need the undropped value to be nonzero, because that's how our type system works. 14:18 < andytoshi> then, given that we have this restriction anyway, we get "CLTV VERIFY" for free because we already have a " VERIFY" fragment 14:19 < andytoshi> so we never bothered adding the DROP variant, which is more idiomatic outside miniscript, but redundant within miniscript 14:19 <@sipa> Right! The simpler possibility would be to have a variant of the older/after fragments which just include an OP_DROP. 14:20 < andytoshi> yep -- and i suppose we could add that actually " CLTV DROP" where now can be 0 (or can be 5 bytes wide) 14:20 < andytoshi> and it would be its own V fragment 14:20 < andytoshi> the parser would be easy to modify since this is the only occurence of DROP anywhere ... and if it would solve some meaningful problem for instagibbs 14:22 < andytoshi> thanks for un-confusing me sipa ... i'd originally told instagibbs in PM that the "can't be 0" rule was there *because* we used VERIFY, which in turn was used to keep the language smaller 14:22 < andytoshi> which is totally backward 14:40 <@sipa> Right, I think I understand the confusion now. 14:41 <@sipa> You'd expect Miniscript to have " CLTV DROP" construction, as it's the most obvious way of using CLTV. 14:42 <@sipa> Instead, Miniscript has just " CLTV" and a generic combinator that adds "VERIFY", because these two together have the same functionality, and are more composable. 14:43 <@sipa> Plus they permit using cltv in contexts where the drop isn't necessary (e.g. it's the end of a script, or BOOLAND or BOOLOR follow, or inside a thresh). 14:49 < andytoshi> yep 18:33 -!- appservicebot [~afilini-m@2001:bc8:1828:245::2] has quit [Ping timeout: 264 seconds] 18:53 -!- appservicebot [~afilini-m@2001:bc8:1828:245::2] has joined ##miniscript 23:23 -!- instagibbs_ [~instagibb@pool-100-15-132-66.washdc.fios.verizon.net] has joined ##miniscript 23:23 -!- michaelfolkson2 [~michaelfo@138.68.143.20] has joined ##miniscript 23:24 -!- jeremyrubin [~jeremyrub@ec2-44-199-24-18.compute-1.amazonaws.com] has quit [Quit: Ping timeout (120 seconds)] 23:24 -!- instagibbs [~instagibb@pool-100-15-132-66.washdc.fios.verizon.net] has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in] 23:24 -!- michaelfolkson [~michaelfo@138.68.143.20] has quit [Quit: ZNC 1.8.2 - https://znc.in] 23:24 -!- meshcollider [meshcollid@user/meshcollider] has quit [Ping timeout: 264 seconds] 23:29 -!- meshcollider [meshcollid@meshcollider.jujube.ircnow.org] has joined ##miniscript --- Log closed Tue Jul 12 00:00:19 2022