Bitcoin Forum
May 27, 2024, 05:06:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I am developing a CLI SHA-256 miner using MSVC. Where can I start?  (Read 53 times)
dbubbis (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 06, 2022, 11:54:07 PM
 #1

I want to make crypto mining software that uses the SHA-256 hashing algorithm to mine. I have the basics like the startup page and some actions, but I do not know how to set up the algorithm, connect to the blockchain, or utilize the CPU or GPU. Also, I am using Visual Studio 2022 to code this with a typical C++ console application. Any help would be appreciated.
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10594



View Profile
January 07, 2022, 05:05:49 AM
 #2

You have to start by learning how Proof of Work works, what is mined and how it is changed on each failed hash and what it is compared to (the target).
https://en.bitcoin.it/wiki/Proof_of_work
https://en.bitcoin.it/wiki/Target

Then you have to learn the commands that are available in the full node you are running (eg. JSON RPC of bitcoin core) and how to use them.
https://developer.bitcoin.org/reference/rpc/

Next is learning how SHA256 algorithm works and how the algorithm itself can be optimized to compute double hash of headers in fastest way possible and then write the code to run it on GPUs.
https://en.wikipedia.org/wiki/SHA-2

There is a ton of wiki articles on each part that you can search on google and study.

Finally you can search on Github for similar projects written many years ago and with the knowledge you already acquired you can learn how those projects work and improve your own work.

After you did your initial research, if you had any problem with a specific part, feel free to ask.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
cryptoQueez
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3


View Profile
January 07, 2022, 05:23:45 AM
 #3

You have to search by following below link:
https://en.bitcoin.it/wiki/Target
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!