nicatrontg [3:34 PM] yeah nicatrontg [3:34 PM] I noticed the work factor of 10 was a wee bit much nicatrontg [3:34 PM] 12 was definitely 1-2 seconds nicatrontg [3:35 PM] @enerdy: you could experiment with higher work factors enerdy [3:35 PM] I could olink [3:41 PM] locking main thread for 2 seconds, sounds like a bad idea nicatrontg [3:42 PM] yeah nicatrontg [3:42 PM] not sure why you would set a work factor high enough that your server would lock for 1-2 seconds calculating it enerdy [3:43 PM] inb4 async enerdy [3:43 PM] And ruin the whole purpose of it at the same time enerdy [3:43 PM] :kappa: nicatrontg [3:44 PM] even if you async it, you’d still delay login enerdy [3:44 PM] yeah but you won't stop the main thread olink [3:44 PM] login and register both have no immediate feedback requirements enerdy [3:44 PM] ^ olink [3:44 PM] theres no reason not to dump it to another thread nicatrontg [3:44 PM] sighs enerdy [3:44 PM] You could even add a "Logging in..." message if the work factor was higher than x olink [3:45 PM] esp if its that easy to lock the server for seconds enerdy [3:45 PM] Or send a status packet with that lol olink [3:45 PM] good use of bad terraria Kappa olink [3:45 PM] hmmm should make a status api enerdy [3:45 PM] Totally olink [3:45 PM] so multiple plugins can use it safely enerdy [3:45 PM] Status is one of those things that has potential nicatrontg [3:45 PM] http://wildlyinaccurate.com/bcrypt-choosing-a-work-factor/ Bcrypt is a Blowfish-based hashing algorithm which is commonly used for password hashing because of its potentially expensive key setup phase. A Bcrypt hash has the following structure:$2a$(2 chars work)$(22 chars salt)(31 chars hash)The reason th... enerdy [3:45 PM] But can totally mess up if everybody starts using it atm nicatrontg [3:46 PM] work factor is 2^n enerdy [3:46 PM] mhm enerdy [3:46 PM] So it increases exponentially nicatrontg [3:47 PM] which is why it’s silly to set it to like 12 nicatrontg [3:48 PM] I mean you could make the argument that you could async every db operation nicatrontg [3:48 PM] because non-important nicatrontg [3:48 PM] or that servers with mysql already risk lockups because of one reason or another enerdy [3:50 PM] Yeah but we said tshock would never be async in its core, so I can use that argument when considering db queries to be part of tshock's core enerdy [3:50 PM] :kappa: nicatrontg [3:51 PM] if anything, it’s outside the scope of this particular PR nicatrontg [3:52 PM] if you set the work factor abnormally high, you’ll screw up your server and make it unusable off [3:52 PM] That language off [3:52 PM] O off [3:52 PM] Chat didnt refresh off [3:52 PM] :rip: nicatrontg [3:52 PM] also, if you host your mysql server on a hot air balloon with satellite internet, your sha512 password comparisons will suck nicatrontg [3:52 PM] waiting for db operations that take minutes to complete enerdy [3:53 PM] >if you host your mysql server on a hot air balloon with satellite internet enerdy [3:53 PM] :kappa: enerdy [3:54 PM] ^Because I read that literally nicatrontg [3:54 PM] oops nicatrontg [3:54 PM] I forgot nicatrontg [3:54 PM] raspberry pi* on a hot air balloon nicatrontg [3:54 PM] with a potato battery to usb converter enerdy [3:54 PM] :ok_hand: enerdy [3:54 PM] And a generator? olink [3:55 PM] shank you seem offended when people, specifically me, offer legit concerns over your code olink [3:55 PM] stop taking it personally olink [3:55 PM] im not attacking you or your code olink [3:55 PM] i voiced a concern about locking up the main thread nicatrontg [3:55 PM] I’m not offended, really olink [3:56 PM] and your argument has a flaw, 1)the db code is there and should be async at its core, but unfortunately its there to stay. 2)all your code is brand new and isnt subject to being poorly developed olink [3:56 PM] its the same argument i made about patrikks potential pr, just because it works doesnt make it ideal olink [3:57 PM] if we have the option of making it better now then there is no reason to commit as is and go fix!later olink [3:57 PM] im sorry if you think im just trying to shoot down your pr, im not olink [3:58 PM] im trying to make our project look less hacky and less prone to issues, the api runs poorly as is, no reason to make it potentially worse everytime someone logs in nicatrontg [4:10 PM] I’m not going to continue this tangent, because again, by default, its as performant as sha512 nicatrontg [4:11 PM] like I said, you could host your mysql server on google’s balloon based internet and it would slow it down, just like raising the BCryptWorkFactor would olink [4:13 PM] Yes, and you ignore everything someone says if you dont want to face facts, its ok olink [4:14 PM] You cant use the existing db code as an argument to not do something NEW nicatrontg [4:14 PM] Let’s face the facts here: you’re inhibiting an objectively good change because of a variety of misplaced paranoid antics olink [4:14 PM] Paranoid? no, again. nicatrontg [4:14 PM] you called our current solution “not insecure" (edited) olink [4:14 PM] If you want to be a trash tier developer olink [4:14 PM] Then be a trash tier developer nicatrontg [4:14 PM] you’re now saying it’s not performant olink [4:14 PM] I'm saying and I quote , >locking main thread for 2 seconds, sounds like a bad idea nicatrontg [4:15 PM] it really does olink [4:15 PM] Even 500 ms is bad. nicatrontg [4:15 PM] but again, it can only do that if you raise the work factor olink [4:15 PM] whats the timing on 7? olink [4:15 PM] did you time it? nicatrontg [4:15 PM] at a work factor of 7 on an i3, it takes 1/100th of a second nicatrontg [4:15 PM] I believe I linked benchmarks earlier olink [4:16 PM] Then use that as your argument nicatrontg [4:16 PM] I did. olink [4:16 PM] Not that shitty code some shitty developer wrote olink [4:16 PM] >like I said, you could host your mysql server on google’s balloon based internet and it would slow it down, just like raising the BCryptWorkFactor would olink [4:16 PM] You have a funny way of spelling benchmarks nicatrontg [4:16 PM] Please, go do something productive instead of yell at me olink [4:16 PM] Dude if you have a problem with someone raising any issues with your code just remove me from the projct olink [4:16 PM] Because thats why I'm here olink [4:16 PM] To make sure the code is as good as possible. olink [4:17 PM] If you dont want to deal with someone giving feedback olink [4:17 PM] just fucking get it over with olink [4:17 PM] Every olink [4:17 PM] Single olink [4:17 PM] Criticism olink [4:17 PM] I olink [4:17 PM] Make olink [4:17 PM] You olink [4:17 PM] Take olink [4:17 PM] Personally olink [4:17 PM] Hell, im not the only person who expressed concerns with locking the main thread olink [4:17 PM] But apparently because I raised the issue, its not something you care about. olink [4:17 PM] I get it olink [4:17 PM] Just olink [4:17 PM] remove me olink [4:18 PM] Otherwise I will continue to complain about bad code nicatrontg [4:23 PM] Let me put it like this: in calculus, we apply limits to things so that the results make sense. Sure, given an infinite amount of “what-if” possibilities, this code can be used to slow down the server. This, however, can happen the same way in a multitude of different ways. You can comment on my code, but please, do so in a way that reflects that you understand what you’re talking about, rather than jumping in head first and saying that “1-2 seconds on the main thread is bad => this code is bad.” Understanding the BCrypt work factor is a critical component to being able to review this code, because without that understanding, it may appear that it abnormally raises the time required to do something. This, however, is not the case, and in fact, is quite contrary to the default I set it to. I’ve been trying to make this point several times, using statistics (linking benchmarks), pointing out the growth rate, the default, and saying several times that it already computes to something equivalent in hash speed for SHA512. When that didn’t work, I used a common literature method called hyperbole to dramatize the fact that increasing the work factor could, just as hosting a remote MySQL server, cause performance issues, but that these were all up to the server owner to configure and decide for themselves. Don’t make me repeat myself several times to try to emphasize the same point. olink [4:24 PM] Point me to the benchmarks olink [4:25 PM] Plesae olink [4:25 PM] because finding anything in slack is useless olink [4:25 PM] especially considering not everyone is on a pc and use the mobile device like2omg [4:25 PM] @nicatrontg: @olink is right. I experience that exact problem as well nicatrontg [4:26 PM] http://wildlyinaccurate.com/bcrypt-choosing-a-work-factor/ olink [4:26 PM] I hadnt seen any timings from a server so I assumed there were none, but if I missed them in teh see of spam olink [4:26 PM] I appologize/ olink [4:26 PM] Ok, so let me take a stab before I click this link olink [4:26 PM] That you actually never timed your implementation on a terraria server? olink [4:26 PM] Which is what i am asking for olink [4:27 PM] Not what some guy tested in his specific use case. nicatrontg [4:27 PM] Okay, then I haven’t built fucking timing tests on the Terraria server nicatrontg [4:27 PM] because you know, I have a life olink [4:27 PM] Ok, so my concern of it potentially being a problem given the increased effort of encryption nicatrontg [4:27 PM] I thought “this is an easy way to future proof the terraria server, and it won’t take long, I’ll just go do it" olink [4:27 PM] Was valid olink [4:27 PM] And you thought being an asshole about a valid concern was mature. olink [4:27 PM] I get it. nicatrontg [4:28 PM] No, you’re being an asshole olink [4:28 PM] Your life is greater than my concern of making shitty software shittier. olink [4:28 PM] I get it. nicatrontg [4:28 PM] you’re an asshole olink [4:28 PM] Sure, after some douch threw mud at me for expressing concern over code being implemented, which is kind of my fucking job here. nicatrontg [4:29 PM] Nobody appointed you Dr. Criticism simon311 [4:29 PM] I don't think the work factor is so much of a problem when people can set it to 1 :kappa: nicatrontg [4:29 PM] your job is not to make TShock Capital P Professional quality software olink [4:29 PM] Its not critism when its a fucking valid point nicatrontg [4:29 PM] your job is to help improve it for the user and plugin groups nicatrontg [4:29 PM] that’s all olink [4:29 PM] "Oh, effort? Fuck that id rather sit here and argue with you and ignore your concerns because I dont give a fuck about how well our software runs" olink [4:29 PM] I think youve made your point clear as day olink [4:30 PM] If i wanted professional quality, id have asked you to remove yourself from the coding team. olink [4:30 PM] But that isn't what I want. nicatrontg [4:30 PM] Really? nicatrontg [4:30 PM] Because it sure feels fucking like it olink [4:30 PM] You wrote questionable code, and get upset someone critiques it, gg. nicatrontg [4:30 PM] Fucking really? olink [4:31 PM] Its questionable until someone times it. nicatrontg [4:31 PM] MarioE sent me criticism nicatrontg [4:31 PM] so I fixed it nicatrontg [4:31 PM] it looks good to him nicatrontg [4:31 PM] in fact, nothing was *wrong* with the initial implementation; it worked *fine* olink [4:31 PM] It can look as good as Brad Pitt, doesnt mean hes a good actor. nicatrontg [4:31 PM] the only thing that was wrong was minor style changes in brackets and some other bugs that I didn’t know about and fixed because they’re present in the current version olink [4:32 PM] Yes, sure, so one developer decided not to ask you how fast it was. olink [4:32 PM] Guess what? olink [4:32 PM] I did. nicatrontg [4:32 PM] I’m not being paid to develop this software nicatrontg [4:32 PM] I’m not going to go write a giant test suite in Terraria of all things, to test one crypto library olink [4:33 PM] A test suite? Must suck being such a bad developer to not be able to implement a simple timer. nicatrontg [4:33 PM] when the work factor is quite obviously 2^work factor calculations olink [4:33 PM] Can I direct you to google? nicatrontg [4:33 PM] Get out. olink [4:33 PM] Naw, I think we can both say whatever we want. nicatrontg [4:33 PM] Leave, bye, adios olink [4:33 PM] You dont want to listen to me. olink [4:33 PM] I dont want to listen to you, its mutal. nicatrontg [4:33 PM] Your business is appreciated, thanks. olink [4:33 PM] mutual* olink [4:36 PM] slackbot [6:35 PM] You have been removed from the group admins by @nicatrontg alerek [4:40 PM] improving on code is not cause for butthurt, just saying alerek [4:41 PM] pls dont act demickey and get along simon311 [4:41 PM] >improving the code simon311 [4:42 PM] I thought they were arguing about whetever it is improving or not simon311 [4:42 PM] But yeah, still no reason for that big of a fight alerek [4:42 PM] i dont know and i dont care, all that matters is a suggestion was mmade, should be considered just like anything else and etc etc
Comments