-
sech1
hyc I'm done with rx_slow_hash:
SChernykh/monero 32adb12 - testing it on one of my nodes now, local node synced 10000 blocks across several RandomX epochs without issues.
-
sech1
testing it with MONERO_RANDOMX_FULL_MEM env
-
sech1
I think it's the 3rd time I'm doing all this logic :D First XMRig, then P2Pool, now monerod :D
-
hyc
lol
-
hyc
this comment is confusing When dataset is used for PoW verification, it's updated in background without stalling other threads (verification is done in light mode then)
-
sech1
When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
-
hyc
ok.
-
hyc
so when dataset is busy being updated, it doesn't get used. fine.
-
hyc
Removed `SEEDHASH_EPOCH_LAG` and `SEEDHASH_EPOCH_BLOCKS` environment variables
-
hyc
I think the testsuite still uses these
-
sech1
damn
-
sech1
indeed
-
hyc
specifically to set smaller epochs so that boundary crossings can be checked
-
sech1
I was searching for all C/C++ files but forgot *.py
-
sech1
-
hyc
left a few inline comments
-
sech1
-
sech1
It turns out, SRWLock functions on WIN32 require Windows Vista or newer
-
sech1
does official Monero binaries support Windows 7?
-
sech1
pthread_rwlock_t works on Windows 7, so maybe just leave only pthread_rwlock_t?
-
hyc
I've forgotten what our minimum windows version is
-
hyc
I build on windows7
-
sech1
"Microsoft offered Extended Support for three years which is set to expire on January 14, 2023"
-
sech1
right about time we start using native SRW locks :D
-
sech1
of course it's possible to write a wrapper that checks if kernel32.dll has SRW lock functions and use them, or pthread_rwlock_t as a backup
-
sech1
what % of Windows users run Monero on Windows 7 ?
-
hyc
no idea, most should be on at least 8 by now, 10 is prob common
-
hyc
-
sech1
I've just checked how libuv does it, and they just use SRW lock functions. I guess libuv dropped Windows 7 support already.
-
hyc
should never use pthread APIs on windows, they're just emulated on top of win32 APIs
-
sech1
-
hyc
and in various versions of gcc runtime they were broken
-
sech1
I think Microsoft are just wrong in their own docs
-
sech1
sure, I can change back to #ifdef _WIN32, but then there's an issue with i686 win build
-
hyc
-
hyc
yeah the doc says it's in the header file as of win7
-
sech1
-
sech1
oh, I know why they say Minimum supported client Windows Vista
-
sech1
because they dropped Windows 7 and don't support it anymore, lol
-
hyc
heh
-
sech1
search & replace changed 7 to Vista in one place in docs, but not in another (header file as of win7)
-
hyc
why aren't the rest of the SRW functions coming up undefined?
-
sech1
they all come up as undefined
-
hyc
ah ok
-
hyc
isn't vista older than win7?
-
sech1
-
sech1
Vista came out after win7
-
hyc
linking only fails on i686, not x86-64?
-
sech1
yes
-
hyc
sounds more like mingw is missing the 32bit import library
-
sech1
it's kernel32.dll functions, how can it miss it
-
sech1
or maybe it includes very old kernel32 lib
-
hyc
it still needs a libfoo.a import library
-
hyc
the import library is what tells the linker that it's a DLL reference
-
hyc
-
hyc
vista is older
-
hyc
came right after xp
-
sech1
huh
-
sech1
Mandela effect, lol
-
sech1
-
sech1
x86_64-w64-mingw32 builds just fine
-
hyc
it's in CMakeLists.txt
-
hyc
-DWINVER=0x0501
-
sech1
0501, isn't it Windows XP?
-
hyc
yeah
-
hyc
maybe we either delete it entirely, or just bump it up
-
sech1
that explains it
-
sech1
I'll change it to 0x0601 (Windows 7)
-
sech1
or no, I need to find the number for Vista
-
sech1
-
sech1
0x0600
-
hyc
yeah should be ok
-
hyc
windowsxp 0.4% market share :P
-
sech1
all right, the final one for today
SChernykh/monero ff58dbe
-
hyc
ok. for future, you really should use postincrement in hash2hex. it makes a 20% perf difference
-
hyc
-
hyc
that's with gcc -O2. the optimizer can't fix that for you
-
sech1
that's different code in that tweet
-
sech1
the for loop in hash2hex will just use a register
-
hyc
will it optimize i*2+0 ?
-
sech1
definitely
-
sech1
to some sort of LEA instruction
-
sech1
most likely it will also unroll the loop 2x or 4x, modern compilers are good at this kind of loop of fixed size
-
sech1
also, this function is like 0.1% of CPU time of the minfo that prints this hex hash, lol
-
sech1
i686-w64-mingw32 build fine this time