Homework on Mining and Proof of Work - Questions
1. Why is it important to make sure that miners spend money (on electricity) while mining?
The blockchain transaction fee is designed to reward the miners, and cover their electricity operating costs to maintain the blockchain network. Whereas, the blockchain reward acts as an initial bonus to encourage miners to join the network, compete and maintain the longest length blockchain.
Overtime the blockchain reward diminishes to zero, and is ultimately replaced by the miner only receiving the blockchain transaction fee. Therefore, the value of transaction fee must be designed to grow proportionally to the value of the blockchain difficulty thus encouraging miners to continue to compete to maintain the longest blockchain.
Each newly appended block added to the blockchain is controlled via a consensus algorithm based on a 5 discrete elements; 1) Only the longest blockchain is maintained, 2) A target number, 3) A random number 4) The new transaction, and 5) The previously hashed block.
Mining electricity costs are directly related to the these 5 elements with the level of difficulty (electricity costs) being controlled via element 2 the “target number”. By controlling the value of the target number the computational difficulty of the consensus algorithm is constantly regulated and updated causing the miner to incur additional electricity costs to mine (compute) the newest block. Therefore, the transaction fee is directly related to the mining compute difficulty, and thus ensuring each newly form block appended to the blockchain is not realized for free, but at a cost to the miner.
2. Why would it be very difficult for someone to go back change a previously added block?
The blockchain is a mathematical puzzle where each subsequent hashed block is appended to the end of blockchain via a mathematical hashed dependency which is linked to the previously mined hashed block.
The Blockchain miners & network nodes follow the blockchain with the longest sequence of blocks. All other shorter blockchains are ignored. Therefore, to change a previously hashed block requires an extremely high level of compute power to change a previously mined block, but at the same time update all subsequent blocks added to the blockchain and do it at such a rate that the newly formed “changed-blockchain” exceeds the length of the existing blockchain. If the newly formed blockchain does not exceed the length of existing blockchain then it will not become accepted by all nodes within the blockchain network and so it is ignored consensus as being false/inaccurate.
3. How does the network regulate mining difficulty?
Mining difficulty is regulated via a consensus algorithm which derives the newly hashed block based on 5 elements; 1) Only the longest blockchain is maintained, 2) A target number, 3) A random number 4) The new transaction, and 5) The previously hashed block.
The element 2 - the target number - ensures the miner is unable to guess the random number required to mathematically hash the newest block appended to the blockchain.
The value of the target number is set based on the number of active miners. The more miners competing to form the newest block the lower the target number. A lowered target numbers increases the network’s hash rate (computational mathematical difficulty) to mine the newest block in the blockchain which in-turn increases the transaction fee, and hence the miners electricity costs.
Therefore, the transaction fee is directly related to the mining difficulty to ensure each newly form block appended to the end of the blockchain is not realized for free, but at a cost to the miner.