Bitcoin Forum
July 20, 2018, 03:18:44 PM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Custom miner software development question  (Read 937 times)
mawakajaka
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 09, 2016, 07:25:52 PM
 #1

Hello all,


I've been searching around the forum/web but I can't find any real answer to my question.

Question short:

How can I write a custom program that is able to get the correct data from a mining pool?


Question long:

I've written a bitcoin miner module on a zynq 7000 SoC/fpga development board called a Zybo.
The fpga expects a bitcoin header and processes it until the nounce is found for that difficulty.
The zynq7000 chip has 2 arm A9 processors and a fpga part with interconnection in between.
Currently Linux is running on these processors and data can be send from/to the fpga part.

I want to be able to mine on my fpga but I need to receive the correct data from a mining pool.

Currently I see 2 options:

1) Make a custom driver for cgminer or bfgminer and let them handle the communication with the mining pools. However I cant find any details on how to write a driver for these programs and the existing drivers aren't really clear to use as an example.

2) Write a custom program that communicates with the mining pool. This program will extract the received data from the pool and send data/controls to the fpga. However I cant find any details of how to communicate to the mining pools (I'm currently using f2pool and antpool but I'm open for other suggestions).

Can anyone help me getting started with writing a custom driver or mining software?

Kind regards,
Mawakajaka



1532099924
Hero Member
*
Offline Offline

Posts: 1532099924

View Profile Personal Message (Offline)

Ignore
1532099924
Reply with quote  #2

1532099924
Report to moderator
1532099924
Hero Member
*
Offline Offline

Posts: 1532099924

View Profile Personal Message (Offline)

Ignore
1532099924
Reply with quote  #2

1532099924
Report to moderator
1532099924
Hero Member
*
Offline Offline

Posts: 1532099924

View Profile Personal Message (Offline)

Ignore
1532099924
Reply with quote  #2

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

Posts: 1532099924

View Profile Personal Message (Offline)

Ignore
1532099924
Reply with quote  #2

1532099924
Report to moderator
1532099924
Hero Member
*
Offline Offline

Posts: 1532099924

View Profile Personal Message (Offline)

Ignore
1532099924
Reply with quote  #2

1532099924
Report to moderator
kano
Legendary
*
Online Online

Activity: 2520
Merit: 1045


Linux since 1997 RedHat 4


View Profile
December 10, 2016, 02:12:18 AM
 #2

Whatever you do, test it on the live bitcoin network solo mining until it finds some blocks.

People seem to like testing their failed attempts at writing proxies and miners by pointing them at live pools and letting the pool take the loss if anything is wrong.

Now if we could just setup a lynch mob for this sort of thing ... ... ...

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
mawakajaka
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 10, 2016, 07:22:11 PM
 #3

Hey,

Thanks for replying but do you know how to receive a valid bitcoin header from the network?


Kind regards,
Mawakajaka
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2590
Merit: 1111


Ruu \o/


View Profile WWW
December 10, 2016, 09:21:50 PM
 #4

He's the other co-author of cgminer along with me, so the answer is yes, he does know. What we would both say is look at cgminer to see how it communicates... The code is the reference client implementation of stratum and if you can't follow that then no one is going to hand hold you to write your own implementation. Below is a link to the only documentation available of the stratum protocol which is the only mechanism still in use to mine to pools:
https://bitcointalk.org/index.php?topic=557866.0

Mining to bitcoind is totally different to mining to pools, but then cgminer also has an implementation of doing that. Again, no one is going to hand hold you to do that.

On the other hand, you're talking about mining with an fpga anyway which is a futile exercise at current bitcoin difficulty. You're missing some fundamentals about mining if you're even considering that unless you're doing it purely as a learning exercise. No pool would welcome you with open arms mining with such a slow device - it wouldn't earn enough bitcoin to even get a payout if you mined for a year.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
mawakajaka
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 12, 2016, 11:59:54 AM
 #5

Thanks for making it more clear. My purpose is purely educational and I don't want to disturb other miners.

I've been looking around and I'll use the testnet for development purpose.

Kind regards,
mawakajaka
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!