Homework on Mining and Proof of Work - Questions

  1. So that they are incentivized to mine the block following the rules; If they try to manipulate the block, they not only lose the blockreward and transaction costs but also their investment (electricity spent).

  2. If someone would change a previous block, all the blocks/chains after are broken. They would have to remine the changed block and every block after and catch up with the correct blockchain.

  3. More miners mean a higher difficulty.

2 Likes

Thanks Fabrice. Understood.

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

Miners are incentivised to play by the rules. Because just if they do they get the money/BTC/reward. In order for this system to be truly secured the miners have to have expenses. So that they have something to loose. Otherwise there would be a lot of players trying to corrupt/fraud the network.

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

Because the hash power of BTC is so big. One would have to have more than 50% of all the hash power to try to do that. And if one would like to change manny blocks back even that would not be enough. If someone would have so much power playing by the roles would make him more money/BTC than any change of past transaction.

And because one would have to hash all the blocks from block of change.

  1. How does the network regulate mining difficulty?

By putting the target high or low. If the miners number (hash power) is rising the difficulty should also rise. That means that the target will be lower.

2 Likes
  1. Why is it important to make sure that miners spend money (on electricity) while mining? Thats how we are confident that miners are honest. When they break some protocol rule they lose money and don’t get block reward and transaction fees.
  2. Why would it be very difficult for someone to go back change a previously added block? If you change a block, the following blocks will be changed. This practically impossible to re-mine all the blocks, because of the difficulty of this cryptographic puzzle.
    How does the network regulate mining difficulty? A new target number is generated every 10 min and is based on the number of miners. The lower the target, the higher the difficulty.
2 Likes
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    Incentives to mine. This previous cost ensures that miners play by the rules in order to receive the block reward, and if it is not the case, the bad actors will lose money.

  2. Why would it be very difficult for someone to go back change a previously added block?
    Because every block contains the hash from the previous blocks. If someone changes any input on a block, the hash would be different as well all hashes from the subsequent blocks, since the link between them was broken and he should re-mine all the next blocks and that is infeasible.

  3. How does the network regulate mining difficulty?
    More miners, the difficulty is higher since the target for the new block is lower. In the opposite side, fewer miners, it is easier to mine since the target for the new block is higher.

2 Likes
  1. It is important for miners to spend money (In the form of electricity costs) while mining because it deters miners from breaking the rules and encourages them to seek out the block reward. Trying to change/cheat the blockchain would become exponentially more expensive as they would expend large amounts of electricity re-mining blocks that have already been mined as well as catching up to the network all while gaining nothing.

  2. It would be very difficult for someone to go back and mine a previously added block because they would have to rehash the block they want to be changed as well as constantly trying to catch up to an ever-growing list of transactions that are being added to the network while gaining nothing in the process.

  3. The network regulates mining difficulty by lowering the nonce needed to hash a transaction (In the case that there are many miners). For instance: when there are many miners the window sample size of numbers needed for the hash gets smaller. This could be visualized like a dartboard in the sense that if there were few miners the dartboard would get larger so that it was easier for the few people to hit it. And the more players there are in the game the smaller that dartboard becomes so that only the participants best able to hit the target gets a reward.

2 Likes
  1. If miners spend money up front on electricity, they are incentivized to “follow the rules”. If they don’t, their block will not be accepted into the blockchain and they won’t get their reward money.

  2. If someone were to go back and change something on the blockchain, they would have to remine the broken links of the blockchain. They would at the same time have to keep up with the other miners, that keeps on mining at the end of the chain.

  3. The more people that mine, the harder it will get. The target will be set lower, so that the nonce is harder to “guess”.

2 Likes
  1. To motivate them to play with the rules. Because if they tried to be against the rules and they get caught (they will be caught) they will not earn any money, that they could have potentially gotten plus they have spent money for the electricity and hardware etc.
    playing against the rules is highly non profitable.

  2. A block gets mined within approximately 10 minutes with the hardware power of the whole network. if a single person wanted to change that block he would need the calculation power of the whole network from the time that block was mined, just to change that block and even then he would need to do the same with all other blocks that came after the changed block, which would take exponentially more time. but not only will it be extremely difficult to solve the puzzles himself but to catch up and create a new longest chain will be practically impossible for him.

  3. the target range decreases if many computers are mining and increases if less computer are mining. higher target means higher probability of finding a fitting hash. lower target means less probability of finding a fitting hash.

2 Likes

It is important for miners to spend money on electricity as it gives them an incentive to win the block and get rewarded.

It would be difficult for anyone to go back and change a Previous block because if it is changed it will break the block connection thus having to start over again from that broken point.

The network regulates the mining difficulty by the target number. When lots of miners Target number is lower, when few miners target number is higher. This changed difficulty from lower to higher.

2 Likes
  • Why is it important to make sure that miners spend money (on electricity) while mining?
  • Why would it be very difficult for someone to go back change a previously added block?
  • How does the network regulate mining difficulty?
  1. The reason proof-of-work makes it intentionally expensive for miners to participate is because proof-of-work also makes it expensive for a malicious miner to attack the network. The difference is that proof-of-work doesn’t pay attackers. If a miner attempts to attack the network, they still have to consume lots of electricity, but they will have no way to pay that electricity off.

  2. The Bitcoin network consumes as much electricity as small countries do. In order for a miner to have a chance at successfully attacking the network, they would need to purchase a huge amount of specialized mining equipment and consume around half the electricity that it takes to power a small country. This is very discouraging to potential attackers and makes it very difficult for them to profit in a double-spend attack.
    Another reason that conducting a double-spend attack is unlikely to succeed is because the entire network will instantly become aware if 6 blocks in the chain were reverted. Due to the pseudonymous nature of the blockchain, this can draw lots of attention on to the attacker.

  3. Difficulty calibrates every 2016 blocks, to keep the block generation within average of a single block every 10 minutes. The difficulty is correlated to block generation time. Meaning it will adjust either increase or decrease according to how fast block generation is. We basically want a block every 10 minutes (2016 blocks in 2 weeks).
    Difficulty is calculated using the formula:
    difficulty = difficulty_1_target / current_target
    current_target is a 256-bit number. â–ș Nonce (“Number used once”)
    Difficulty_1_target can take various values. Traditionally it’s a hash function first 32 bits of which are equal to 0 while all the rest are 1 (it is also called pdiff or pool difficulty).

