Homework on Mining and Proof of Work - Questions

  1. To penalize them if they were to cheat or not follow the rules. They were to have to pay an expensive electricity bill.

  2. Because if you change anything from the previous block the hash is changed and the next block will provide a different hash and so on.

3.The network regulates the mining when the number of miners increase the target required to achieve is a small range.

1 Like
  1. Why is it important to make sure miners spend money (on electricity) while mining? - it makes it less appealing to be dishonest and manipulate the blockchain.
  2. Why would it be very difficult for someone to go back and change a previously added block? —— in order to do that a miner would have to mine that block, the amount of blocks they back tracked, and any newer blocks the rest of the world mined already. They would also have to do this all by theirselves and their team.
    How does the network regulate mining difficulty?—— the target number the nonce has to be below gets raised when there are more computers guessing the nonce. If miners back out from mining, the target number lowers.
  1. By making them to spend money on electricity they are required to recoup their losses by earning the block reward and TX fees. And the only way to do this is to be honest and play by the rules otherwise their block would be rejected
  2. If you change a previously added block all following links will be broken and the BC will be invalidatet. So you have to remine all invalid blocks and broken links plus all new blocks. This would take too much time except you would have 51% of the hash rate (theretical possible)
  3. High number of miners = high difficulty = low target
1 Like
  1. It incentivizes them to follow the rules, work fast, solve the problem and earn money.
  2. Because of the hash/link it would take for ever.
  3. It sets a target for the nonce. The lower the target the more difficult the solution.

Yes. Technically 2^256 - 1, but its still a very large number!!

Correct! Basically miners will need to guess more nonces to achieve that target. If there are no new miners coming in, they will take more time to mine a new block. This will also make some miners shut down because they will spend more electricity!

Keep up the great work!!

Felipe.

And why POW in terms of security?

But how does it regulates the difficulty in terms of certain network parameters?

Almost!! The nonce is used to calculate the block hash, and this hash is the one that needs to land in a certain range of values!

1.) Making sure that miners spend money is a way to make honesty an incentive.

2.) In order to change a previously added block the following blocks would change as well, you’d need to re-mine the blocks and that’s basically impossible.

3.) More miners=more hash power=more difficulty, if there are less miners the hash power and difficulty decreases, this is how the network regulates mining difficulty.

1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    If miners need to spend money it will encourage them to continue mining in order to make up the lost or profit
  2. Why would it be very difficult for someone to go back change a previously added block?
    Once change the previous block all the links will be broken.To fix the link you will have to mine again and catch up with all the miners who has longer blocks which make it impossible
  3. How does the network regulate mining difficulty?
    The more people mining the higher difficulty to guess the nonce by lowing the target

To play according to the rules to get txs rewards and txs fees to compensate the cost.

Because the hash of the block depends on nounce, block number, data that the block contains (txs) and hash of the previous block.
Changing any part of these factors will change the hash of the block and that of the next block, so you will need to remine them again one by one.

According to the hash rate.
By increasing the number of miners the target is lowered and the difficulty increases.

1 Like
  1. In an effort to keep the network safe, bitcoin is designed with a game theory where upfront cost is high and miners are incentivised to play by the rules in order to get reward and transaction fees.

  2. Blockchain is created and linked together by computing mathematical equations. The difficulty is proportional to the hash-rate. The network would always pick the longest chain as the true chain, in the event of one changing past blocks in the chain this would break the link, meaning consecutive blocks would need to be re-mined. One would need to have 51% of network mining power in order to keep ahead of new block being generated by the public miners. The cost aspect of doing such thing is severe in both energy and cost requirement.

  3. Mining difficulty is proportional to network hash-rate. The more miners in system competing for the next block, the higher the nonce number required and the lower the accepted target, and vice versa. This process of network regulating keeps the system and miners working harmoniously.

1:So miner have skins in the game in electricity cost so it insures they remain honest
2: it is because any changes in a previous block affect all the blocks after that block and also would require to catch up to the other blocks being mined
3: the more hashing power available on the network the greater the difficulty. The system self regulates to keep block production at 10 min

1 Like
  1. To give them an incentive to operate by the rules to mine a bitcoin then sell it and recover for the cost on electricity and make a profit. In other words disnohest mining lose money.
  2. Because a change on a past block will change on the next blocks an invalidate them.
  3. Each block is mine every ten minutes, however if there are many miners trying to resolve the puzzle, the network will lower the target itself to make it harder to resolve.
1 Like

Why is it important to make sure that miners spend money (on electricity) while mining?
Money spend for electricity basically represents the effort of mining. If the effort of mining would be close to zero, so very easy, than previous blocks could be changed and reminded which would then result in the loss of security and immutuability (see question 2).

Why would it be very difficult for someone to go back change a previously added block?
By changing just a single bit in any data of ablock, this results in a completely changed hash of that entire block. As the hash of a block is created by using the hash of the data, the nonce and the hash of the previous block, any changed hash of one block would affact all hashes of following blocks. Consequently one would need to mine all blocks following the block with changed data. To do this with a single computer or mining farm and be faster than entire mining network is far from being realistic. One would need to be faster than the network because always the longest chain wins and is accepted from the network. Whoever would theoretically have this astronomical hash power, could earn much better doing legal honest mining.

How does the network regulate mining difficulty?
The difficulty level is adjusted to maintain a constant block mining rate of approximately a new block being mined every ten minutes. Mining is basically trying different inputs via brute-force method for a has function until by chance the output number is smaller than the currently requested difficulty target. A higher difficulty means that the hash needs to be smaller than a lower requested number and consequently the avergae time of guessing takes longer as the probability is lower.

1 Like

And what about the security of the network? Think about what will happen if a miner tries to cheat!

Hi there!! The nonce is actually random. What is expected is to end up with a block hash, and the decimal value of this hash should be between a certain range! So, lowering this range translates in higher difficulty for miners to find the correct nonce! Pretty cool ah?

Felipe.

1 Like

Correct!! And if they don’t play by the rules, they will lose the electricity spent during the mining process! If they try to cheat, other nodes will reject the miner’s block, so no point of doing this.

Felipe.

1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    it creates incentives not to cheat or alter the blockchain.

  2. Why would it be very difficult for someone to go back change a previously added block?
    because it would change al sunsequent blocks and therefore blocks would not be valid

  3. How does the network regulate mining difficulty?
    it set up a target- hash (lower than defined) and changes it to accommodate the bock rewards; distributed roughly every 10 min.

  1. So they are committed to do the work honestly, to be rewarded later on by coins and fees
  2. Because they would break the link (hash) to the next block, thus needing to recreate changed block, next block and any future blocks. That would mean that this person needs either 51% of the network or extremely more hash power than the competition (both not likely). Otherwise it is impossible practically
  3. By changing the target value. Higher the target, easier is the difficulty, and vice versa
1 Like