Bitcoin Forum
May 03, 2024, 07:29:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Connect my FPGA to a mining pool  (Read 602 times)
sir.humus (OP)
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
February 28, 2017, 02:56:02 PM
 #1

Hi,

so:
1) I've got a new ZedBoard to play with
2) Downloaded this code: https://github.com/ElPopularVale/Zedboard-Bitcoin-Miner
3) Compiled the VHDL & Embedded C and loaded it on the board.
4) I'm trying to connect to Kano.is with the python script, but I get a connection error (getaddrinfo failed)

any suggestion how to continue?
maybe some other python to connect between my FPGA and the mining pool?

Thanks

{if it helps anyone, the registers on the FPGA are: data, midstate & target}
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
1714721366
Hero Member
*
Offline Offline

Posts: 1714721366

View Profile Personal Message (Offline)

Ignore
1714721366
Reply with quote  #2

1714721366
Report to moderator
sir.humus (OP)
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
February 28, 2017, 04:13:02 PM
 #2

I've found that the problem is that my board configured to the old getwork protocol, but I'm trying to connect to kano.is through stratum protocol.
so I found this bridge between old HTTP/getwork protocol and Stratum mining protocol:
https://github.com/slush0/stratum-mining-proxy

But I'm not sure how to use it in my current python code?
How do I get the {data, midstate, target} from it?
sir.humus (OP)
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500


View Profile
March 02, 2017, 11:20:22 AM
 #3

A new Update!

FPGA is working --> Talking with the Arm --> Which is communicate with my Python code through UART --> The Python pulling data from the Stratum mining proxy --> which connected to the pool

So now everything is working, except I was putting in some test data and this is the result:

This is my input data:
Code:
{"hash1"=>"00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000", "target"=>"ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000", "submitold"=>true, "identifier"=>"91138", "data"=>"00000002fc517a2df2b283474b135215a00604af276318262f5eebc00000043100000000db9fcfcc3781c1342c2750214e46407286cbf29985e688d0392e6b8005c4c8245032580a1a07a85e00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000", "midstate"=>"03ad4305c1cad2bf14a99b82f3557b5722a060d6ac207450e939cb9f8143a605"}

Or in a more human-readable format the essence of this is the data, midstate and the target:
Code:
Data:
00000002 fc517a2df2b283474b135215a00604af276318262f5eebc00000043100000000 db9fcfcc3781c1342c2750214e46407286cbf29985e688d0392e6b8005c4c824 5032580a 1a07a85e 00000000 000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000
Midstate:
03ad4305c1cad2bf14a99b82f3557b5722a060d6ac207450e939cb9f8143a605
Target:
ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000

And I know that the right solution is:  (nonce = 0x8e631c12)

But the nounce that I get is:
0x000141D0

And the hash of the binary data that I get is:
"0000075B2D7B45479BDE7D0A073900AE825F69C9FF16084CF83BB45B4F7B63C9"

So, where's the mistake? 
Or:  where are the mistakes?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!