2 Likes
  1. It’s important to make sure that miners spend money while mining so that they are more incentivized to contribute to the blockchain by trying to get the block reward to cover their electricity costs. It’s also important to prevent theoretically possible hijackings of the network that try to break the blockchain with 51% attacks.

  2. It would take thousands of years of time for one or a few attackers to break the blockchain because the data in the blocks are related. If you change even a minor piece of data in the block, the hash of all the chains will change as well. The blocks would have to be re-mined, and also after that to catch up with all the new blocks created.

  3. Miners have to guess a random number called nonce, and the nonce should be less than a specific target. The more there are miners, the lower the target is, and so the more difficult it is to mine.

1 Like
  1. Spending money is what incentifies miners to earn the rewards and fees to pay their bills and make a profit.

  2. Changing a prior block would necessitate re-mining all blocks from that point on and catching up and surpassing the “real” block chain. Should this happen, this modified blockchain would be accepted as the real blockchain (due to being longest), but the amount of time, energy, and computation ($$) to achieve this is highly mathematically improbable.

  3. Mining difficulty is modified every so often based on the amount of time it has been taking to mine blocks. The target for this amount of time is 10 mins, so if it has been taking more or less than 10 mins, the difficulty changes to attempt to keep the block mining interval at the standard 10 minute timeframe.

1 Like
  1. It is their proof of work of making an investment
  2. Going back and changing a previous block will alter the hash of that block. When that hash is changed, that will impact the next block and the block after that, etc. The subsequent blocks are impacted because the hash of each block is a function of the previous block hash, the current nonce, and the current data.
  3. The more miners on the network, the greater the difficulty of creating the block because the target hash is lowered.
2 Likes

1 - It is important otherwise there is no incentive to keep the blockchain secure. By making the cost of mining so low or making it easy it would allow anyone to attempt to edit the blockchain. However because the mining costs so much it is benificial to simply use the cost and energy needed to mine the blocks for the correct purpose as to recoup those costs and make some profit.

2 - It is very difficult to change a previously mined block because any slight change to the data in one block will have a recurring effect on all following blocks and would require remining them all faster than the rest of the miners are completing the blocks.

3 - The network regulates difficulty by changing the target based on the hashrate this has the effect of maintaining a similar cost to miners so that it never becomes too easy to solve or too difficult and slows the network. The target it 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.

2 Likes

1 Mining effort is based on the electricty spent trying to solve the nonce puzzle
2 It is practically impossible because of the high amount of time and electricity spent on resolving all the nonce link changes as a result of the previously added block
3 The network regulates mining difficulty based on hashing power, the number of people mining at the same time

2 Likes
  1. So that they are incentivised
  2. You would break the link to the next blocks and would have to re mine all the blocks with broken links and solve all the puzzles again to create new links as well as catch up to the network
  3. Through setting a target that has to be met by a hash in order for the block hash to be validated.
2 Likes

1- If miners are spending money in order to make a profit they have to play by the rules to get the transactions fees or incentives.

2- Because the blocks are related to previous blocks, in order to change a block you would have to re-mine the blocks after the one you changed, and supposing you don’t have the majority of the hashing power that would mean other kept mining blocks ahead of yours, so the consensus mechanism would make other nodes deprecate your chain in favor of the longest one.

3- The network is configured so it tries to maintain a 10 min block generation rate, so if the hashing power drops (less miner) the difficulty of mining decreases and vice versa. The dificulty is defined by the target number, the lower it is the less probable of generating a block satisfying the condition of
Hash(Previousblock + CurrentBlockTx’s + nonce) < target

3 Likes
  1. The miners need to spend a lot of money on electricity to prevent them from being dishonest because if they don’t follow the rules they will not get any reward and all the money they have invested will be wasted.

  2. Because if they change a previous block the hash of all the blocks that were made after will also be changed. The person would have to mine all of these blocks again and also would have to catch up with all of the blocks that were mined after the previous blocks. This would take too much time and would be impossible to do, It would also cost too much money. It would just be better to invest your money in competing with other miners to mine new blocks.

  3. The more miners there are the more the difficulty increases. If there are more miners the more the target gets smaller and it then gets harder to get this number because that number has to be smaller then the target.

3 Likes
  1. So it is prohibitively expensive to try to change the blockchain e.g., for a double spend. Also economic incentive not to try to cheat or the cost of mining will be wasted.
  2. Because they have to remine that block to get the hash below the difficulty again, but in the mean time the rest of the world is mining new blocks, so the hacker needs to catch up and keep mining his or her own chain until that chain is longer. Unless they have 51% or higher of the hash power, it is practically impossible.
  3. Blocks should be produced every ten minutes on average. if the time falls below or above that, the network raises or lowers the difficulty to bring it back in line. This involves lowering or raising the target hash (lower target is harder to meet).
3 Likes
  1. spending money on mining incentivises miners to be honest so there block is added to blockchain for block reward and transaction fees.
    2.changing a previous block , changes all blocks following. all blocks will need to be mined again, shortening your thread. the network uses the longest chain with more proof of work
  2. difficulty depends on hashrate[strength of computing power] . more miners=lower target=more difficulty.
3 Likes