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...


3 Answers 3


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

  • 2
    I am looking for a more generic document that explains the steps involved. Thanks for this though :)
    – user493
    Sep 26, 2011 at 9:54
  • 2
    I would say python functions pretty well as pseudo-code
    – Earlz
    Dec 4, 2013 at 21:24

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


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


  • 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. Dec 12, 2017 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 2, 2018 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 Jan 2, 2018 at 19:13
  • does this mine actual bitcoin ? and do you have any links for mining actual bitcoin in javascript? Dec 23, 2021 at 17:47