Homework on Mining and Proof of Work - Questions

  1. By spending electricity, miners spend money so they are incentivized to follow the rules of the protocol.

  2. They would have to mine the block they want to change, but also remine all the other next blocks. More block are still being created in the original blockchain while they try to do that, so the difficulty is very high, and still growing.

  3. Difficulty is increased by lowering the target of the mining : the nonce miners need to find should give a smaller output when computed into SHA256

1 Like
  1. Miners are made sure to spend a lot of electricity to incentives them to play by the rules and get the block rewards plus transaction fees. In that way they are earning money instead of losing a lot of money.

  2. If you change a previous block, you have to mine again all the other block after, and the one mined right now. It would make it practically impossible.

  3. The more miners the higher the difficulty and the target number becomes low. and vice-versa.

1 Like
  1. The miners get incentivized to receive the block reward and transactions fees of the new block that they are creating to offset their production costs (electricity, but also depreciation on equipment, rent, interest on debt, etc.)

  2. By going back to any previous block and making changes to it, one would break the links between all blocks starting with the one they are messing with. All hashes of that block and the following ones would change and not be confirmed by any of the other nodes. In order for them to come up with a new version of the blockchain that includes their changes, they would have to remine all the blocks from that point onward and do so faster than all of the rest of the miners combined who will keep working on the correct version of the block chain in the meantime. This would only be possible if someone had control over at least 51% of the hash rate or computing power that is going into the mining of that block chain, which is practically impossible.

  3. The approximate time to generate a new block is 10 mins. If mining power increases, this time would be shortened. This is prevented by lowering the target value for the new hash. This means that the difficulty of finding a nonce so that the hash of the new block is acceptable into the block chain increases.

1 Like

Answers

  1. Because in this way they are incentivized to play by the rule, in order to receive block reward and transaction feed. If they don’t follow this system, besides losing the rewards, they will pay even for electricity!!

  2. Every block on the chain has its own hash. This hash is generated by 3 component: all transaction in the block, previous hash block and a random number, called nonce. When an hacker tries to modify a previous block, he modify the hash of this block and the link between the other next blocks. On the node, is accepted only the longest version of the blockchain. On average a new block was build every 10 minutes, so the only way to modify all of this links between blocks is to have the 51% of hash rate, and that’s extremely unlikely.

  3. Difficulty is regulated by the target number. If there are a lot of miners at work (the hash rate is high), the target number is lower, so the probability to guess the nonce is increased.

1 Like
  1. Incentives. We want to make sure the miner has something to lose so he is motivated even more to play by the rules.
  2. Because the block hash will change together with all subsequent block hashes and will have to remine all the blocks until the current point in time and also mine the next block so he has the longest chain.
  3. Every 2016 the mining difficulty (target) will adjust to ensure blocks are mined at a speed approximately 10minutes.
1 Like
  1. Miners have to spend money/electricity to ensure they maintain integrity and remain incentivised to gain block rewards and Tx fees. Any dishonest activity will be rejected by the maths and the miner is effectively penalised having spent electricity/money.
  2. The change affects the block and blocks that follow it, to make a change to an old block and then correct all subsequent block would be practically impossible.
  3. By setting a higher or lower TARGET number the network can make more or less difficult for the miners to generate the HASH for the block they are adding to the blockchain.
1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
  • POW concept - Keep mining to cover costs and see profit.

  1. Why would it be very difficult for someone to go back change a previously added block?
  • By changing a previously added block you inadvertently change the hash values of linked blocks. Each block there after will be incorrect. One could not alter a block as, they would not be successful to get away with it, The cost to make block changes VASTLY outweighs that of any feasible gains.
  1. How does the network regulate mining difficulty?
  • The difficulty is changed by altering the nonce to make the ‘puzzle’ more or less difficult - to try to keep the mining rate to 10 mins.
1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    This is important as it creates incentive to keep the transactions secure and honest
  2. Why would it be very difficult for someone to go back change a previously added block?
    It will change the hash on previous and current blocks. They will then need to be re mined. It will take many years and money to do this
  3. How does the network regulate mining difficulty?
    The more miners there are the more the difficulty rate goes up to solve the cryptographic puzzle.
1 Like
  • Why is it important to make sure that miners spend money (on electricity) while mining?
    PoW !! miners have to spend money on electricity (for mining) to get the block reward

  • Why would it be very difficult for someone to go back change a previously added block?
    because the hash would be changed along with all the linked blocks (hash=prev. hash+data+nonce), to resolve this the miner has to re-mine the chain again and this is time consuming and wouldn’t be cost effective

  • How does the network regulate mining difficulty?
    high amount of miners = high hashrate = high difficulty = low target = hard to guess the nonce for miners

1 Like
  1. Miners secure the network, as long as they play by the rules and are honest they make money.

  2. When contexts of a block have been changed , the links to the puzzle will be broken. All nodes will recognize that the link is invalid. It starts a new puzzle with new context.

  3. When many miners are mining the target will be more difficult. When the target is low difficulty is high, more miners mining. It will be harder to guess the nonce.

1 Like
  1. if miners spend money they’ll get block reward and ensure the network
    2.because all the following links and blocks will be broken and they’ll have to re mine them. but the network will always choose the longest chain …POW
    3.by changing the TARGET: the lower the target is than the higher the difficulty is.
    That is because the hash, to be accepted, must be lower than the target.
    So if it is low you have less chance to guess a lower hash.
