Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: Brainslug on June 15, 2011, 10:25:48 AM



Title: Mining programming-related questions
Post by: Brainslug on June 15, 2011, 10:25:48 AM
(I hope this is the right forum, if not sorry and please move it to the correct one  :-X)

First of all: Regarding my programming "skills", I guess I can be called a novice with a little bit of advanced knowledge in writing programs. I am/have been working with Java, ANSI C and C++ for several years, and though I'm still far away from being a really good programmer I think I can say I learn very quickly once I've set myself a target on what I want to achieve. With that being said...

I'm trying to get a basic understanding on how the miners (especially the GPU miners) are working, how they're structured and what you need to build one. I've heard the term kernel a few times, so I guess there are a few trusty kernels that are specially built for the hash-calculating operations on GPUs (using OpenCL if I'm not mistaken) and if I've understood the principle correctly one just builds a miner on top of these kernels (please correct me if I got this wrong, as said before, I'm not very well-read on that topic).
To come to the point, I have a little project in mind which involves maybe building a mining-program and I was hoping you guys can maybe point me to some tutorials/examples or give me a few tips or so. If this little project succeeds I'll of course share it with you if you like :D Though I can't tell you exactly what it'll be simply because I myself first have to see it through.

Thanks in advance!


Title: Re: Mining programming-related questions
Post by: MoonBuggy on June 15, 2011, 04:40:40 PM
I've actually been looking for the same thing; unfortunately I didn't find any useful "Anatomy of a Miner" document (I might write one myself once I get my head around it fully), but taking a look at the code for pyminer (https://github.com/jgarzik/pyminer/blob/master/pyminer.py) is probably a good bet - it seems to be the simplest and most readable one out there. Satoshi's original paper (http://www.bitcoin.org/bitcoin.pdf) is also definitely worth the time, if you haven't taken a look at it already, to get the broad picture of what all this hashing actually achieves.


Title: Re: Mining programming-related questions
Post by: Brainslug on June 15, 2011, 04:52:20 PM
Thanks, I guess that's a start. I'd appreciate it if you'd share what you can find if you have the time for it :)