--- Log opened Sun Jun 14 00:00:49 2020 00:09 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 246 seconds] 01:42 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 04:30 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 272 seconds] 04:31 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 04:39 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 272 seconds] 05:46 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 07:08 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 272 seconds] 08:20 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 08:30 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Remote host closed the connection] 08:30 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 09:52 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 11:16 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 272 seconds] 12:52 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 14:05 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 272 seconds] 14:13 < ja> is SwapNodes only supposed to swap leaves? or any node? 14:16 < ja> i guess it only swaps leaves if row==0 14:48 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 15:08 < adiabat> ja: SwapNodes works on nodes of any row 15:09 < adiabat> and it has some extra code for leaves to keep the positionMap up to date 15:15 < ja> adiabat: it also works if the nodes are not on the same row? i guess not? 15:21 < ja> adiabat: i think swapNodes breaks if the childMany result is the same, right? would it be good to add something like 'if a==b { return }'? 15:23 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 256 seconds] 15:45 < adiabat> ja: trying to swap nodes on different rows is ... undefined behavior 15:46 < adiabat> also the function arguments don't support it because you only have one argument for "row" 15:47 < adiabat> swapNodes doesn't test the sanity of it's arguments and doesn't return an error but you can give it invalid things 15:48 < adiabat> like a row that doesn't agree with the arrow, a row higher than the highest row in the forest, etc 15:48 < adiabat> we could check for these things and panic I guess 15:49 < adiabat> but the s.from == s.to case... I think that just ends up being a no-op? 15:52 < ja> adiabat: there is already a check if from == to. but there is no check after the childMany test. doesn't seem to be a no-op since my haskell equivalence property tests fail if add/remove that check 15:53 < adiabat> so you'd have s.from != s.to, but then childMany(s.from, row, f.rows) == childMany(s.to, row, f.rows) ? 15:53 < adiabat> I don't see how that could happen... maybe if something else is pretty wrong 15:54 < adiabat> different nodes will never share children... 15:55 < adiabat> maybe if row is bigger than f.rows or something broken like that? But in a normal working case, if s.from != s.to, any descendent can't be the same 15:59 < ja> ah... i am trying to understand the invariants to write a proper property test... 16:00 < ja> do we have a function to compute the row number from the node position? 16:05 < ja> the childMany collision seems to happen because i am using integer keys in the tree. so i'll change it to use something pseudorandom 16:06 < ja> using all the bits of the key size 16:13 < ja> if the childMany collision is such a broken situation, should I make a PR for a panic there? 16:21 < ja> oh wait, aah wait, childMany isn't dependent on the data inserted, only on the positions 16:44 < adiabat> ja: if you know the forest.rows and position, you can get row number 16:44 < adiabat> what do you mean by "data inserted"> 16:45 < adiabat> I don't know of any cases where you can call childMany with different positions and get the same result 16:46 < adiabat> position gets shifted up (<<) so maybe if there's some huge position that overflows... or if the mask it's &'ded with makes it look the same 16:47 < adiabat> anyway childMany *shouldn't* return the same values for different positions; if it doesn't that's a bug somewhere 16:47 < adiabat> if you can get it to happen in swapNodes then maybe panic there, or something upsstream from there is breaking other assumptions 16:48 < adiabat> but yeah some of these assumptions aren't really made explicit which they should be 17:17 -!- rafalcpp [~racalcppp@ip-178-214.ists.pl] has quit [Ping timeout: 240 seconds] 19:57 < ja> ok, i fixed it. it was because the nodes were not on the same row 19:57 < ja> helpful tips, thanks! 20:24 < rjected> there should be a way to get it working in gopath but if moving outside gopath works then maybe do that for now 22:08 -!- ThomasV [~thomasv@unaffiliated/thomasv] has joined #utreexo 22:34 -!- ThomasV [~thomasv@unaffiliated/thomasv] has quit [Ping timeout: 256 seconds] 23:46 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #utreexo --- Log closed Mon Jun 15 00:00:51 2020