Homework on Mining and Proof of Work - Questions

1.Miners spend money so the upfront cost will incentives them to keep them playing by the rules, bad actors will always lose this upfront costs

2.It is difficult to change previous added block as this block is based on the previous block hash

3.mining difficulty is regulated by difficulty adjustment, the hash of the new block
previous block + TX + nonce must be below target value, as increase in target value the easier to mine the value

  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    It ensures the integrity of the blockchain by making sure that miners follow protocol in order to claim the block reward and their associated transaction fees. If they break the rules they will not be able to add blocks to the blockchain and will therefore be financially penalised.

  2. Why would it be very difficult for someone to go back change a previously added block?
    If any previous block is tampered with, (i.e. attempt to remove a transaction record), it will invalidate the hash of that block and break all subsequent links and blocks. The offending miner would then need to unilaterally mine all those blocks again which, given that the blockchain is continually updated every 10 minutes with the addition of new blocks, would be energy and time costly and therefore unfeasible. Whilst is possible for a miner to achieve this by gaining control of 51% of the network, it has been estimated that this would require enough energy to power a large city for more than a week and is therefore not economically viable.

  3. How does the network regulate mining difficulty?
    A new target number is generated every 10 minutes and is based on the number of miners on the network. The more miners there are, the lower the target and corresponding difficulty level. Miners continually guess a new hash until it is lower in value than the target to enable their block to be added to the blockchain.

  1. It intensives people to follow the rules. It could also be argued that it gives bitcoin value as it takes work and investment to keep it operational

  2. Because it takes enormous amounts of power to rewrite the block chain and if you had that it would make more sense to just play by the rules and profit that way

  3. The protocol lowers and raises in difficulty to keep the blocks being produces every 10mins or so

  1. to incentivize a reward and prevent corruption like trying to create a fake transaction.
  2. Because each block is linked and they would have to re-mine all the proceeding blocks again plus blocks that are being mined at the time.
  3. With nonce guessing a random number the more miners there are the more difficult it is.

1. Why is it important to make sure that miners spend money (on electricity) while mining?
Because by making this initial investment, they have an incentive to follow the rules in order to get the block reward and transaction fees.

2. Why would it be very difficult for someone to go back change a previously added block?
Because its hash would change and therefore the hash of the next block as well destroying the links between the blocks. For one person to recreate new links is theorytecally feasible but practically impossible.

3. How does the network regulate mining difficulty?
By lowering the target mining becomes more difficult.

  1. Miners need to be invested in the network, not just receiving rewards.
  2. Blocks are hashed together. Changing data in a prior block changes the hash and breaks the chain.
  3. By raising and lowering the target based on the number of miners.
  1. The importance for miners to spend money is to ensure miners do not cheat and play by the rules. Otherwise they will be " punished " by losing money for not abiding to the rules.

  2. Because of the nature of bitcoin blockchain, every mined block is linked together by cryptographic hashing. If any miner changes any data in one of the already mined blocks, all the subsequent blocks will be altered as well. It will be very difficult to re-mine all the blocks again because of hashrate. As such, because it is falling behind the rest of the other miners with the old chain, the amended chain will be dropped out because only the longest chain will carry on.

  3. The mechanism that regulates difficulty is the hashrate. When there are lots of miners, the hashrate will be higher. In other words, the mining Target number will be lowered so miners will find harder to look for the “nonce” number so that after hashing the block, the figure must be lower or equal to the Target number in order to be successful.

  1. To encourage them to compete for the block rewards.

  2. Any change made in previous block will change the hash in all the next ones.
    One would have to rehash all the coming blocks and it would take too long and cost too much.

  3. More miners, higher difficulty, lower target.

1- to make consequences for your actions in which if you don’t follow the rules you will not only get rejected thus not receive the block reward and fees but you will loose money because you paid a lot for electricity and got nothing.

2- because chaining one block would require the change of all blocks in which every block is linked to the previous one.

