Xenoncat's solver integrated into nheqminer

Hi All,

I could integrate xenoncat's solver into nheqminer.
Check my repo and let me know whether it is useful or not.

Follow instructions in README file.

If you feel this project is useful to you. Feel free to donate.

My BTC address: 1PqPwYC8u2XCQxJv6qu3HwCRdQkdsqhXRS
My ZEC address: t1aZzXYsF1gNRkxsgamcdzzyWxtheXU3zkz

3 Likes

Sweet, thanks for doing this & sharing it publicly. Looks like it's ~2.2x faster than the upstream nheqminer (tromp-based) solver on i7-4770k.

Equihash CPU Miner for NiceHash v0.1c
Thanks to Zcash developers for providing most of the code
Special thanks to tromp for providing optimized CPU equihash solver

Setting log level to 2
[09:34:35][0x00007fa8de02f700] stratum | Connecting to stratum server zec.suprnova.cc:2142
[09:34:35][0x00007fa8de02f700] stratum | Connected!
[09:34:35][0x00007fa8de02f700] stratum | Starting miner
[09:34:35][0x00007fa8dd1fa700] miner#0 | Starting thread #0
[09:34:35][0x00007fa8d7fff700] miner#2 | Starting thread #2
[09:34:35][0x00007fa8dc9f9700] miner#1 | Starting thread #1
[09:34:35][0x00007fa8d77fe700] miner#3 | Starting thread #3
[09:34:35][0x00007fa8d6ffd700] miner#4 | Starting thread #4
[09:34:35][0x00007fa8d67fc700] miner#5 | Starting thread #5
[09:34:35][0x00007fa8de02f700] stratum | Subscribed to stratum server
[09:34:35][0x00007fa8de02f700] miner | Extranonce is f83f0460000000000000000060043ff9
[09:34:35][0x00007fa8de02f700] stratum | Target set to 00f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
[09:34:35][0x00007fa8de02f700] stratum | Received new job #1c3
[09:34:35][0x00007fa8de02f700] stratum | Authorized worker xxx
Illegal instruction

@zcash111 are you running on Intel,linux,x86 processor?
Xenoncat's code very specific to above config.

Linux Ubuntu-1604-xenial-64-minimal 4.4.0-38-generic
Intel 3770, # uname -p x86_64

@zcash111 You are running AVX2 code on a processor that does not support AVX2, hence Illegal instruction.
The solution is to recompile the miner, link with equihash_avx1.o instead of equihash_avx2.o

grep -r "avx" ./
./nheqminer/CMakeLists.txt:target_link_libraries(${PROJECT_NAME} ${LIBS} ${CMAKE_THREAD_LIBS_INIT} ${nheqminer_SOURCE_DIR}/equihash_avx1.o)

make[2]: *** No rule to make target '../equihash_avx1.o', needed by 'nheqminer'. Stop.
make[2]: *** Waiting for unfinished jobs....

Download equihash_avx1.o from https://github.com/xenoncat/equihash-xenon/blob/master/Linux/asm/equihash_avx1.o

Modified code to detect whether CPU supports AVX2 or not.
If CPU does not support AVX2, it falls back to tromp's solver.

Nice. Get 12.6 sol to 20.

sudo apt-get update
sudo apt-get upgrade
sudo apt install qt5-default
sudo apt-get install cmake build-essential libboost-all-dev
git clone https://github.com/sarath-hotspot/nheqminer.git
cd nheqminer/nheqminer
mkdir build
cd build
cmake ..
make

nheqminer: command not found
I have tested in all folders

[11:50:16][0x00007fc0e50d0700] stratum | Connected!
[11:50:16][0x00007fc0e50d0700] stratum | Starting miner
[11:50:16][0x00007fc0e48cf700] miner#0 | Starting thread #0
[11:50:16][0x00007fc0dffff700] miner#1 | Starting thread #1
[11:50:16][0x00007fc0e50d0700] stratum | Subscribed to stratum server
[11:50:16][0x00007fc0e50d0700] miner | Extranonce is e45c0460000000000000000060045ce5
[11:50:16][0x00007fc0e50d0700] stratum | Target set to 00f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
[11:50:16][0x00007fc0e50d0700] stratum | Received new job #1cb
[11:50:17][0x00007fc0e50d0700] stratum | Authorized worker nothosaurus.1
Illegal instruction

Linux hw8-1 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

Intel(R) Xeon(R) CPU E7-8890 v2 @ 2.80GHz

Same problem:

[09:44:14][0x00007f2fe1d64700] miner | Extranonce is de33fd0f00000000000000000ffd33dd
[09:44:14][0x00007f2fe1d64700] stratum | Target set to 00f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0
[09:44:14][0x00007f2fe1d64700] stratum | Received new job #18e
Illegal instruction

Linux zcash1 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz
stepping : 9
microcode : 0x12
cpu MHz : 3599.882
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bugs :
bogomips : 6800.30
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Check build folder.

Àaaaaaaa

Many thanks,

with xenoncat's I've 10,20 H/ and 19.3 Sol/s, as soon as I can I'll a donation.

It works very well.

terminate called without an active exception
Aborted (core dumped)

Note: Im trying to run with flypool

Hi, still no CUDA miner on Linux?

This is a CUDA miner

Ah, great thank you!

I got it working for suprnova but can't flypool