17

How would I go about making the simplest form of a CPU bitcoin miner? I have not been able to find documentation on the whole process...

Murch
  • 75,206
  • 34
  • 186
  • 622

3 Answers3

9

If you're fluent in Python, there is a reference RPC miner, written by one of bitcoin's developers: https://github.com/jgarzik/pyminer

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
Pieter Wuille
  • 105,497
  • 9
  • 194
  • 308
  • 2
    I am looking for a more generic document that explains the steps involved. Thanks for this though :) –  Sep 26 '11 at 09:54
  • 2
    I would say python functions pretty well as pseudo-code – Earlz Dec 04 '13 at 21:24
6

Here, a nice explanation (even if the post is old) http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html

gdlm
  • 161
  • 1
  • 1
3

This is a great tutorial for that, if you are familiar with python:

https://github.com/philipperemy/my-first-bitcoin-miner

DavideC
  • 31
  • 2
  • 2
    Welcome to Bitcoin.SE! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – meshcollider Dec 12 '17 at 23:31
  • 1
    My answer is in the same still and of the same quality of the others, but I have got a downvote and a comment saying: "We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed." The other answers are very similar to mine, just show another tutorial. I think this is very, very unfair. – DavideC Jan 02 '18 at 13:13
  • Apologies, you're correct, in general link-only answers are discouraged but there's no reason that the other answers got upvotes while yours was downvoted. I'm sorry – meshcollider Jan 02 '18 at 19:13
  • does this mine actual bitcoin ? and do you have any links for mining actual bitcoin in javascript? – Rohan Devaki Dec 23 '21 at 17:47