3- by sitting a target

  1. Provides economic incentive to mine and play by the rules.

  2. Changing would invalidate the blocks.

  3. Sets target nonce lower for increased and higher for lower mining difficulty, in an attempt to keep block propagation times at 10 minutes.

  1. To make sure that miners are penalized for changing blocks. If they could guess the nonces to “compute” the hash instantaneously, they could recreate a new and longer blockchain immediately. The time and hashpower required to mine ensures that there is a significant electricity cost.

  2. Because they would change the block only on their own copy of the blockchain. The change would result in all of the following blocks to be invalid, so they would have to be remined. By the time they are done, the original blockchain would be much longer, thus, making it impossible to catch up. Because everybody appends their new blocks to the longest blockchain, the changed blockchain would be worthless to the miner.

  3. The difficulty target is a value that gets adjusted every 2000 blocks. A new block’s generated hash has to be lower than the target number. The only variable in this hash function is the nonce, which the miners have to guess over and over until one of them can compute a hash lower than the target. SHA-256 has a lot of possible numbers and the lower that target is, the bigger the amount of wrong hashes gets.

  1. It is proof of work, effort required to earn the block reward. It is conversion of effort into bitcoin in return.

  2. They will need to mine the block and all the blocks after it again.

  3. When more miners joined (with higher hash rate), the block time will be shorter than 10mins, the difficulty will then be adjusted accordingly.

  1. so they have spent there own money towards mining and makes them have more incentives to play by the rules
  2. because it disrupts all future blocks
    3.by increasing or lowering the target

Why is it important to make sure that miners spend money (on electricity) while mining?
The idea is that they spend money to make money. They are incentivized to do the necessary work
to put forth the effort to gain the reward. This process keeps everyone honest.

Why would it be very difficult for someone to go back change a previously added block?
Because each block contains a reference from the block mined before it, along with a
random unique number allowing for proper block size. It would be impossible to
edit 1 block and also recreate all those that had followed and continue to be made
during that process.

How does the network regulate mining difficulty?
Raising and lowering the difficulty target.

1 Para que exista uma punição financeira para quem tentar corromper os dados na blockchain.

2 Pois não existe incentivo financeiro para que isso seja feito, afinal de contas para que ocorra um ataque de 51% na blockchain é preciso obter a maior parte da capacidade de hashing.

3 Ao restringir as possibilidades de outputs(hash do bloco). Quando os blocos começam a ser minerados num tempo relativamente diferente de 10 minutos existe um ajuste de dificuldade, onde o target dos outputs é diminuido ou aumentado, afim de dificultar a obtenção de um hash na faixa desejada.

  1. Because it creates an incentive for the miners to play by the rules; if they don’t play by the rules, the electricity they spent on mining the next block, will be lost, because the rest of the network will not accept the block as the next block in the chain.

  2. Because as soon as they change the data in a block, that block’s hash will change. Each and every block (except for the genesis block) refers to the previous block’s hash. This means that if you change the data in one block, that block’s hash will change, making the next blocks link to the block you changed invalid. This requires you to re-mine that block and find the correct hash for that block, and soforth for each and every descendant block, and, at the same time, keep up with the network that keeps on mining new blocks. In theory it’s possible, but it’d require insanely amounts of electrical power. And even if you had that electrical power, you’d then just be more incentivized to invest that electrical power in mining new blocks and earning block rewards and fees.

  3. A hash is basically a hexadecimal value. To make sure there will always be an incentive for miners to mine new blocks and play by the rule, there is a puzzle you need to solve, that gets harder or easier depending on the supply/demand status; how many transactions needs to be verified and how many are there to verify these transactions (miners). The puzzle you need to solve is basically to generate a hash that has a hexadecimal value below a certain target. This target will be lower when the demand is higher (so it becomes more difficult), and higher (easier for miners) when the demand is lower. The hash is based upon the previous block’s hash, the current list of transactions (the txs you want to include in the block you’re about to mine) and an unknown number; the “nonce”; basically that last variable you need to find that (together with the transactions and the hash of the previous block) returns a hash with a hexadecimal value within the target range.

