--- Log opened Thu Aug 19 00:00:42 2021 01:32 -!- ksedgwic [~ksedgwicm@2001:470:69fc:105::ce1] has quit [Quit: Bridge terminating on SIGTERM] 01:32 -!- robertspigler [~robertspi@2001:470:69fc:105::2d53] has quit [Quit: Bridge terminating on SIGTERM] 01:35 -!- robertspigler [~robertspi@2001:470:69fc:105::2d53] has joined ##miniscript 01:42 < meshcollider> what is the point of the 0NOTEQUAL in the j: wrapper? if SIZE pushes a non-zero value then the IF will succeed so why normalize it first? 01:42 -!- ksedgwic [~ksedgwicm@2001:470:69fc:105::ce1] has joined ##miniscript 02:14 < darosior> andytoshi, sanket1729: master_fingerprint() would panic for a SinglePub without origin. What was the rationale for passing the key itself as origin in this case?.. 02:28 < darosior> Anyways, behaviour didn't seem right so i opened https://github.com/rust-bitcoin/rust-miniscript/pull/265 12:00 -!- Netsplit *.net <-> *.split quits: sanket1729 12:01 -!- Netsplit over, joins: sanket1729 14:34 <@sipa> what is the maximum ratio of push opcodes vs non-push opcodes in a valid miniscript script? 14:35 <@sipa> 1 ? 14:37 <@sipa> well, "OP_1" is a valid script i guess 14:39 < meshcollider> I think you can have at most one more push than non-push? 14:39 <@sipa> i'd believe that 14:40 <@sipa> but i'd also want to make sure 14:40 < meshcollider> Wait wouldn't thresh() make that not true 14:41 <@sipa> right. 14:41 <@sipa> that means with N non-push opcodes, there can be up to... 20N+1 non-push ones? 14:42 < meshcollider> Actually no the way thresh is implemented, because of all the OP_AND it should still be true? 14:42 <@sipa> not thresh; multi 14:43 <@sipa> c:multi(1,A,B,C,...,P) is 1 non-push opcode (OP_CHECKMULTISIG) and 21 push opcodes 14:43 <@sipa> eh, remove the c: 14:43 < meshcollider> I thought you count each of the CHECKMULTISIG pushes as an operation 14:44 <@sipa> yes 14:44 <@sipa> oh, you mean for the 201 opcode limit? 14:44 <@sipa> yes, that's true, those also count towards that, but only for _executed_ OP_CHECKMULTISIG 14:44 < meshcollider> Oh true yeah 14:45 <@sipa> while otherwise the opcodes counting for the 201 limit is all of them, including unexecuted ones 14:46 < meshcollider> Does an unexecuted CHECKSIGMULTI count? That opcode itself? 14:46 < meshcollider> (I'd assume so) 14:46 <@sipa> yes 14:46 <@sipa> but not its number of keys 14:55 < meshcollider> Btw sipa: 8:42 PM what is the point of the 0NOTEQUAL in the j: wrapper? if SIZE pushes a non-zero value then the IF will succeed so why normalize it first? 14:59 <@sipa> standardness rules require that the input to IF is exactly {} or {1} 14:59 <@sipa> (SCRIPT_VERIFY_MINIMALIF) 15:00 < meshcollider> Oh, right 15:01 < meshcollider> 0NOTEQUAL IF completely makes that rule redundant lol 15:07 <@sipa> well the rule exists to prevent malleable inputs 15:08 <@sipa> if a condition to an if is taken directly from scriptsig/witness, you do want this rule 15:08 <@sipa> but it can't (in its current form) distinguish between values from the input stack, and ones produced by other opcodes 15:10 <@sipa> oh, that's not what's going on in j: 15:11 <@sipa> there the reason for accepting truish inputs other than {1} is that it's still pass on to whatever j is wrapping 15:13 < meshcollider> Yeah that makes sense, thanks 16:28 < meshcollider> sipa: Another fairly low-effort change to https://github.com/sipa/miniscript/pull/62 would be for DecomposeScript to additionally count the push ops as it goes and pass that value back 16:28 < meshcollider> But it depends on your thoughts about making everything non-recursive anyway 16:41 < meshcollider> also issues #16, #17, and #54 can be closed --- Log closed Fri Aug 20 00:00:43 2021