--- Day changed Wed Apr 22 2020 00:13 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Ping timeout: 240 seconds] 00:17 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined ##miniscript 05:37 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has joined ##miniscript 06:09 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Quit: jonatack] 06:23 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined ##miniscript 07:01 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has quit [Quit: Sleep mode] 07:46 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Ping timeout: 240 seconds] 07:46 -!- afk11` [~afk11@gateway/tor-sasl/afk11] has quit [Ping timeout: 240 seconds] 07:46 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Ping timeout: 240 seconds] 07:47 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 256 seconds] 07:49 -!- jonatack [~jon@213.152.161.138] has joined ##miniscript 08:00 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined ##miniscript 08:01 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined ##miniscript 08:04 -!- afk11` [~afk11@gateway/tor-sasl/afk11] has joined ##miniscript 08:06 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has joined ##miniscript 08:07 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has quit [Client Quit] 08:16 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has joined ##miniscript 08:28 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 08:29 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined ##miniscript 09:03 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 09:03 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined ##miniscript 10:38 -!- bjdweck [51dac316@bzq-218-195-22.red.bezeqint.net] has joined ##miniscript 10:41 < bjdweck> Hi - looking at the miniscript spec at http://bitcoin.sipa.be/miniscript/... Having trouble understanding how andor(X,Y,Z) "(X and Y) or Z" semantics are equivalent to Bitcoin Script fragment: [X] NOTIF [Z] ELSE [Y] ENDIF 10:41 < bjdweck> Particularly in a case where X is TRUE, Y is FALSE and Z is TRUE... 11:43 < gwillen> heh that doesn't seem right, a bug in the doc perhaps 11:43 < gwillen> hmm I am surprised that sipa is not in here 12:35 < achow101> bjdweck: that's not a valid satisfaction 12:36 < achow101> either you provide X and Y, or you provide Z 12:36 < achow101> there's no X and Z 12:40 < gwillen> I am confused about how to interpret what you're saying achow101, but possibly it's because I am not familiar enough with miniscript 12:40 < gwillen> at the bitcoin script level you do have to push "false" for [X] before executing this script to get the [Z] branch, right? 12:41 < achow101> gwillen: when you construct the witness, you already know which branches are going to be taken. So you know whether it will be (X and Y) or Z. If at that time, you have X and Z, you know that Z will be the taken branch. So X should then not be provided and given as 0 in the witness 12:43 < gwillen> oh hmm 12:43 < achow101> essentially the script isn't dynamically determining which branches succed or not 12:43 < achow101> that's why there are specific satisfaction rules 12:44 < achow101> when the witness is being constructed, you are determining the branches and then providing the right elements to take those branches 12:46 < gwillen> so if I'm understanding this right, the provided script is POSSIBLE to satisfy if and only iff "(X and Y) or Z" is true 12:46 < gwillen> it's just that the WAY you satisfy it is slightly nonintutive here 12:46 < achow101> yes 12:47 < gwillen> because if you are using the Z branch, you must not provide X even if you have it 12:47 < achow101> yes 12:47 < gwillen> and this makes sense because it's an optimization that makes the script shorter 12:47 < gwillen> but does not change the set of possible satisfactions, only how you spell them 12:48 < achow101> If you wanted to dissatisfy this branch, then you could give X and not Y. That is a valid dissatisfaction and the entire expression is false 12:49 < achow101> but yeah, this requires a different frame of thinking from normal programming 12:51 < gwillen> and in general you can always choose to dissatisfy something that you are able to satisfy 12:51 < gwillen> so there is not, and cannot be, a "not" in miniscript 12:52 < gwillen> because you would generally always be able to satisfy it no matter what 12:52 < gwillen> this is related to constructive logic somehow, huh 13:13 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has quit [Quit: Sleep mode] 13:24 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has joined ##miniscript 14:37 < bjdweck> Got it... It occurred to me after I wrote this that the answer is along these lines... because it's within the witnessScript writer's ability to satisfy the script using Z alone if he possesses it... thanks! 18:14 -!- jonatack [~jon@213.152.161.138] has quit [Ping timeout: 256 seconds] 18:16 -!- jonatack [~jon@37.173.202.229] has joined ##miniscript 18:20 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:1885:5393:cbbe:8254] has quit [Quit: Sleep mode] 18:29 -!- bjdweck [51dac316@bzq-218-195-22.red.bezeqint.net] has quit [Ping timeout: 240 seconds]