--- Log opened Mon Jul 04 00:00:12 2022 03:20 -!- gnusha [~gnusha@user/gnusha] has joined ##miniscript 03:20 [Users ##miniscript] 03:20 [@sipa ] [ darosior ] [ jeremyrubin ] [ MatrixBot1 ] [ sandipndev123] [ stevenroose] 03:20 [ achow101 ] [ devrandom] [ jnewbery_ ] [ meshcollider ] [ sanket1729 ] [ stickies-v ] 03:20 [ ademan[m] ] [ FelixWeis] [ kallewoof ] [ michaelfolkson ] [ sanket1729[m]] [ theStack ] 03:20 [ andytosh1 ] [ fjahr ] [ kanishk779[m]] [ midnight ] [ sanket_cell ] [ warren ] 03:20 [ appservicebot] [ gnusha ] [ katsu_ ] [ notmandatory ] [ sebx2a ] 03:20 [ clewe ] [ hugohn_ ] [ ksedgwic ] [ RiccardoCasatta[] [ shesek ] 03:20 -!- Irssi: ##miniscript: Total of 34 nicks [1 ops, 0 halfops, 0 voices, 33 normal] 03:20 -!- Channel ##miniscript created Thu May 20 00:29:16 2021 03:23 -!- Irssi: Join to ##miniscript was synced in 173 secs 10:22 < darosior> So we removed the recursion depth limit when making the code non-recursive. I think we should have a limit nonetheless? We would happily try to parse insanely large Miniscript descriptors at the moment and run out of memory 10:22 < darosior> (or insanely large miniscripts in the miniscript_string fuzz target, for instance) 10:32 <@sipa> We certainly could have a limit; IIRC you can't have more than 402 nesting levels. 10:33 <@sipa> Though that may change with tr support. 10:33 <@sipa> But also, does the recursion depth limit matter? Someone trying to run you out of memory can give a very big miniscript which doesn't have much recursion depth. 12:11 < darosior> Yes, not only the recursion depth, the number of nodes. Essentially i think of limiting the `stack` and `result` size in TreeEvalMaybe 12:11 <@sipa> oh, that'd be easy 12:27 < darosior> 🤦 we don't use TreeEvalMaybe to parse, obviously.. I'll just work on something and PR :) 12:32 <@sipa> Yeah, the conversion from Script or string to miniscript::Node doesn't use it. 12:34 < darosior> While at it we could limit the number of subs of thresh? I remember we discussed it already 12:36 < darosior> (i don't think it is necessary for not running out of memory) 12:40 <@sipa> The script parser could keep track of the number of non-push opcodes it has encountered. 12:41 <@sipa> The string parser could count how many fragments (incl wrappers) it has "started". --- Log closed Tue Jul 05 00:00:12 2022