- Why is it important to make sure that miners spend money (on electricity) while mining?
Miners spend a lot of electricity to solve a cryptographic puzzles, competing with each other to solve first and get the block to append to the blockchain and receive their rewards, if a miner tries to be dishonest or sends errors, the network will acknowledge and reject it, then the block will be dropped and the miner will loose all the rewards and by then would have spent a lot of electricity with the process of solving the puzzle, incurred a cost of electricity which will not be covered, therefor the spending electricity is a way to make all miners perform an honest and smoothly work to the Blockchain contributing on a honest basis.
- Why would it be very difficult for someone to go back change a previously added block?
Cryptographic puzzles are made based on the content of each block, its hash function (SHA256) is an unique finger print of the block based on the previous block, so if a block suffers an alteration then a full blockchain can be invalidated. Between blocks exists links, once one block is altered the following links for the following blocks will be broken and to fix this we would have to re-mine new cryptographic puzzles based on the new changes, otherwise the network will not recognise the changes. However to proceed to re-mine the blockchain again, it would take an undetermined amount of time that can not be accrued to our life time, it can take hundreds of years and taking into account that we would have to catch up to the new blocks, then electricity costs, machinery and all related costs to run the mining facility, realistically to change a previously added block would be practically impossible.
- How does the network regulate mining difficulty?
On an average of 10 minutes a new block is mined, the BTC Protocol ensures this timing remains the same so:
- Increases network difficulty when it becomes easier for miners to mine.
- Decrease network difficulty when it becomes harder for miners to mine.
All valid blocks must have a hash below the target.
When hash rate becomes high, the bitcoin difficulty eventually gets higher as well, making it tougher for miners to mine easily within the network.
The inverse is also true. If Bitcoinâs hash rate decreases, the network difficulty will reduce as well, i.e. for instance if a lot of miners stops mining
To calculate difficulty the Bitcoinâs network difficulty changes every 2016 blocks.
The formula used by the network to calculate difficulty goes like this:
difficulty = difficulty_1_target / current_target
In the formula above:
- target is a 256-bit number. As per Bitcoinâs protocol, the targets are a custom floating-point type with limited accuracy. Bitcoin clients approximate difficulty based on this fact. This value is also known as bdiff.ââ