Homework on Mining and Proof of Work - Questions

  • So the miners are invested in following the rules otherwise they might lose on their investment.
  • Because it gets exponentially more difficult to change the blockchain the further back you try to alter it.
  • The network decides the mining difficulty based on the number of miners (more correctly the hashing power of those miners). The fewer miners (less hash power) the easier the difficulty. And the more miners the harder.
1 Like
  1. It’s important that they have to pay the expense first so that they are incentivised to follow the rules of protocol to produce blocks that are correct in order to get them accepted by the blockchain for the block rewards and fees.

  2. The hash rate or hashing power necessary to over power the rest of the network to make such changes would be so enormous that it wouldn’t financially feasible to try and do. It would be easily to just mine by the rules.

  3. When there are more miners the protocol automatically adjusts the difficultly of mining higher by making the target lower for finding the nonce. So it will take more guesses/hashes to find the correct hash for the block.

1 Like
  • Why is it important to make sure that miners spend money (on electricity) while mining?
    proof of work; to keep trying solve the nonce
    Everyone could setup a blockchain or is able to change the whole blockchain. There must be an investment to be able to secure the blockchain.

  • Why would it be very difficult for someone to go back change a previously added block?
    as any change will change the hash output of that block which immediately effects the hash output in the next block of that blockchain.

  • How does the network regulate mining difficulty?
    The nonce will regulate the difficulty of the hashing ex: so the blocktime stays on ± 10mins for bitcoin. When there are more minders diffculty goes up, and visa versa

1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?

So they committ to the rules of the protocol and are not tempted to play dirty. Only by playing by the rules and processing transaction that make sense they are able to make money by getting their block appended to the blockchain and securing their Block Reward and Transaction Fees as reward of their work.

  1. Why would it be very difficult for someone to go back change a previously added block?

Due to the structure of the Blockchain, which involves a hash key that is a function of three variables (Nonce, Transaction data and Previous Block Hash) it is very difficult if not practically impossible (and extremely time consuming) and counterproductive to change a transaction in a block as they would need to remine the block itself and all the following ones while cathing up with the newly produced blocks.
As the longest chain is accepted by default they would risk being left behind and in the meantime they would have spent so much time and electricity that all this doesn’t make it feasable.

  1. How does the network regulate mining difficulty?
    The network adjusts difficulty according to the number of miners in that moment. Difficulty is adjusted by raising or lowering the target number which is the reference number below which hash function is valid for the block production. Therefore the lowest the number is, the least probable a nonce is valid so that the hash of the proposed block is less than the target.
1 Like

Why is it important to make sure that miners spend money (on electricity) while mining?
By making miners spend money they get incentivized to make money by winning the ‘puzzle contest’.
They will only make money if they play by the rules to make the network secure.
If they don’t, they will lose money because they already spend their money on electricity but don’t earn anything.

Why would it be very difficult for someone to go back change a previously added block?
If someone changes something in an existing block, all the links in the blocks following will break.
That means that those blocks have to be remined by that person alone to get his version of the blockchain accepted by the network (longest chain wins).
Meanwhile the other miners keep on mining blocks so those have to be caught up too. You need so much hashpower to be able to do that by yourself that it’s theoretically possible but not practically.

How does the network regulate mining difficulty?
The more miners, the more difficult is will be. The difficulty is set by a target (a random number). The hash of the proposed block needs to be lower than the target.
When more miners are mining, the target goes down which makes it more difficult to guess the right nonce for the hash.

1 Like

1- The electricity costs to mine bitcoin is super expensive since a lot of it is required to power computers for such transactions. Miners are incentivized to mine blocks correctly in order to make a profit: Block reward + Tx fee - Electricity cost = > initial electricity cost! So they want to more than just break even on the amount of money they’ve spent on electricity.

  1. If someone changed the transaction information in a previously added block, that would mean they had to solve a NEW puzzle, i.e. guess a new nonce number in order for the block to be valid again as any change to transaction input changes the hash, which in turn changes the entire ecosystem of blocks on the chain. That person would have to resolve the previous block and then the blocks after it until catching up to the latest block on the chain- which would take forever. Meanwhile, other miners would be far ahead of the game and mining many more blocks. The longest block is what the network will choose, and how the miners will get paid. So that person’s block would perpetually remain short if they are trying to resolve puzzles from past blocks, therefore resulting in loss of pay and NO compensation for all the electricity they would have spent!

  2. The mining difficulty depends on how many miners are active. If that number is high, the target number they are trying to guess will be very low, therefore giving miners less of a chance to be able to guess it, leading to enhanced difficulty.

1 Like
  1. Miners need to provide proof that some work has been put into securing the network (by finding the correct block hash). This procedure is only possible by numerous amounts of guesswork which takes electricity.

  2. If someone wanted to make a change on an existing block, that block hash would change, which would cause the next block hash to change also, as all blocks take into account previous block hashes. This would require an enormous amount of computing power as that person would need to bruteforce all further existing blocks and catch up with the last block.

  3. The target sets the difficulty, basically hash needs to start with certain amount of zeroes or more. This rule is defined by the network depending on the current miner hashrate. If more miners start to mine than the network will set the target to more zeroes, which means harder to find a block, which means block time will drop back down to around 10min.

