For study purpose , is there any simple btc miner code that are very easy to understand as long as i understand the concept of btc mining ?

I've seen similar question on this website but the answer refers to either a messy code that very hard to understand or an outdated code that does not support the current btc miner protocol (e.g : DiabloMiner) , that's why i'm asking this.

Any code which last update is behind 2020 i consider as outdated.

  • 1
    Welcome to bitcoin.stackexchange.com. You will find it useful to take the tour and have a quick look at the help center. Please note that "Easy to understand" is subjective and invites opinion-based answers which don't fit well here. Sep 15, 2021 at 9:37
  • Mining is still exactly the same problem as it always has been in Bitcoin, so it's not clear to me why code examples that predate 2020 are outdated.
    – Murch
    Sep 15, 2021 at 14:22
  • @Murch because of newer miner protocol Sep 15, 2021 at 14:29
  • So, you would like to understand how Stratum V2 works?
    – Murch
    Sep 15, 2021 at 14:35
  • The GBT and Stratum protocols that are used for mining in practice haven't changed since 2012-2013 somewhere. Before that time, the "getwork" protocol was used which is now obsolete. But any code you find from the last 4 to 8 years will probably work fine (4 years because segwit extensions may matter). Sep 16, 2021 at 1:21


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.