Homework on Mining and Proof of Work - Questions
1. Why is it important to make sure that miners spend money (on electricity) while mining?
To ensure that a blockchain network is as secure as possible, it needs its chain to be as long as possible, which implies having as many blocks as possible being appended to it (the longer a blockchain’s main chain is, the less likely its integrity is at risk of being compromised/altered).
To do so, miners are required to verify blocks’ transaction lists by correctly guessing a block’s nonce, which satisfies the target level to be met (the nonce value being dependent upon a block’s transaction list as well as the previous block’s hash value).
The processing of guessing the correct nonce to subsequently derive a block’s hash (in the hopes of having it fall below a specified target, depending on a network’s difficulty level) requires a significant amount of computational power to have computers continuously iterate over various nonce values (before randomly hitting the right one).
Doing so carries substantial electricity costs that incentivize miners to keep honestly playing by the rules (as it would be far more costly to try and modify a previous block whose new hash value would consequently be picked up by every block following it in the chain all following “previous hash” values would be altered and no longer meet their respective block’s target).
2. Why would it be very difficult for someone to go back change a previously added block?
As mentioned above, doing so would entail a huge amount of computational resources (i.e significant electricity costs) to accomplish this feat.
Not only would all ensuing blocks’ hash values would have to be recalculated/re-mined to achieve their required target requirements, but hackers/fraudsters would also have to play catch up with the blocks that are continuously being mined as they attempt this lengthy process in the first place (exponentially increasing the complexity of the task here).
No single individual or small group of hackers could reasonably attempt this as it would involve a huge amount of money to be deployed, in the infinitesimal hope of being successful (very low chance of success while it would cost them probably billions at first).
Additionally, should one or more hackers ever succeed in taking control of a blockchain (or simply modifying one past transaction to their benefit), the value of the coins would become worthless as the rest of the network would have been alerted to its integrity being compromised, thus leading to all other participants to massively sell off their assets as quickly as possible (leaving hackers with worthless coins after having spent an exorbitant amount to obtain them).
3. How does the network regulate mining difficulty?
A blockchain’s mining difficulty is directly related to the number of miners available to proof the blocks that need to be appended to its network.
The more miners there are, the greater the difficulty level as new block targets become increasingly lower in value. The target level falls in value because the network needs to ensure the blockchain’s security/integrity by increasing the complexity of guessing correct nonce values (since more miners become available, it potentially raises the risk of a 51% attack if enough of them band together)