I just want to understand how this mining process works (from the developers point of view from very start to end). Can someone guide me towards a doc or a open source code (I am newbie here so a VERY BASIC one)? Thanks in advance
Tim S. pretty much covered it, but I wanted to 2 great resources which have been very helpful for myself and many others:
- Ken Shirriff's blog has a few Bitcoin mining related posts which use Python code to great effectiveness; whilst Bitcoin Mining The Hard Way is probably the most useful, there's also some novel use cases where Ken tries Bitcoin mining by hand and using a 55 year old mainframe
- Not specifically related to mining, but very useful in visualising related concepts is RoyalFork Blog
I'm not sure that a guide as basic as you describe is even possible. It depends on what exactly you mean. Mining itself isn't too complicated to read and understand, but writing a start-to-end app that can be used for mining means writing a full node. That is very complicated.
Writing a Bitcoin miner from start to end involves not only collecting transactions, calculating the Merkle root, constructing the block header, and the actual hashing/mining, but also verifying the blockchain and each transaction in it, and communicating with peers in the network to get and send blocks and transaction.
protected by Community♦ Mar 23 '18 at 12:33
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?