1 Like
  1. Keeps them honest. If they don’t play by the rules there block will not be accepted, and will incur a loss
  2. They would never be able to catch up and repair that block and future blocks.The longest chain wins.
  3. By the amount of miners on the network, many high less miners lower difficulty.
  1. It important to make sure that miners spend money (on electricity) while mining, because it gives value to each bitcoin, it gives more security by incentivizing the miners to play by the rules.

  2. It would be very difficult for someone to go back change a previously added block, because he would need to recalculate every subsequent blocks, which would require too much computational power.

  3. The network regulates mining difficulty by adjusting the mining difficulty every 14 days, i.e. the miners will have to guess a nounce smaller and smaller each time the difficulty increases.

Homework on Mining and Proof of Work - Questions

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

The blockchain transaction fee is designed to reward the miners, and cover their electricity operating costs to maintain the blockchain network. Whereas, the blockchain reward acts as an initial bonus to encourage miners to join the network, compete and maintain the longest length blockchain.

Overtime the blockchain reward diminishes to zero, and is ultimately replaced by the miner only receiving the blockchain transaction fee. Therefore, the value of transaction fee must be designed to grow proportionally to the value of the blockchain difficulty thus encouraging miners to continue to compete to maintain the longest blockchain.

Each newly appended block added to the blockchain is controlled via a consensus algorithm based on a 5 discrete elements; 1) Only the longest blockchain is maintained, 2) A target number, 3) A random number 4) The new transaction, and 5) The previously hashed block.

Mining electricity costs are directly related to the these 5 elements with the level of difficulty (electricity costs) being controlled via element 2 the “target number”. By controlling the value of the target number the computational difficulty of the consensus algorithm is constantly regulated and updated causing the miner to incur additional electricity costs to mine (compute) the newest block. Therefore, the transaction fee is directly related to the mining compute difficulty, and thus ensuring each newly form block appended to the blockchain is not realized for free, but at a cost to the miner.

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

The blockchain is a mathematical puzzle where each subsequent hashed block is appended to the end of blockchain via a mathematical hashed dependency which is linked to the previously mined hashed block.

The Blockchain miners & network nodes follow the blockchain with the longest sequence of blocks. All other shorter blockchains are ignored. Therefore, to change a previously hashed block requires an extremely high level of compute power to change a previously mined block, but at the same time update all subsequent blocks added to the blockchain and do it at such a rate that the newly formed “changed-blockchain” exceeds the length of the existing blockchain. If the newly formed blockchain does not exceed the length of existing blockchain then it will not become accepted by all nodes within the blockchain network and so it is ignored consensus as being false/inaccurate.

3. How does the network regulate mining difficulty?

Mining difficulty is regulated via a consensus algorithm which derives the newly hashed block based on 5 elements; 1) Only the longest blockchain is maintained, 2) A target number, 3) A random number 4) The new transaction, and 5) The previously hashed block.

The element 2 - the target number - ensures the miner is unable to guess the random number required to mathematically hash the newest block appended to the blockchain.

The value of the target number is set based on the number of active miners. The more miners competing to form the newest block the lower the target number. A lowered target numbers increases the network’s hash rate (computational mathematical difficulty) to mine the newest block in the blockchain which in-turn increases the transaction fee, and hence the miners electricity costs.

Therefore, the transaction fee is directly related to the mining difficulty to ensure each newly form block appended to the end of the blockchain is not realized for free, but at a cost to the miner.

1.Miners spend electricity for bitcoin as an incentive and its important to they keep the network alive
2.To change a transaction you would have to mine all subsequent blocks and it would take more energy than it would be worth to do.
3.More miners on the network lower the target so it is more difficult to find the nonce.