Even people who are infinitely far from the topic of cryptocurrencies have most likely heard about mining. Probably you, dear reader, have thought about turning on your gaming Pentium 4 at night and waking up rich in the morning.
But, as often happens in the world of blockchain, there are many who have heard, but there are only a few who really understand the process from start to finish. Therefore, in the last chapter, I tried to cover in as much detail as possible all the subtleties, from the technical implementation of PoW to the profitability of mining on video cards.
Explain me like I'm five
Mining , also mining (from the English mining - mining) is the activity of maintaining a distributed platform and creating new blocks with the opportunity to receive rewards in the form of issued currency and commission fees in various cryptocurrencies, in particular Bitcoin. Computation is required to ensure that the same units of currency are not spent over and over again, and the connection between mining and emission incentivizes people to spend their computing power and keep networks running - Wikipedia
To put it simply, mining is a critically important process for Bitcoin, which consists of creating new blocks and pursuing two goals at once. The first is the production of money supply. Every time a miner creates a new block, he is entitled to a reward of N number of coins, which he then spends somewhere, thereby releasing new funds into the network.
The second, and much more important goal, is to ensure the operation of the entire network. Surely, while reading previous articles, you have already asked yourself the questions “Who is the person who checks transaction scripts?” or “If I specify an output that has already been used as an input, at what point will they notice?” .
So, all these actions are performed primarily by miners. Well, in fact, every participant in the network ensures its security to one degree or another. It takes so long to synchronize Bitcoin not because you have to download 100 GB, but because you need to check every byte, calculate every hash, run every script, and so on.
But if you draw the entire process, starting with clicking the “Send” button in your wallet and ending with viewing the block with your transaction somewhere on blockchain.info, then it is the miners who will decide whether your transaction will be in the block or not.
List of Bitcoin Core console commands
Below we list all the commands that are needed for various solutions: Blockchain, Control, Create (wallet), Mining, Network (information), Raw transactions, Utility, Wallet, Zmq.
Blockchain
All commands for blockchain checks are listed below
getbestblockhash getblock "blockhash" ( verbosity ) getblockchaininfo getblockcount getblockhash (height) getblockheader "blockhash" ( verbose ) getblockstats hash_or_height ( stats ) getchaintips getchaintxstats ( nblocks "blockhash" ) getdifficulty getmempoolancestors "txid" ( verbose ) getmempooldescendants "txid » (verbose) getmempoolentry "txid" getmempoolinfo getrawmempool ( verbose ) gettxout "txid" n ( include_mempool ) gettxoutproof [ "txid",...] ( "blockhash" ) gettxoutsetinfo preciousblock "blockhash" pruneblockchain height savemempool scantxoutset "action" ( [scanobjects,...] ) verifychain ( checklevel nblocks ) verifytxoutproof "proof"
Control
Control commands
getmemoryinfo("mode") getrpcinfo help("command") logging(["include_category",...]["exclude_category",...]) stop uptime
Creation
Wallet creation commands and other functions
generatetoaddress nblocks "address" (maxtries) generatetodescriptor num_blocks "descriptor" (maxtries)
Mining
Mining commands
getblocktemplate("template_request") getmininginfo getnetworkhashps(nblocks height) prioritisetransaction "txid"(dummy) fee_delta submitblock "hexdata"("dummy") submitheader "hexdata"
Net
Network commands
addnode "node" "command" clearbanned disconnectnode ( "address" nodeid ) getaddednodeinfo ( "node" ) getconnectioncount getnettotals getnetworkinfo getnodeaddresses ( count ) getpeerinfo listbanned ping setban "subnet" "command" ( bantime absolute ) setnetworkactive state
Unprocessed transactions
List of commands
analyzepsbt "psbt" combinepsbt ["psbt",...] combinerawtransaction ["hexstring",...] converttopsbt "hexstring" ( permitsigdata iswitness ) createpsbt [{"txid":"hex","vout":n,"sequence":n },...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable) createrawtransaction [{"txid":"hex","vout":n,"sequence": n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable ) decodepsbt "psbt" decoderawtransaction "hexstring" ( iswitness ) decodescript "hexstring" finalizepsbt "psbt" ( extract ) fundrawtransaction "hexstring" ( options iswitness ) getrawtransaction "txid" ( verbose "blockhash") joinpsbts ["psbt",...] sendrawtransaction "hexstring" ( maxfeerate ) signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{" txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype") testmempoolaccept ["rawtx",...] ( maxfeerate ) utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )
Utilities
List of commands
createmultisig nrequired ["key",...] ("address_type") deriveaddresses "descriptor" ( range ) estimatesmartfee conf_target ( "estimate_mode" ) getdescriptorinfo "descriptor" signmessagewithprivkey "privkey" "message" validateaddress "address" verifymessage "address" "signature" "message"
Wallet
List of commands
abandontransaction "txid" abortrescan addmultisigaddress nrequired ["key",...] ( "label" "address_type") backupwallet "destination" bumpfee "txid" ( options ) createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse ) dumpprivkey "address" dumpwallet "filename" encryptwallet "passphrase" getaddressesbylabel "label" getaddressinfo "address" getbalance ( "dummy" minconf include_watchonly avoid_reuse ) getbalances getnewaddress ( "label" "address_type" ) getrawchangeaddress ( "address_type" ) getreceivedbyaddress "address" ( minconf ) getreceivedbylabel "label" " ( minconf ) gettransaction "txid" ( include_watchonly verbose ) getunconfirmedbalance getwalletinfo importaddress "address" ( "label" rescan p2sh ) importmulti "requests" ( "options" ) importprivkey "privkey" ( "label" rescan ) importprunedfunds "rawtransaction" "txoutproof " importpubkey "pubkey" ( "label" rescan ) importwallet "filename" keypoolrefill ( newsize ) listaddressgroupings listlabels ( "purpose" ) listlockunspent listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" ) listreceivedbylabel ( minconf include_empty include_watchonly ) listsinceblock ( "blockhash" target_confirmations include_watchonly include_remov ed ) listtransactions ( "label" count skip include_watchonly ) listunspent ( minconf maxconf ["address",...] include_unsafe query_options ) listwalletdir listwallets loadwallet "filename" lockunspent unlock ( [{"txid":"hex","vout":n}, ...] ) removeprunedfunds "txid" rescanblockchain ( start_height stop_height ) sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" ) sendtoaddress "address" amount ( "comment" " comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse ) sethdseed ( newkeypool "seed") setlabel "address" "label" settxfee amount setwalletflag "flag" ( value ) signmessage "address" "message" signrawtransactionwithwallet "hexstring" ( [{"txid" :"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) unloadwallet ( "wallet_name") walletcreatefundedpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},... ] ( locktime options bip32derivs ) walletlock walletpassphrase "passphrase" timeout walletpassphrasechange "oldpassphrase" "newpassphrase" walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )
Sky is the limit?
First, let's go over the first point again and discuss the concept of money supply.
One of the fundamental features that cryptocurrency supporters often flaunt is the inherent deflation. This is due to the fact that even at the design stage of the system, a total limit of 21 million coins (approximately) was indicated, and even if you really want to, it will not be possible to raise this threshold. Unlike the ruble or dollar, which, at the request of the Treasury, can be printed in any quantity, which sometimes leads to dire consequences, as in Zimbabwe.
BTW, not everyone considers deflation such an unambiguous plus.
Reward
The next good question is where did the 21 million figure come from?
I think you understand that the amount of coins issued at a particular point in time is equal to the amount of rewards for blocks created up to that moment . A pretty obvious fact, considering that there is only one way for new coins to enter the network.
But the reward is not fixed, and moreover, every 210,000 blocks (about once every 4 years) it is halved.
consensus.nSubsidyHalvingInterval = 210000; // https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L73
So, for example, when it all started in January 2009, the block reward was 50 BTC. After 210,000 blocks, it dropped to 25 BTC in November 2012, and most recently, on July 9, 2016, it dropped to 12.5 BTC.
It's easy to calculate the exact number of Satoshis that will be produced, assuming Bitcoin doesn't die out in the next 200 years:
start_block_reward = 50 reward_interval = 210000 def max_money(): # 50 BTC = 50 0000 0000 Satoshis current_reward = 50 * 10**8 total = 0 while current_reward > 0: total += reward_interval * current_reward current_reward /= 2 return total print "Total BTC to ever be created:", max_money(), "Satoshis" # Total BTC to ever be created: 2099999997690000 Satoshis
The picture below shows a mining curve that will gradually approach 21 million BTC, peaking around 2140. At this time, the block reward will become 0 BTC.
We can only guess what will happen to Bitcoin then, but one thing we can know for sure is that miners will not be left completely without money. At a minimum, they still have a transaction fee; another thing is that this very commission can increase by an order of magnitude.
For clarity, let’s take some fresh block, for example #447119. The total commission for all transactions in a block is approximately 0.78 BTC, while the reward for it is 12.5 BTC. That is, if reward disappears tomorrow, then in our case the commission should increase by more than 16 times in order to offset this unpleasant event. It is clear that there is no trace of micropayments here anymore.
Mining for dummies
Let's try once again to imagine the mining process at our still primitive level.
There is a network with a bunch of participants. Some of the participants call themselves miners - they are ready to collect new transactions on their PC, check them for validity, then somehow mine a new block from them, scatter this block across the network and receive money for it. The logical question is: if everything is so simple, then why isn’t every network participant doing this?
It is clear that if everything were as I have just described, then blocks would be released a hundred times per second, there would be so much currency that no one would give a cent for it, and so on.
Therefore, Satoshi was forced to come up with an algorithm with the following properties:
- Creating a new block is a computationally complex task. You can’t just turn on a powerful PC and mine a hundred blocks in a minute.
- It takes the entire network 10 minutes (on average) to calculate a new block. If you look at Litecoin, blocks are released every 2-3 minutes, the point is that the average time is pre-set.
- Moreover, this time does not depend on the number of network participants. Even if one day there are a hundred times more miners, the algorithm must change its parameters so that it becomes more difficult to find a block, and the block time drops back to around ten minutes.
- We remember that the network is distributed and peer-to-peer, which means it must itself understand at what point and how these parameters need to be adjusted. There are no control nodes, everything is completely autonomous.
- If solving the problem of creating a new block is a complex task that requires time and resources, then checking the block for “correctness” should be simple and almost instantaneous.
Registration on AntPool
Go to the official website antpool.com and click on “Registration”.
The system will redirect you to the website bitmain.com , where you will need to fill out the registration form. We register a working e-mail, a strong password and solve the captcha.
We go to the e-mail and confirm registration. In the new form, select the country by telephone code. We enter the phone number and receive an SMS. You will receive a code, enter it and click on “Bind”.
In order to start using AntPool, you need to create a Worker. Immediately after entering the pool, enter the UserID - this can be any word, nickname, set of numbers, etc.
Next, click on the “Panel” section and go to Worker. Click on the “Create Worker” button and enter the alphanumeric value used in the program settings for the ASIC miner.
Proof-of-Work (PoW)
Most likely, you are now arriving in complete prostration and don’t really understand how this is even possible. But Satoshi was not at a loss and was able to come up with a solution to all these problems - the algorithm was called Proof-of-Work, this is what it looks like (I advise you to first read Bitcoin in a nutshell - Blockchain):
Let you be a miner.
You have 10 transactions that you want to mine into a block. You check these transactions for validity, form a block from them, specify 0 in the nonce field and calculate the hash of the block. Then change the nonce to 1 and calculate the hash again. And so on ad infinitum. Your task is to find a nonce such that the hash of the block (256-bit number) is less than a predetermined number N. Finding such a hash is only possible by blunt search of the nonce; there are no fancy algorithms here. Therefore, the faster you want to find the nonce, the more power you will need.The number N is exactly the parameter (also called target) that the network adjusts depending on the total power of the miners. If tomorrow blocks start coming out, relatively speaking, once every three minutes, then N will be somehow reduced, more time will be required to search for the nonce, and the block time will again increase to 10 minutes. And vice versa.
Bitcoin core console window
On an older version of the Bitcoin wallet, you should see a debug window under Help > Debug window where you can start typing bitcoin-cli commands.
In the latest version, select the “window” drop-down menu and open “console”.
You should see the following warning.
“Welcome to the Bitcoin Core RPC console. Use up and down arrows to navigate history, and Ctrl-L to clear screen. Type help for an overview of available commands. For more information on using this console type help-console."
"WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command."
Translation:
Welcome to the Bitcoin Core RPC console.
Use the up and down arrows to navigate through the history and Ctrl-L to clear the screen. Type help for an overview of the available commands. For more information about using this console, type help-console.
WARNING: There are scammers who ask users to enter commands that steal the contents of wallets. Do not use this console without fully understanding the meaning of the command.
As the warning suggests, do not enter commands that you are not familiar with, and do not share information that is in your console window with anyone, especially that which includes your wallet passphrase and private keys.
Technical side
It's time to move from words to action and demonstrate how Proof-of-Work and mining in general work. And in my humble opinion, there is nothing better than showing the whole process right in combat conditions. To do this, we will now write our own mining node right away and even try to make a new block before everyone else, although the chances of success are low.
Receive transactions
In a good way, here we need to dive into the protocol specification again, establish contact with other nodes and wait until they send us fresh transactions. In this case, we will get a real real-time miner, no worse than ready-made solutions (but this is not certain).
I suggest taking the simplified route. Open blockchain.info and select several transactions from the “Recent Transactions” list. They have just entered the network and are not yet included in any of the blocks. Next, open another block explorer - chainquery.com. It can issue transactions in a raw format and using hashes we obtain transactions in a form that is already familiar to us. I limited myself to two (one, two):
txn_pool = [] txn_pool.append("0100000001440d795fa6267cbae00ae18e921a7b287eaa37d7f41b96ccbc61ef9a323a003d010000006a47304402204137ef9ca79bcd8a953c 0def89578838bbe882fe7814d6a7144eaa25ed156f66022043a4ab91a7ee3bf58155d08e5f3f221a783f645daf9ac54fed519e18ca434aea012102965a03e05b2e2983c031 b870c9f4afef1141bf30dc5bb993197ee4a52f1443e0feffffff0200a3e111000000001976a914f1cfa585d096ea3c759940d7bacd8c7259bbd4d488ac4e51320800000000 1976a9146701f2540186d4135eec14dad6cb25bf757fc43088accbd50600") txn_pool.append("0100000001517063b3d932693635999b8daaed9ebf020c66c43abf504f3043 850bca5a936d010000006a47304402207473cda71b68a414a53e01dc340615958d0d79dd67196c4193a0ebcf0d9f70530220387934e7317b60297f5c6e0ca4bf52 7faaad830aff45f1f5522e842595939e460121031d53a2c228aedcde79b6ccd2e8f5bcfb56e2046b4681c4ea2173e3c3d7ffc686ffffffff0220bcbe00000000001976a9148 cc3704cbb6af566598fea13a3352b46f859581188acba2cfb09000000001976a914b59b9df3700adae0ea819738c89db3c2af4e47d188ac00000000")
Check
The next step is to check the received transactions. I won’t do this, I’ll just list the main points:
- The structure and syntax of the transaction are correctly observed
- The I/O list cannot be empty
- Entry transactions must exist in either the UTXO pool or the unconfirmed transaction pool
- The sum of inputs is not less than the sum of outputs
- The full list can be found here
Some miners reject transactions with zero or too little commission, but this is up to everyone to decide for themselves.
Sort
Just in case, I’ll explain that nothing prevents you from including transactions in a block in any order, as long as they pass all the checks. In my case, there are only two transactions, so there is no point in sorting them. But don’t forget that the block size is limited to 1 MB, so if you have 10,000 transactions in the pool, then it would be reasonable to sort them by commission and write only the most “expensive” ones into the block.
BTW I often come across articles/books that say that before mining a new block, Bitcoin Core sorts transactions by a special priority parameter, which is considered as
Priority = Sum (Value of input * Input Age) / Transaction Size
This was true until version 0.12.0, then sorting by priority was disabled.
Get reward
If you look at the structure of any block, the very first one is always the so-called coinbase transaction - it is the one that sends the reward to the miner’s address. Unlike regular transactions, coinbase transactions do not use outputs from the UTXO pool as inputs. Instead, it only has one input, called coinbase, which “creates” coins out of thin air. There is also only one way out of such a transaction. It sends the block reward plus the amount of commissions from all transactions in the block to the miner's address. In my case it is 12.5 + 0.00018939 + 0.0001469 = 12.50033629.
Let's take a closer look at the structure of a coinbase transaction, and more specifically, its input. Just in case, let me remind you what the input of a “regular” transaction looks like:
Here are three differences in entering a coinbase transaction:
- Instead of a real transaction hash, 32 zero bytes are specified
- Instead of output index, 0xFFFFFFFF is specified.
- In the unlocking script field, you can specify anything from 2 to 100 bytes in size, so this field is also called coinbase data. For example, in the genesis block there is hidden the phrase “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.” As a rule, miners insert their name / mining pool name / something else into coinbase data.
Often a so-called extra nonce is inserted into coinbase data; more details here. The point is that there may not be a desired nonce such that the block hash is less than target (in fact, this will happen in most cases). Then all that remains is to change something in the transaction to get other hashes, for example, UNIX timestamp. But if you read Bitcoin in a nutshell - Blockchain, then you know that you can’t change the timestamp too much, otherwise other nodes will reject your block. The solution turned out to be quite simple: just add some number to the coinbase data and change it if the required nonce was not found for the current header.
The process of creating a new transaction is described in detail in the chapter Bitcoin in a nutshell - Protocol, so here I will simply present the already received coinbase transaction, all the code, as usual, is available on [Github]():
coinbase_txn = "010000000100000000000000000000000000000000000000000000000000000000000000000000000000ffffffff8a47304402207e8495986ec27ed4556fee9dcd897 ea028d4eb2023959c2299eb573e0771dee702201489e40115ccc45d4c23f1109cb56b513543517f3efc0031965ad94d94d3d2d901410497e922cac2c9065a0cac998c0 735d9995ff42fb6641d29300e8c0071277eb5b4e770fcc086f322339bdefef4d5b51a23d88755969d28e965dacaaa5d0d2a0e09ffffffff01ddff814a000000001976a91478 e10cf8e4bd38266d8fd4ed5c8b430d30a3cde888ac00000000"
All that remains is to calculate merkle root for these three transactions. To do this, we will use a code fragment from Bitcoin in a nutshell - Blockchain:
txn_pool.insert(0, coinbase_txn) txn_hashes = map(getTxnHash, txn_pool) print "Merkle root: ", merkle(txn_hashes) # Merkle root: 4b9ff9ab901df82050f858accde99b9169067acafaeade25598ea5505fb53836
Target
As I wrote above, all mining comes down to finding the hash of a block less than a number called target. In the block structure, this number is written in the bits field, for example for block #277,316, the target was 1903a30c.
$ bitcoin-cli getblock 0000000000000001b6b9a13b095e96db41c4a928b97ef2d944a9b31b2cc7bdc4 { "hash" : "0000000000000001b6b9a13b095e96db41c4a928b97ef2d 944a9b31b2cc7bdc4", "confirmations" : 35561, "size" : 218629, "height" : 277316, "version" : 2, "merkleroot" : "c91c008c26e50763e9f548bb8b2fc323735f73577effbc55502c 51eb4cc7cf2e", "tx" : ["d5ada064c6417ca25c4308bd158c34b77e1c0eca2a73cda16c737e7424afba2f", 418 more transactions], "time" : 1388185914, "nonce" : 924591752, "bits" : "1903a30c", // Here it's "difficulty" : 1180923195.25802612, "chainwork" : "0000000000000000000000000000000000000000000000934695e92aaf53afa1a", " previousblockhash" : "0000000000000002a7bbd25a417c0374cc55261021e8a9ca74442b01284f0569", "nextblockhash" : "000000000000000010236c269dd6ed714dd5db39d36b33 959079d78dfd431ba7" }
Bits actually contains two numbers at once: the first byte 0x19 is the exponent, the remaining three bytes 0x03a30c are the mantissa. In order to get target from bits, you need to use the following formula: target = mantissa * 2^(8 * exponent - 3)). In the case of block #277.316 it turns out:
>>> bits = 0x1903a30c >>> exp = bits >> 24 >>> mant = bits & 0xffffff >>> target_hexstr = '%064x' % (mant * (1 << (8 * (exp - 3))) ) >>> target_hexstr '0000000000000003a30c000000000000000000000000000000000000000000000'
Another term that reflects the difficulty of mining is difficulty. For example, for block #449.584 it was equal to 392,963,262,344.37. This parameter is the relation max_target / current_target, where max_target is the maximum possible target, namely 0x00000000FFFF0000000000000000000000000000000000000000000000000000 (0x1d00ffff in bits format). It is bits that is usually indicated in all block explorers.
BTW, the smaller the target, the greater the difficulty and vice versa.
PoW
Now that you have understood all the nuances, you can launch the miner:
import hashlib import struct import sys # ======= Header ======= ver = 2 prev_block = "000000000000000000e5fb3654e0ae9a2b7d7390e37ee0a7c818ca09fde435f0" merkle_root = "6f3ef687979a1f4866c d8842dcbcebd2e47171e54d1cc76c540faecafe133c39" bits = 0x10004379 # Not the actual bits, I don't have synced blockchain timestamp = 0x58777e25 # Calculate current time with this code: # hex(int(time.mktime(time.strptime('2017-01-12 13:01:25', '%Y-%m-%d %H: %M:%S'))) - time.timezone) exp = bits >> 24 mant = bits & 0xffffff target_hexstr = '%064x' % (mant * (1 << (8 * (exp - 3)))) # '0000000000000000000000000000000000437900000000000000000000000000' target_str = target_hexstr.decode('hex') # ======== Header ========= nonce = 0 while nonce < 0x1000000 00: # 2**32 header = ( struct .pack("< target_str: print 'Success!' break nonce += 1
Hash rate
If you waited for the coveted Success! line, then you either have an Intel Core i7 or a lot of free time. I have no idea when this code will finish running or if it will find the nonce at all, because the current complexity is just monstrously high. Even if we assume that our program is capable of calculating 100,000 hashes per second (which it is not), it is still millions of times slower than any real miner, so it can take several days to find a nonce.
To give you an idea of the scale of the problem: there is a hashrate metric. It reflects the total power of miners in the Bitcoin network, the unit of measurement is SHA256 hashes per second. Here is her schedule:
Let's assume that the hashrate is 2,000 PH/s = 2,000,000 TH/s = 2,000,000,000 GH/s = 2,000,000,000,000 MH/s = 2,000,000,000,000,000 KH/s. But our program cannot even handle 100 KH/s, so there is no point in competing with the entire network.
ASIC setup.
Having finished registering on the Binance exchange and creating an account on the pool, let’s move directly to the action plan for setting up the ASIC.
- The ASIC itself must be connected to the electrical network, as well as to the Internet via a router or switch.
- You will need to find out its IP address on your local network. This can be done in several ways: using the arp -n command in the Windows command line, in the router settings, or using a special network scanner program, for example, Advanced IP Scanner.
- To enter the ASIC control panel, you need to enter its IP in the browser line, the same as when setting up a router. The procedures are similar.
- You will be taken to a WEB page with an authorization window, where you need to specify your login and password to access the ASIC settings. Usually this is root-admin, admin – admin or admin – 0000. If you bought an ASIC secondhand, then the login and password can be anything. To find out how to reset your ASIC password or return it to factory settings, read on...
- After successfully logging into the ASIC control panel, you need to provide data to connect to the pool.
- In the settings, go to the Miner Configuration . For Pool1, fill in the URL1 fields : stratum+tcp://bs.poolbinance.com:3333, Worker Washworker.001, where instead of Washworker.001 indicate your Mining account. You can also fill in the data for POOl2 , POOL3 , etc. These will be reserve pools. For Pool 2, you can specify the same URL, but with a different port: stratum+tcp://bs.poolbinance.com:8888. For the second backup pool, enter the URL stratum+tcp://sha256.poolbinance.com:8888. Leave the worker name the same everywhere.
- Save the settings and reboot the ASIC.
- You can check the operation of the ASIC using statistics on the Binance pool. In 10-15 minutes the first data should appear. You can determine whether an ASIC is mining or not by the noise. During mining, the device's fans run at full power, which will cause a lot of noise. If the ASIC is not configured correctly and mining does not work, then the fan spins at half strength, and accordingly makes less noise.
Data for the pool in the ASIC settings
If desired, the ASIC can be overclocked a little. This will increase the hashrate and profitability slightly, but take into account that the temperature, power consumption and noise will also increase.
In the “PRESET” line you need to select the overclocking level, also select the “ASICBOOST” - ON item to apply low-level power consumption. Click "SAVE" for the settings to be applied.
Hardware
You can immediately forget about mining on a CPU or GPU. To give you an idea, the hashrate at the beginning of 2022 is shown below. Let's assume that it averages 2,300,000 TH/S, that is, 2,300,000,000,000 MH/s. For comparison, the most brutal graphics cards, such as the ATI Radeon HD 5870 Eyefinity or AMD Radeon HD 7970 (x3), produce 2000 MH/S at best. Among processors, the first place is occupied by the Xeon Phi 5100 with a ridiculous 140 MH/s.
So even based on a rate of 1000 $/BTC and having 10,000 MH/s in hand, you will earn on average 20 cents per month.
CPU mining stopped being profitable back in 2011; GPU mining lasted until about 2013, but also failed when the so-called application-specific integrated circuit (ASIC) became widespread. These are special chips designed for mining at the hardware level. The simplest ones cost around $100, which is much cheaper than a top-end video card, but are still capable of outputting from 1 TH/s.
That is, all other things being equal, having two Antminer S9 at $3,000 apiece, you will earn almost $700 per month (excluding electricity bills)
But that's not all. You can team up with other miners in a mining pool and start mining together, and divide the money you earn in proportion to the invested power. This is obviously much more profitable than trying to earn at least something alone, which is why pools today constitute the main driving force in the world of mining. At the beginning of 2022, the main players in the pool market are AntPool, F2Pool and Bitfury, providing more than 40% of the hashrate of the entire network.