Bitcoin Forum
November 06, 2024, 11:17:06 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Custom miner software development question  (Read 1114 times)
mawakajaka (OP)
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



kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


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 - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
mawakajaka (OP)
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
Legendary
*
Offline Offline

Activity: 4284
Merit: 1645


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.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
mawakajaka (OP)
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:  

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