--- Day changed Wed Mar 29 2017 06:56 -!- jtimon [~quassel@70.30.134.37.dynamic.jazztel.es] has joined #secp256k1 07:39 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Remote host closed the connection] 07:40 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 10:56 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Ping timeout: 240 seconds] 11:02 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 11:31 -!- ofek [~Ofekmeist@pool-71-121-186-199.bltmmd.fios.verizon.net] has joined #secp256k1 11:31 < ofek> what kind of performance impact would not having gmp have? 11:32 < andytoshi> ofek: the short answer is we don't know 11:32 < andytoshi> if you just compile without GMP now then the scalar and field inversions are just always constant-time iirc, which typically means those operations take 4-5x as long 11:33 < ofek> ouch 11:33 < andytoshi> which then translates into signature verification taking twice as long (my memory is fuzzy) 11:33 < gmaxwell> andytoshi: oh it's not that bad. 11:33 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Ping timeout: 240 seconds] 11:33 < andytoshi> but we could write our own inversion code, and i've tried, and came within 20-30% of GMP 11:34 < gmaxwell> with an algorithim that was supposted to be faster. :P 11:34 < andytoshi> and then peter dettmann has code that appears to be _faster_ than GMP, but it's in java and pretty rough, so we haven't followed up on that.. 11:34 < andytoshi> lol, yeah, turns out GMP invented a lot of stuff 11:34 < ofek> I can't cross compile for windows with gmp 11:35 < andytoshi> lemme run the actual benchmarks to see what the hit is for scalar inversion 11:36 < andytoshi> uhhh i see a 40x perf hit on scalar_inv_var 11:36 < andytoshi> scalar_inverse: min 124us / avg 126us / max 128us 11:36 < andytoshi> scalar_inverse_var: min 3.03us / avg 3.12us / max 3.24us 11:37 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 11:38 < ofek> poor Windows :( 11:38 < andytoshi> lol, no, i fucked something up.. 11:38 < andytoshi> scalar_inverse: min 10.9us / avg 11.0us / max 11.3us 11:38 < andytoshi> it's 4-5x, like i remembered 11:38 < gmaxwell> ecdsa_verify: min 83.9us / avg 84.5us / max 90.3us 11:38 < gmaxwell> ecdsa_verify: min 98.9us / avg 101us / max 104us 11:38 < andytoshi> oh, thank you, i'll shut up now 11:38 < gmaxwell> see, not twice as long. :P 11:39 < sipa> 68us vs 78us here 11:39 < ofek> have any of you successfully cross compiled for windows with gmp? 11:40 < gmaxwell> andytoshi: if it were 2x I would be making a fuzz about using dettmann's algorithim. 11:40 < andytoshi> 61.3us vs 72.2us for me .... just compiling with and without GMP like a sane person 11:41 < andytoshi> ofek: 'fraid not 11:41 < gmaxwell> ofek: should be 'no big deal' but you'll need gmp cross compiled first. 11:42 < waxwing> ofek: is the link both you and I found, not working for you then? 11:42 < ofek> gmaxwell, that's the part that isn't working 11:42 < ofek> waxwing, right 11:43 < ofek> wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2 && tar -xjpf gmp-*.tar.bz2 && cd gmp* && ./configure --host=i686-w64-mingw32 --prefix="$HOME/prefix-win32" --disable-shared --enable-fat && make && make check && make install && cd .. 11:45 < ofek> 8 tests fail 11:49 < bsm117532> We've compiled for windows. 11:50 < arubi> ofek, `file ` ? 11:50 < arubi> probably a windows binary..? 11:53 < ofek> I took out 'make check' and it installed but libsecp256k1 can't find it 11:54 < sipa> the linker fails? 11:54 < sipa> or running fails? 11:54 < ofek> checking for gmp.h... no 11:54 < ofek> configure 11:54 < sipa> you're passing --prefix=... to libsecp256k1 configure as well? 11:54 < ofek> ./configure --with-bignum=gmp --host=i686-w64-mingw32 --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-endomorphism 11:55 < sipa> seems not 11:55 < sipa> you're installing gmp in $HOME/prefix-win32, but not telling libsecp256k1 to look there 11:56 < ofek> oh ok 11:58 < ofek> sipa, still no 11:59 < ofek> ./configure --prefix="$HOME/prefix-win32" --with-bignum=gmp --host=i686-w64-mingw32 --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-endomorphism 11:59 < ofek> checking for gmp.h... no 11:59 < ofek> brb 13:06 -!- indutny [~indutny@188.226.143.86] has quit [Ping timeout: 260 seconds] 13:08 -!- indutny [~indutny@188.226.143.86] has joined #secp256k1 13:08 -!- indutny is now known as Guest21502 13:16 < ofek> sipa, you there? 13:23 < sipa> no 13:23 < sipa> :) 13:23 < sipa> sorry, i don't know anything else to try 13:23 < ofek> sipa, hi! 13:23 < ofek> aww :( 13:25 < ofek> I guess I'll just ship to Windows without gmp :/ 13:26 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Ping timeout: 240 seconds] 13:26 < ofek> sucks especially b/c I use Windows (forced to) 13:30 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 13:39 < ofek> is a global context multi-process safe? https://github.com/bitcoin-core/secp256k1/blob/master/include/secp256k1.h#L31-L33 13:40 < ofek> I can just use one context for everything? 13:45 < sipa> yes 13:45 < ofek> cool ty 13:51 < sipa> only the randomize and destruct call need write access to the context 13:51 < sipa> i believe that's explained in the .h file 13:55 < ofek> I *think* my issue is libsecp256k1 related 13:56 < ofek> Aria2 builds gmp exactly as I am https://github.com/aria2/aria2/blob/master/Dockerfile.mingw#L38 13:57 < ofek> but libsecp256k1's configure can't find it 14:52 < ofek> what's jni? 14:52 < sipa> java native interface 14:54 < ofek> sipa, if I'm not using java, then I can --disable-jni? 14:55 < sipa> yes 14:55 < ofek> cool ty 14:56 < ofek> it looks like Travis doesn't come with java by default anyway 16:38 < ofek> anybody here using Windows and has Python 3 that can try a thing for me? 16:44 < sipa> ofek: it seems that bitcoin core's libsecp256k1 release builds for windows also don't have gmp 16:46 < ofek> sipa, I think I just did it (sans gmp) 16:46 < ofek> need someone to test 17:22 -!- droark [~droark@c-24-22-123-27.hsd1.or.comcast.net] has quit [Ping timeout: 246 seconds] 19:02 < ofek> the Python bindings work and are stable now :) https://github.com/ofek/coincurve 19:04 < ofek> just need to ship wheels for Linux 32 bit 19:25 -!- Rspigler [~Rspigler@104.129.24.147.adsl.inet-telecom.org] has joined #secp256k1 19:35 -!- Rspigler [~Rspigler@104.129.24.147.adsl.inet-telecom.org] has quit [Quit: Textual IRC Client: www.textualapp.com] 19:45 < ofek> and now everything has a wheel! 19:46 < ofek> Linux, macOS, and Windows all have binary packages for both 64 and 32-bit architectures! 19:47 < ofek> just 'pip install coincurve' 21:11 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Ping timeout: 240 seconds] 21:11 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 21:39 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has quit [Remote host closed the connection] 21:40 -!- afk11 [~afk11@gateway/tor-sasl/afk11] has joined #secp256k1 22:21 -!- Guest21502 is now known as indutny