rkharris12 / fpga_bitcoin_miner

52 stars 28 forks source link

Not connecting to a pool #2

Closed developeralgo8888 closed 2 years ago

developeralgo8888 commented 3 years ago

Since several bitcoin chinese pools have been shutdown , i am trying mmpool.org for testing.

i am trying to connect pynq-z2 board to mmpool bitcoin pool for a test.

  1. i registered on mmpool.org
  2. then tried to use the registration as required to connect

root@kraken-miner:/home/xilinx# python3 fpgaminer.py -P -o stratum+tcp://mmpool.org:3333 -u kraken001 -p x

[2021-11-12 19:22:20] [INFO] Starting server on mmpool.org:3333 [2021-11-12 19:22:20] JSON-RPC Server < {"id": 1, "method": "mining.subscribe", "params": ["FPGAMiner/0.1"]}

[2021-11-12 19:22:20] JSON-RPC Server > {"result":[[["mining.notify","616c7f9e"]],"8e7d6c61",8],"id":1,"error":null} Exception in thread Thread-2: Traceback (most recent call last): File "fpgaminer.py", line 446, in _handle_incoming_rpc self.handle_reply(request = request, reply = reply) File "fpgaminer.py", line 542, in handle_reply raise self.MinerWarning('Reply to mining.subscribe is malformed', reply, request) Miner.MinerWarning: Mining Sate Error: Reply to mining.subscribe is malformed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "fpgaminer.py", line 448, in _handle_incoming_rpc output = e.message AttributeError: 'MinerWarning' object has no attribute 'message'

Is there something i am missing on the README ?

i in home/xilinx folder i have fpgaminer.py, pynq module and overlays folder from the FPGA miner main folder to much line 115

root@kraken-miner:/home/xilinx# ls -l total 80 drwxr-xr-x 6 xilinx xilinx 4096 Nov 12 18:32 FPGA -rwxrwxrwx 1 xilinx xilinx 32253 Oct 5 03:07 fpgaminer.py drwxrwxrwx 6 xilinx xilinx 4096 Oct 19 2020 jupyter_notebooks -rwxrwxrwx 1 xilinx xilinx 4154 Oct 5 03:07 merkle_test.py drwxrwxrwx 2 xilinx xilinx 4096 Nov 12 18:33 overlays drwxr-xr-x 2 root root 4096 Nov 12 18:47 pycache lrwxrwxrwx 1 xilinx xilinx 43 Oct 19 2020 pynq -> /usr/local/lib/python3.6/dist-packages/pynq drwxr-xr-x 3 root root 4096 Nov 12 17:56 pynqcopy -rw-rw-r-- 1 xilinx xilinx 863 Oct 5 03:07 README.md -rw-r--r-- 1 xilinx xilinx 83 Oct 19 2020 REVISION -rw-r--r-- 1 root root 32 Nov 12 19:19 sds_trace_data.dat -rwxrwxrwx 1 xilinx xilinx 7778 Oct 5 03:07 sha256d_fpga_sim.py

developeralgo8888 commented 3 years ago

Managed to connect after setting up on slushpool ( i thought its shutdown already ---anyway ) but this is what i am getting :

root@kraken-miner:/home/xilinx# python3 fpgaminer.py -o stratum+tcp://ca.stratum.slushpool.com:3333 -u testingBits.coocoonest001 -p x [2021-11-12 19:49:48] [INFO] Starting server on ca.stratum.slushpool.com:3333 [2021-11-12 19:50:07] [INFO] Hashrate: 17.422539 khashes/s [2021-11-12 19:50:37] [INFO] Hashrate: 17.314583 khashes/s [2021-11-12 19:51:07] [INFO] Hashrate: 17.362420 khashes/s

Nothing near 39 MH/s your video suggests. I think i must be missing something or do i need to adjust something

rkharris12 commented 3 years ago

Nice! I also used slushpool for my testing. The code has different options for the PoW implementation: FPGA, hashlib, and pure python. It defaults to hashlib, which is 17khashes/s. To use the FPGA, try adding "--impl fpga". For a full list of command line arguments you can run "python3 fpgaminer.py -h"