1 Like
  • Why is it important to make sure that miners spend money (on electricity) while mining?
    By spending money miners are incentivised to follow the rules and they are invested in the mining process.
  • Why would it be very difficult for someone to go back and change a previously added block?
    All the blocks are cryptographic related to each other. If an individual were to make an alteration to an existing block on the blockchain they would then have to go back and re-mine every succeeding block and solve every puzzle in order to recreate new valid links between the blocks. Since the difficulty of solving the puzzle is proportional to the hash rate on the network at any given moment the individual would have to utilize computational power at least equal to 51% of the network hash rate. Also, after each block is re-mined they would then have to catch up to the blocks that were being found by other miners as they were re-doing the chain. If you have access to enough hashing power to do the attack the much more profitable option would be to just legitimately mine BTC.
  • How does the network regulate mining difficulty?
    The network regulates mining difficulty based on hashing power by changing the target based on the hash rate. It makes this adjustment every 2016 blocks mined in the attempt to keep the 10 minute block generation rate consistent. As the hash rate increases and blocks are generated faster than 10 minute intervals, the target is lowered so that the miners will be required to make more guesses at the nonce in order to find a hash low enough that it satisfies the requirement of the target and should hash rate decrease the difficulty will be decreased.
1 Like
  1. To give them incentive to play by the rules to earn the reward to make up for the losses.

  2. They would have to remine every block in front of the changed block as the hash changes for every block in front of it due to the hash being history dependent.

  3. By lowering the target if the hash rate increases thus making it harder to guess a nonce that gives a hash that is within the target range. This in turn makes it so that a block is mined at around 10 minutes apart.

1 Like
  1. To create necessity of receiving incentive.
  2. That person would have to catch up hashing the rest of the block chain and then some to be chosen for the network copy.
  3. The more miners there are on the network, the lower the target number is set.
1 Like
  • Incentives: Spending money on electricity provides an incentive for the miner to be honest and to adhere to the rules of the network. The reason for this is that if a miner is dishonest or doesn’t adhere to the rules of the network, then their block will be rejected, and they will be down the money they spent on the electricity to produce the block.
  • PoW: Spending money on electricity acts as a proof of work, showing it took electricity to produce the block.
  • It’s difficult, because the time and effort it would require to do this would only result in losing a lot of money for the miner.
  • It becomes exponentially more difficult the further back the miner wants to go in the chain.
  • Their copy of the blockchain would become out of sync with the rest of the network, and it would be almost impossible to catch up.
  • The network regulates mining activity by adjusting the difficulty target in proportion to the hash rate of the network.
  • If the hash rate is high then the difficulty target will be set low, to make it difficult for the miners to achieve a hash lower than the difficulty target.
  • If the hash rate is low, then the difficulty target will be set high,to make it easier for the miners to achieve a hash lower than the difficulty target.
  • This is also known as the puzzle,so the network is essentially adjusting the difficulty of the puzzle to ensure a new block is produced every 10 minutes.
1 Like

Miners will lose money if they don’t follow the rules.
so they are incentivised to spend money for electricity to earn BTC.
2)
Because each tiny change yields a complete different hashoutput,
and all the successive digests have to be remined. Remining of mined blocks and mining of actual blocks
would be necessary but at the current mining difficulty this is not possible for someone.
3)
mining difficulty is regulated by the number of miners, the more miners are online the higher the difficulty.
So there is always an incentive for amateurs if a huge number of miners will go offline
to fill the gap at lower difficulty.

1 Like

1. Why is it important to make sure that miners spend money (on electricity) while mining?
Because by doing so, they solve the cryptography puzzle that produce a block.
Get Block reguard.
Get the transaction fees
2. Why would it be very difficult for someone to go back change a previously added block?
Because is almost impossible to solve the puzzle and will break the links before that.
3. How does the network regulate mining difficulty?
If they are more miners difficulty is more and to guess the nonce increases by lowering the target.
And to regulate the blocks, they need to be mined every 10 or so.

  1. Why is it important to make sure that miners spend money (on electricity) while mining? Keep them incentivized to play by the rules in order to make money; more motivation & skin in the game to play by the rules rather than trying to be fraudulent.

  2. Why would it be very difficult for someone to go back change a previously added block? Because the hash links will change and that would require re-mining the block that was changed along with all subsequent blocks thereafter. And you would have to be faster than the majority (51%) of the hash rate or you’ll never catch up.

  3. How does the network regulate mining difficulty? Difficulty increases as the number of miners increase.

1 Like

1. Why is it important to make sure that miners spend money (on electricity) while mining?
Because they compeat to solve a cryptography puzzle
2. Why would it be very difficult for someone to go back change a previously added block?
Because is almost impossible to fix the previous link. And by doing so it will break the link.
3. How does the network regulate mining difficulty?
Block need to be produce in about 10 minutes or so.

1 Like

Its important because of what you mentioned in the second answer. The work that has been put in a block makes sure that it can’t be changed easily. :smiley:

We lower the difficulty target, not the nonce. Nonce is just a place where miners input numbers to get a new random hash. :slight_smile:

1 Like

Exactly. Or as I love to call it: A chain reaction. :wink:

If I understood you correctly, you said that the reason we want for them to spend electricity is to make sure they provide work? It took me a minute to think about the the answer you provided. Very clever if that’s what you meant. The only way for a miner to find a new block is for him to spend the electricity, which is securing the network with the real world energy. :smiley:

1 Like

Correct. And as you mentioned in the second answer, this makes sure that the blocks can’t be changed unless you do the work again. Proof of work is pretty powerful as it generates blocks based on real world energy.

1 Like