madMAx43v3r / chia-gigahorse

221 stars 31 forks source link

ProofOfSpace: Provide an executable file that can run on NAS (does not rely on OpenCL) #238

Open jiongxuan opened 10 months ago

jiongxuan commented 10 months ago

Hi, I want to execute ProofOfSpace to detect the max farm size on Synology NAS. But the execution failed, prompting that the libOpenCL.so file could not be found. I searched online and couldn't find a good solution.

ERROR LOG: ./ProofOfSpace: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

Since using Gigahorse on a NAS is a good option, please take a look at it considering the size of your farm to test. Can you provide a version that does not rely on OpenCL and can run on NAS, so that it can be more flexible? Thanks!

jiongxuan commented 10 months ago

EDIT: I researched for several hours and finally solved this problem. Share it here.

  1. On Debian, find the installation package of ocl-icd-libopencl1 and download it; https://packages.debian.org/sid/amd64/ocl-icd-libopencl1/download

  2. Unzip the lib folder and put it on Synology NAS (such as /path/to/lib, any location)

  3. Before execution, configure "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/lib", and then execute ProofOfSpace again and it will be successful.

This can be executed successfully without compromising NAS security (no root permissions required).

Supplement: C4 compression level, dual CPU threads, difficulty 100, on my NAS (DS224+), the obtained Max Farm Size @ 256 is 0.52 PiB, which is very good and enough for use

Finally, suggestion: Although this limitation can be bypassed, I still hope to create a separate package that does not rely on OpenCL, so that it can be more friendly to NAS users.

lordrip commented 6 months ago

For rpm systems (Fedora in my case) the package is ocl-icd.