--- Log opened Wed Sep 09 00:00:13 2020 00:28 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #utreexo 00:31 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 246 seconds] 04:24 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 04:24 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 07:19 < dergoegge> so the reason i was thinking about this was the cache simulation. what i am currently doing there is storing each leave as a bit where 1 means cached and 0 not cached and when a swap occurs i just swap those bits 07:19 < dergoegge> my assumption was that leaves only get flagged as memorable in `addOne` 07:21 < dergoegge> but actually they might become memorable through `polSwap` as well which i find weird because those leaves where not added with remember=true 07:21 < dergoegge> does that not break the benefit of using the ttl values? 11:34 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 11:35 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #utreexo 12:18 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 12:52 < adiabat> If it's working the way I think it is (which I'm not 100% sure it does) - 12:52 < adiabat> then leaves will only be set to memorable by addOne (giving it a non-nil pointer_ 12:53 < adiabat> BUT, nodes can be retained without being set to memorable: any sibling of a memorable node and al nodes up to the root 12:53 < adiabat> (the sibling being the first node of the proof 12:54 < adiabat> so the tricky part is that memorable and cached are not the same thing 12:55 < adiabat> for example, looking at printout.txt the last tree (line 39-45) 12:55 < adiabat> if 02 is marked memorable (it has a non nil pointer) and nothing else 12:55 < adiabat> then 02, 03, 08, 13, 14 should all be cached 12:58 < adiabat> ... ok no that's what I want it to do but that's not what it's doing 13:00 < adiabat> the only time anything memorable-related is called from pollard.rem2() is nt.chop() 13:03 < adiabat> the problem seems to be: 13:04 < adiabat> leaves aren't erroneously marked memorable; that part looks OK, where leaves can get non-nil nieces during addOne() so they don't get n.prune() 'd 13:05 < adiabat> but, n.prune() ony happens in addOne(); prune() needs to be called from rem2() somewhere 13:06 < adiabat> for example in the forest on line 21 of printout.txt 13:06 < adiabat> say 02 is marked memorable (non-nil pointer) but everything else is forgettable 13:07 < adiabat> so you'd have 02, 03, 16, 25, 28, 26, 22, 14 13:07 < adiabat> if 02 is deleted, then that means everything should be forgotten except roots 13:07 < adiabat> instead, 14 moves to 02 13:08 < adiabat> and now 14 is not memorable (has nil nieces) which is good, but 13:09 < adiabat> nothing calls prune() on 16, so both 02 and 03 stay, as well as 16, 25 13:10 < adiabat> this might be a 1-line fix (that'd be nice) 13:12 < adiabat> right after pollard.go line 241: hn.dest.data = hn.sib.auntOp() 13:12 < adiabat> just add hn.sib.prune() 13:12 < adiabat> and... that's OK...? 13:13 < adiabat> prune() should only be called at row 1 and above, but hn's only exist up there so that's OK I think 13:15 < adiabat> dergoegge - I'll leave that for you to check? Since you're dealing with caching now, OK? 13:16 < adiabat> I could try to test / fix chaching but you've got a PR already in that area 13:17 < adiabat> also I am not sure that just 1 line there will fix it :) There might be other places, but I think it's not much 14:29 < dergoegge> OK yeah i will have a look 14:34 < dergoegge> i will write some tests to verify that nodes are cached correctly 15:15 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #utreexo 15:50 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 15:51 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #utreexo 17:37 < adiabat> It's quite possible that putting the hn.sib.prune() line will break other things. Hopefully not! :) --- Log closed Thu Sep 10 00:00:14 2020