1

I am a student and doing research on Bitcoin. I wanted to know how mining is done but I wanted it see the some basic java code. Can some one provide me with resources? I would appreciate if some one can suggest me some libraries to look into. I checked BitcoinJ but found out that it does not support mining.

Thanks

  • There are several mining clients written in Java. en.bitcoin.it/wiki/Mining_software Does one of those answer your question? – Nick ODell Apr 6 '15 at 19:03
  • @coder121: does it need to be a Java library? Which platform are you running it on? Android, per chance? – Wizard Of Ozzie Apr 10 '15 at 12:38
  • @WizardOfOzzie It should be Java. I am not running on any mobile device. I wanted to run it on my pc. – EmbarkPro Apr 12 '15 at 16:07
3

One of the very fist GPU miners was in java using OpenCL. It was called DiabloMiner and you can find the source here;-

https://github.com/Diablo-D3/DiabloMiner

It hasn't been updated the the past two years but it is still fully functional.

  • Will surely look into this. – EmbarkPro Apr 15 '15 at 18:19
  • 2019- Does not support the current protocol – scopessuckM8 Jun 7 at 0:44
2

I'm not aware of any Java mining code existing, and I would not expect it to: mining needs to be as fast as possible, so you wouldn't want to write it in a language that runs on a virtual machine.

Since the reference implementation, Bitcoin Core, stands as the ultimate documentation of the protocol, and it is written in C++, I would say that anyone doing research on Bitcoin needs at least a competent reading knowledge of C++. Once you have that, you can read the mining code in Bitcoin Core.

  • Thanks Nate. But I am not competent in C++ .Hence I am looking for something in Java. – EmbarkPro Apr 15 '15 at 18:19
  • @Coder121: My point is that I think your best bet to reaching a full understanding of this process is to learn enough C++ to read the existing code. I don't think it will be a tremendous leap if you already know Java. – Nate Eldredge Apr 15 '15 at 19:42

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.