--- Log opened Thu Sep 09 00:00:02 2021 00:58 -!- enick_504 [~afilini-m@2001:bc8:1828:245::2] has joined ##miniscript 10:52 < andytoshi> right, i understand that 10:53 < andytoshi> but why distinguish between initial stack and "during execution" stack 10:53 < andytoshi> if we hit 1000 we hit 1000 10:54 -!- meshcollider [meshcollid@user/meshcollider] has quit [Remote host closed the connection] 11:14 < sanket1729> andytoshi: does this answer your question? https://github.com/rust-bitcoin/rust-miniscript/pull/255#discussion_r704556990 11:14 < sanket1729> I think it is much easier to implement that way 11:18 -!- meshcollider [meshcollid@meshcollider.jujube.ircnow.org] has joined ##miniscript 13:20 < andytoshi> sanket1729: sounds like you actually want to distinguish between the max stack elements when A is dissatisfied vs satisified 13:20 < andytoshi> rather than initial/executing stack elements 13:20 < sanket1729> both 13:21 < sanket1729> I don't how we can easily track only the executing elements without tracking the initial elements separately 13:24 < sanket1729> Oh, and on the recursion related parsing. I think we should just go back to `MAX_RECURSION_DEPTH` way of doing things. I implemented non-recursive parsing for miniscripts from string. 13:24 < sanket1729> But it's useless, because we cannot any methods on it (all of them are recursive) 13:25 < sanket1729> And we would end rewriting all of the library/analysis in non-recursive form 13:29 < andytoshi> why do we need to track "only the executing elements" 13:29 < andytoshi> sanket1729: lol, gross. i mean, we should eventually rewrite the library in non-recursive form.. 13:29 < andytoshi> but you're right, we should finish with parsing 13:29 < andytoshi> not start with it :) 13:30 < andytoshi> in any case, no need to do that now 13:30 < sanket1729> Do you think it is worth it 13:30 < andytoshi> yes, but not now 13:31 < sanket1729> I think 1) it makes the code super ugly 2) difficult to review 3) and functions like satisfy would be annoying to implement non-recursive 13:31 < andytoshi> hmm, yeah, fair 13:31 < andytoshi> i think though, in theory we could wind up with super bizarre constructs like 500-level-deep taproots 13:32 < andytoshi> i guess not, that would be really pathological 13:32 < sanket1729> Yeah, it is possible. I have an example in my local branch 13:32 < sanket1729> which we can parse 13:32 < sanket1729> but cannot call any functoins 13:32 < andytoshi> right, it's possible, but is it ever useful? 13:32 < andytoshi> i don't think it is 13:32 < andytoshi> so, let's keep the library recursive for now 13:33 < sanket1729> It's not useful. 13:34 < sanket1729> back to execution stack size 13:34 < andytoshi> lol, well, imagine i have 500 different pubkeys, that are strictly decreasing in the probability that i'd use each one 13:34 < andytoshi> ok 13:34 < andytoshi> sorry 13:34 < sanket1729> We need to track total stack depth 13:35 < sanket1729> But I don't see how we can do that without separately tracking initial stack(witness) and increase in stack depth 13:36 < sanket1729> max_execution_limit_parents is not the same max over all children 13:37 < sanket1729> Slightly updated the comment 13:37 < sanket1729> https://github.com/rust-bitcoin/rust-miniscript/pull/255#discussion_r704556990 13:38 < andytoshi> ah ok, i see what you are saying 13:38 < andytoshi> yep ok, what you're doing is good 13:38 < andytoshi> sorry it took me so long 13:40 < sanket1729> So, should I keep the commit that changes the parsing to non-recursive/or drop it? 13:40 < andytoshi> i think we should drop it 13:40 < andytoshi> it'll just lead to a zillion bug reports about assertation failures 13:40 < sanket1729> ^^ I also got the implementation wrong the first time because of it 13:42 < andytoshi> heh oops, i'm surprised that i missed that 13:43 < sanket1729> So, we cannot dynamically query the stack size right? 13:43 < sanket1729> as in run time 13:45 < andytoshi> correct 13:45 < andytoshi> i don't know why ... LLVM provides this info i'm pretty sure 13:45 < andytoshi> actually maybe not, i recall some ancient blog posts about the elaborate things that rustc does to detect stack smashing 13:45 < andytoshi> which LLVM provides zero help on 13:50 < sanket1729> Yep, looks like people have written custom crates for it. https://crates.io/crates/stacker 13:52 < sanket1729> dropped the commit and updated the PR 14:10 < andytoshi> awesome, thanks 14:10 < andytoshi> probably can't review til tomorrow, my brain is a bit full today 14:25 < sanket1729> cool, no rusth 16:39 -!- meshcollider [meshcollid@meshcollider.jujube.ircnow.org] has quit [Changing host] 16:39 -!- meshcollider [meshcollid@user/meshcollider] has joined ##miniscript --- Log closed Fri Sep 10 00:00:03 2021