|
December 28, 2020, 01:04:04 PM |
|
I think that there are some conceptual misunderstanding here, I'll try to explain the process the best I can.
Mining involves the miner with his ASICs hashing the block headers twice to produce a hash. The block is valid when it's hash meets the target as specified by the network. The components of the block headers are as follows: - Version (not really standardized due to ASICBoost) - Previous Block hash - Merkle Root Hash (Depends on the Transaction set) - Time Stamp (Variable) - Target in nBits (Fixed) - Nonce (Variable) The mining pool's job is to determine the transaction set and assemble them. Firstly, the mining pool will select a set of transactions and calculate the transaction fees. The pool will then use this amount, the pool will generate their own transaction and specify an output that is their address for which the amount must be less than < 6.25BTC + TX fees, there is no lower limit. After that, the pool will send the Version, Block hash, coinbase transactions, merkle tree, target and current time. The mining software will add the extranonce within the coinbase transactions before forming the merkle root hash. The mining software will then feed the relevant information to the ASIC itself.
Now, to the main part which how the ASIC actually mines. Depending on your ASIC, it will increment the nonce by itself. The extranonce allows the ASICs to calculate more hashes at once without wasting time to calculate the entire merkle tree again. ASICs are actually so specialized that most of them are designed to only vary and hash the final 4bytes which contains the nonce.
To point out the mistakes:
1. The mining software you're using likely doesn't connect directly to the network directly. You need to have access to the previous block hash, list of transactions and the target. To do this, something must be used to process the information which is usually either your own Bitcoin Core (for a solo miner) or a mining pool. 2. The previous block hash always changes every ~10minutes so there's likely no advantage in doing so. 3. Mining software does not store the coins in the wallet. As mentioned, a coinbase transaction is included in the block. The transaction contains the newly generated coins as well as the transaction fees and you can specify the output as your wallet. It does not happen after you find a block. 4. There's no verification node. Your ASICs determines the target and compares the hashes generated. If the hashes meets the minimum target, your block is valid. Your software will send the nonce used, timestamp, etc to the server and the server will relay the valid block with the headers, transactions etc.
|