Glenn_CostaRica
1. Why is it important to make sure that miners spend money (on electricity) while mining?
Mining in the most important factor for security in Bitcoin. Miners are in charge of providing a virtually impossible-to-break barrier against false transactions, against double spending and hackings, and against any kind of attack directed towards the integrity on the network. However, miners are humans too. They could feel tempted to cheat or play against the rules. For this reason, the Bitcoin network implements a powerful system of incentives: miners have to invest a gigantic amount of money, usually in Fiat, in electricity, in order to solve cryptographic puzzles to be able to propose acceptable blocks and earn big incentives in Bitcoin. Since they have to invest a lot of money in order to propose a block, they are highly discouraged to waste their money in creating bad blocks that would be rejected by the network. Incentives make them invest their money in protecting the network and playing by the rules.
2. Why would it be very difficult for someone to go back change a previously added block?
Each block on the blockchain is connected to the next block by a ālinkā: the link is actually a hash created for a new block based on three parameters: i. the hash of the previous block, ii. the list of transactions for the new block and iii. a NONCE. The nonce constitutes the puzzle that miners try to solve by spending electricity. A nonce is a random number that, if added to the block, it ensures that, when one hashes the entire new block, one would obtain a certain number which is lower that a specific target. Finding the nonce and having the new hash for the new block is the essential task of a miner. In Bitcoin, finding the last block implies hashing trillions and trillions of guesses with different nonces, until a correct LINK in found. And this can be done only by mining farms or supercomputers. Each link requires an immense amount of guessing: an immense investment in electricity for the Proof of Work. The more links one actor needs to remake in order to modify some data, the more and more the Proof of Work that has to be done to reconstruct the whole chain. This is almost impossible for anyone to do. And even, if someone were successful to do it for one, or for a few links, during this remaking, other miners would be mining more and more new blocks on the original chain, and making it exponentially harder to rebuild the chain that contains the alteration. One might requiere millions of years to remake the chain and infinite resources.
3. How does the network regulate mining difficulty?
This is done by elevating or lowering the maximum limit of the number acceptable for the hash of a new block. The lower and lower the limit is, the harder Proof of Work turns. It is usually said that, the more difficult mining is at a given time, the more zeros one can see at the left side on a hash of a new block.