1 Like
  1. It creates incentive to keep the transactions secure & honest. If miners do no play the rules, they will lose the money spent on electricity.

  2. It will change the hash on previous & current blocks. They will then need to be re mined and miners will have to keep as well on the new block that meanwhile has been created. it´s just unworthy.

  3. The more miners there are the more difficult it will be to solve the puzzle. Nonce target will be low.

1 Like

You confused the nonce with the target. The nonce is just a random number to add into a block, so when you hash the block, the blockhash is below the target (in practice means the block hash needs to start with a bunch of leading zeros) every 2016 blocks the target get changed to maintain an average of 10 minute block time

  1. It is important to make sure that miners spend money (on electricity) while mining so that it helps keep them honest. They are invested. It makes it economically feasible to follow the rules.
  2. It would be difficult for someone to go back and change a previously added block because all blocks are connected. Each blocks hash consists of the previous blocks hash + all the transactions of it’s own hash = the nounse #. these numbers are appended together and hashed to create the hash of the block. Therefore any change in a block would change all subsequent blocks. That would mean the hacker would have to change all subsequent blocks as well. Do it at a speed that would catch it up to the present because the chain always goes with the longest chain. This is possible in theory only. It is practically impossible.
  3. The network regulates mining difficulty by the difficulty of the puzzle. The puzzle needs to be solved in approx. 10 mins. If there are so many miners that the puzzles are getting solved too quickly the target # gets lowered. If the puzzles take too long to get solved the target # gets raised. Making it easier to solve.
1 Like
  1. so they can be incentivised to recouperate the money spent by acting in a proper way with the program protocol.
  2. Because they would have to change all succeeding blocks for the block to be accepted by the protocol.
  3. the algorythymn difficulty is adjusted to keep the blocks from forming as close as possible to 10 min.
1 Like

1- Because that way they are taking a stake up front and it works as an incentive for them wanting to recover and make some profit mining correctly.

2- Because he will have to rehash all the blocks from that change up, and he will have to do it while all other miners are actĂ­vele adding and adding block, so the computer power needed to do that is too high, and the time needed is high as well.

3- it depends on the network hashrate, the higher the hashrate the higher the difficulty.

1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    The more they spend on electricity the more they will be motivated to earn money.

  2. Why would it be very difficult for someone to go back change a previously added block?
    To make a change in a block that has already been validated implies the recalculation of that previous block. It will take a lot of time and in the meantime other new blocks will be validated and added to the blockchain. That’s why it is very difficult (almost impossible) to catch up with the last validated block.

  3. How does the network regulate mining difficulty?
    The mining difficulty depends on the number of miners. The difficulty increases when the number of miners increase. When there is a large number of miners the target number that they have to reach to succeed decreases and therefore becomes more difficult to guess.

1 Like
  1. To incentivize miners to be honest. If they spend money they want to get the reward (block reward + transaction fees).
  2. Because a block can only be attached to the previous chain by guessing the nonce (a random number) and then calculating a hash that is lower then the target. The hash also depends on the content of the current block and the previous hash. So if you change a previous block, you also change it’s hash and you have to guess the nonce from that block and all future blocks again while other miners are still normally mining. So you need to control at least 51% of the hashing power of the network and spend a ridiculous amount of money on energy.
  3. Depends on the target, if the lower the target, the higher the difficulty.
1 Like

Homework on Mining and Proof of Work - Questions

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

Miners are in competition between each other to mine append the next block to the block chain. Therefore they need to solve a cryptographic puzzle (guess a nonce). Computers generate a lot of electricity to guess that nonce and miners of course want to access the block reward and the transaction fees.

In order to do that, miners need to make sure that they confirm every transaction that makes sense and that there is no double spent for example. Otherwise their block will be rejected by the network and they spent all the electricity for nothing, and won’t get any block reward.

So in case they are not honest, they will lose money. Nobody wants to loose money.
2. Why would it be very difficult for someone to go back change a previously added block?

All blocks are interconnected, as the current puzzle to solve by miners is based on all the hashed of previous block. If you want to change a transaction for example in a previous block, that changes all the hashes and the blocks will not be connected anymore, therefore it will invalidate the blockchain starting from where you changed the transaction, and you will need to mine all blocks over again. This will need numerous amounts off money, and numerous amounts of time to solve that problem again, and it is almost impossible.

  1. How does the network regulate mining difficulty?

The nonce to guess by the miner in order to attach the block to the blockchain must be lower that the target. So are hashing power will be needed.

When there are more miners, the difficulty will be higher because the target will be lowers. Only hashes lower than the target will be accepted.

  1. Because it is the only way to prove their integrity in the mining process. Using (a lot of) electricity is to solve cryptographic puzzles in order for the miner to get his block appended in the Blockchain. Solving the complexe equation is the very result of big electricity investment. It is what we call Proof of Work.
  2. Blocks are connected with each other. Every block and transaction have their own hash values, based on the previous block’s hash value and so on. Changing a previously added block would mean breaking all the links and blocks, leading who ever attempts that crazy project to start all over again from the first block while new blocks are getting created. Every transaction will have to be hashed and so will the blocks. In order to complete each block, that guy will have to solve new complexe puzzles in order to form a new blockchain. That madness would take ages. The Lord of the Rings kind of ages if you know what I mean…
  3. The complexe puzzle proposed to miners is a target number between 0 and infinity. Every miner is given a nonce (random number) that they include in the equation (with the transactions and block’s previous hash). The miners hash all these values in order to be in the target range. A new nonce is given after each hash until a hash is the target range. If so, their block will be appended in the blockchain. The more miners participate in the competition, the lower the target range will be (from 0 to 100 for example) which will take more time for the miners to get a correct hash value.
1 Like