Windows build issues
There are multiple problems with the windows build.
- 32bit: one user is reporting problems with his XP. It uses an older CPU (Xeon X5450) so that may be why. Maybe it can be tested by forcing an older CPU in qemu settings. I tried various versions of OpenSSL DLL, both the ones from slwebpro and cross-compiled with mingw. The result is the same. He says the old bitmsghash DLLs (which I built with MSVC) worked. Here is the error:
WARNING - Using default logger configuration
ERROR - C PoW test fail.
Traceback (most recent call last):
File "proofofwork.py", line 306, in init
File "proofofwork.py", line 117, in _doCPoW
WindowsError: [Error -1073741795] Windows Error 0xC000001D
ERROR - C PoW test fail.
Traceback (most recent call last):
File "proofofwork.py", line 316, in init
File "proofofwork.py", line 117, in _doCPoW
WindowsError: [Error -1073741795] Windows Error 0xC000001D
I can't reproduce this myself and I have no other reports of problems with XP.
- 64bit: crashes. Seems to be fixed by downgrading Pyinstaller. However, I think that's just masking the actual bug, which is that the cryptography isn't working correctly. Pubkey and getpubkey objects it creates can't be decoded by others and vice versa. Sending and receiving messages seems to work though. I have no idea what's wrong. I tried multiple versions of OpenSSL, DLL from slwebpro or self-compiled, and I don't see any difference. EDIT: It only seems to affect Windows 10. On Windows 7 it works without problems. Also the 32bit version works ok on the same w10 system.
The 64bit problem with w10 happens due to how the OpenSSL pointers are handled in pyelliptic. Currently, the input/output are just treated as void pointers and data is accessed through an offset. I suspect that on some systems this creates a problem with some memory protection subsystems and leads to a memory access violation. pycoin also uses OpenSSL through ctypes, but it defines bignum as a struct. Running the pycoin unit tests on windows 10 64bit succeeds. Therefore, the pyelliptic code should be refactored to use bignum and EC_point as structs rather than void pointers. This may also solve the problem for the guy with the older xeon.
There is also an option to use pyd on Windows: 04ef9b9
The 64bit problem can be reproduced when running the unit tests under wine on linux.