--- Day changed Sat Aug 18 2018 00:02 -!- pokk5 [~pokk@115.78.8.94] has joined #joinmarket 00:02 < pokk5> https://www.youtube.com/watch?v=ADn2IJnTRyM 00:05 -!- pokk5 [~pokk@115.78.8.94] has quit [Remote host closed the connection] 00:06 -!- raynold [~raynold@14.2.119.124] has joined #joinmarket 00:06 < raynold> https://www.youtube.com/watch?v=ADn2IJnTRyM 00:14 -!- raynold [~raynold@14.2.119.124] has quit [Ping timeout: 272 seconds] 00:22 -!- undeath [~undeath@unaffiliated/undeath] has joined #joinmarket 00:40 -!- mode/#joinmarket [+r] by waxwing 00:40 <@waxwing> :( 00:44 < arubi> lol at least the video is funny 00:45 < arubi> oh, maybe just the first couple minutes. now it's just weird 01:41 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 260 seconds] 01:49 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #joinmarket 02:01 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 260 seconds] 02:02 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #joinmarket 02:03 -!- undeath [~undeath@unaffiliated/undeath] has quit [Quit: WeeChat 2.1] 04:11 <@waxwing> gonna do a bit more testing on #104 .. any feedback still most welcome. hmm where's undeath gone. 07:46 <@waxwing> everything working nicely on regtest incl. Qt after fixup, now trying mainnet custom schedule because yolo. since it's already been working nicely maker side for ~ 2 weeks i think i'll have seen enough at that point. 08:21 <@waxwing> spammers on irc, spammers on joinmarket .. looks like about a ~60% honest responder ratio to me. if you want about 5 counterparties you'd better ask for 7-8 i think. 10:03 <@waxwing> ok i'll probably merge it in the next day or two unless someone else has a comment. 10:28 < arubi> somewhat interesting, https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417675996#L2030-L2040 , this is the secp256k1-py package. failed to install on centos 7 due to file hash mismatch :) 10:29 <@waxwing> https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417675996#L2029 10:29 <@waxwing> is it a checksum mismatch or is it like a missing file or something? 10:30 < arubi> ah yes on others too. not missing. just downloaded and checked against the hardcoded sha 10:30 < arubi> (this is the libsecp source install branch) 10:31 < arubi> downloaded it now here, hash matches 10:32 < arubi> https://github.com/ludbb/secp256k1-py/archive/0.13.2.4.tar.gz if you're feeling adventurous. we have f7920b1b887fe6745c49aebea40cefe867adddf11eb2c164624f1f2729f74657 10:34 < arubi> ah I see. might be an empty response from github. I just tried again and got a 0 byte file 10:36 < arubi> though in this empty response curl shows zeros in the output. on travis it does show something being downloaded.. github issues I guess 10:39 < arubi> waxwing, ah sorry, I didn't realize your question was about "No such file or directory". it first tries the hash the file, and on any error re-downloads then tries to hash again 10:40 < arubi> so yes, first time it was missing (cache reset on my branch), then downloaded, then checked again for hash and this time exiting on fail when it mismatched 11:15 < arubi> huh, seems that all my travis osx testing woes came down to this : https://github.com/fivepiece/joinmarket-clientserver/commit/8f70bd01aa633c89d93f6791e46c2c30c97356d4 . this is the test without : https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417685714#L1709 11:18 <@waxwing> arubi, wait, what's that? 11:20 <@waxwing> you mean, you have to change that (put back in the 'with') in order for the test to pass? 11:20 < arubi> I never got osx irc tests on travis to work, so we never tested osx (except for install process). I was going around in circles trying to fix it on the bash\setup side that I never tried... yes, exactly :) 11:21 < arubi> previously, it failed when the "fly you fools!" error was sent, and I guess that disconnected IRC so the next test failed too. now it seems to no longer disconnect 11:23 <@waxwing> seems it was put in, commented out (by me, uh..) in the initial commit ... 11:24 -!- lnostdal [~lnostdal@77.70.119.51] has quit [Quit: https://www.Quanto.ga/] 11:24 < arubi> I kept thinking that the irc server doesn't even start, so tried to change hostnames to ipv4 127.0.0.1 on all the config files, and open ports in the OS level.. maybe travis osx python\twisted just behaves differently on that error 11:25 <@waxwing> so .. CJPeerError is not raised anywhere i think 11:27 < arubi> can "StandardError" be raised instead in this case? maybe from twisted itself? 11:27 <@waxwing> well but StandardError is not a CJPeerError, only vice versa 11:27 < arubi> (asking because "class CJPeerError(StandardError)" - not sure how python behaves) 11:27 < arubi> ah, right. 11:28 < arubi> hmm :) 11:28 <@waxwing> i'll just try making that change locally and see what happens 11:28 <@waxwing> i mean i know it's not Osx but still 11:29 < arubi> it passed on all linux tests 11:29 -!- lnostdal [~lnostdal@77.70.119.51] has joined #joinmarket 11:30 <@waxwing> interesting. it passes both ways. it must be some peculiarity of the 'with' syntax in pytest 11:31 < arubi> SyntaxError: invalid syntax 11:31 < arubi> >>> try: 11:31 < arubi> ... raise CJPeerError 11:31 < arubi> ... except StandardError: 11:31 < arubi> ... print("hm") 11:31 < arubi> ... 11:31 < arubi> hm 11:31 < arubi> just maybe.. ? 11:32 < arubi> import jmdaemon, from jmdaemon.message_channel import CJPeerError , were ran first 11:32 <@waxwing> yeah. maybe it's a peculiarity of defining a subclass that has no body 11:32 <@waxwing> kinda weird if so, but could be 11:33 <@waxwing> in fact if that's true it kind of completely violates how it's supposed to work. it doesn't allow you to name exceptions like that, which i've seen tons of people do 11:34 < arubi> agreed.. 11:35 <@waxwing> oh no, but that's logical 11:36 <@waxwing> i'm defining an A which is a B, when you catch ("except"), you're catching any B. My A is a B, so it is included. 11:36 <@waxwing> the point of specialising with a name like CJPeerError is that i may want to *only* catch Bs. 11:37 < arubi> so CJPeerError is the subgroup here? intuitively I thought it was the other way 11:38 <@waxwing> so what's important here is the specific syntax "with pytest.raises(CJPeerError)" ; if the following block of code throws a CJPeerError, it will be treated as OK by pytest; that's the promise. 11:38 <@waxwing> yes class A(B) in python means that A is a subclass or child class inheriting the properties of class B 11:39 <@waxwing> (to complete my second-to-last point): but, if the following block throws a StandardError then "with pytest.raises" should not really accept that, because the condition was not fulfilled: a CJPeerError was not raised. 11:40 < arubi> is there a way to make it fail if the exception was /not/ raised? 11:40 <@waxwing> that's the exact purpose of 'with pytest.raises(ExceptionType):' 11:41 < arubi> oh, now I'm even more confused hehe 11:41 <@waxwing> the idea (according to the docs) is, if there is not an Exception of that type thrown, it will fail the test. 11:42 <@waxwing> `with pytest.raises(CJPeerError): ` .. will basically function like an `assert that this block of code throws CJPeerError` 11:42 < arubi> so something must be catching the exception above from 'junk_fill()' on linux, but not on osx 11:42 <@waxwing> well, again, of course, i seem to be wrong, because i can't see that happening here, but that was what i always saw in the past and pretty sure i read in the docs, too. 11:42 < arubi> or hm, no, that's not true right. this 'with.. raises' is more like an assert 11:43 <@waxwing> yes it has to be in the indented block after the `with`. but i'll do a bit of reading and see if i can figure something out. 11:45 < arubi> well fwiw it at least completes the tests for #180. if you think it's eventually a good idea to make the change to the irc tests, I also have osx testing ready. 11:45 <@waxwing> arubi, oh sorry i got confused when you asked before "if not raised", of course that's the other way round. i'll try that now; just run it with no "with" command and see what exception is being thrown. 11:45 < arubi> ah cool. 11:46 <@waxwing> yeah it doesn't throw anything. what the heck is pytest doing then. 11:47 < arubi> gimmie the syntax. I'll pass it on the travis osx test 11:49 <@waxwing> no i'm just going round in circles .. just testing what was already there. 11:49 <@waxwing> simple way to state it is it runs without error, with or without the "with pytest.raises(CJPeerError)" line. 11:49 <@waxwing> which makes zero sense. 11:53 <@waxwing> my best guess is there is some magic under the hood of the `with pytest.raises` syntax that just fails here, possibly because it's not in a standard pytest test function; it's in a twisted deferred 11:54 <@waxwing> the code line itself does get executed, though 11:54 <@waxwing> the code line (the send_error) call doesn't actually raise any exception; so to the extent that there's a problem, it's only that "with .." doesn't do what it's supposed to. 11:55 <@waxwing> none of this quite helps with your problem 11:57 < arubi> pytest and twisted versions are the same for trusty\osx.. weird 11:59 <@waxwing> yeah i was just going to ask about the pytest version 12:00 <@waxwing> maybe replace on osx with `try: .. mc.send_error(.. except Exception as e: print(repr(e))` 12:00 <@waxwing> in other words just wrap it in a standard try/except and print the Exception, if there somehow is one. i can't reproduce that behaviour and logically i don't really see how that code can be raising an exception. 12:02 <@waxwing> ok sanity checked with a "finally:" .. it's definitely not raising an exception. 12:02 < arubi> running now : https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417703131 12:02 <@waxwing> so apart from pytest being weird, the question would be what/how is it raising an exception on osx 12:03 <@waxwing> yeah that's what i did. then ran it again with a print() in "finally:" too just to double check the code was being executed (well, obv i guess because you see the fly, you fools!) 12:11 < arubi> er wth. it passed 12:11 < arubi> ah wait 12:11 < arubi> did it print it? I can't find it 12:12 <@waxwing> no, it didn't pass. 12:12 <@waxwing> unless i'm looking at the wrong one. 12:13 <@waxwing> my guess is it's a timing thing. it took longer and shut down before it complete, so you get 'reactor unclean' 12:13 <@waxwing> sorry about this; these tests where it runs the reactor using twisted.trial are just a rubbish design, they have to run long enough to complete. see the end of the test file, there's a hardcoded 22 second wait. 12:14 <@waxwing> you can see me complaining about this in TODO.md :) i never found a good way to test with twisted, but some of the units would be pointless without including twisted (like this one) 12:14 < arubi> yes this is the error : https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417703131#L1831-L1836 12:15 <@waxwing> btw see this: https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417703131#L1604 12:15 < arubi> I have a hunch it traces back to : https://github.com/JoinMarket-Org/miniircd/blob/master/miniircd#L536-L537 12:15 < arubi> yes it's not found then downloaded. I messed up the cache directory save there (will fix) 12:15 <@waxwing> no that's all correct. 12:16 <@waxwing> all that list index and such; it's intended for that to happen. the error, i'm nearly sure, is because of the 'reactor unclean', it's shut down before the test completed. bump the 22 to say 35 and try again. 12:16 <@waxwing> (not saying that's a "solution", but ... see comments above) 12:18 < arubi> running : https://travis-ci.org/fivepiece/joinmarket-clientserver/jobs/417706568 12:28 < arubi> spot on waxwing :) 12:29 <@waxwing> now for extra credit, explain how the heck putting that 'with' statement allowed it to run OK ..?! 12:31 < arubi> deferLater() now no longer returns StandardError ? :{ 12:31 < arubi> s/:\{/:P/ 12:32 < arubi> oh wait, that can't be right.. 12:32 < arubi> yea, I don't know hehe 12:51 -!- undeath [~undeath@unaffiliated/undeath] has joined #joinmarket 14:11 -!- undeath [~undeath@unaffiliated/undeath] has quit [Quit: WeeChat 2.1] 14:41 -!- roasbeef [~root@104.131.26.124] has quit [Ping timeout: 272 seconds] 14:45 -!- rdymac [uid31665@gateway/web/irccloud.com/x-aesayrtewhdyaonx] has joined #joinmarket 17:58 -!- AgoraRelay [~jmrelayfn@p5DE4A7F7.dip0.t-ipconnect.de] has quit [Ping timeout: 244 seconds] 20:42 -!- rdymac [uid31665@gateway/web/irccloud.com/x-aesayrtewhdyaonx] has quit [Quit: Connection closed for inactivity] 20:44 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 260 seconds] 20:52 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #joinmarket 22:55 < arubi> well at least wrt yesterday's secp256k1-py hash mismatch mystery, I managed to fetch the "bad" file from travis. the data in it is just the text "404: Not Found"