Homework on Mining and Proof of Work - Questions

  1. Because it gives the miners an incentive to play by the rules of the system.
  2. This is due to the fact that each block is recursively dependent on the hash of the previous block, and thus when the content of one block is tampered, to make it valid, we would have to re-mine every previous block again.
  3. The higher the hash rate, the lower the target hash is. And as the target gets lower, the probability of guessing a nonce that makes the hash lower than the target significantly decreases
2 Likes

1 - Why is it important to make sure that miners spend money (on electricity) while mining?
They need to be incentivised in order to follow the rules to mine and produce new blocks.

2 - Why would it be very difficult for someone to go back change a previously added block?
Because it would change the hashes of the blockchain and make it impossible redo (re-mine) the new hashes.

3 - How does the network regulate mining difficulty?
With the target. The more transactions are on the network, the lower the target is and it is more difficult for the miners to guess the nonce.

2 Likes

1. Why is it important to make sure that miners spend money (on electricity) while mining?
This discourages miners from breaking rules as if they do the nodes will reject their blocks mined and they will have wasted the money required to mine the nounce.

2. Why would it be very difficult for someone to go back and change a previously added block?
Each block’s hash is dependent on the previous block’s hash and thus if a transaction is changed on a retrospective block, all connected blocks ahead of the block will require to to mine a new nounce for each block, which will require a lot of electricity to do so.

3. How does the network regulate mining difficulty?
The network changes the target value to a lower value to increase the difficulty and raises the target values to lower the difficulty. The difficulty is adjusted every 2016 blocks based on the it took to find the previous 2016 blocks.

2 Likes
  • By spending money the miners have incentives to follow the rules since they are invested in the mining process.
  • If anything is changed in the previous block it would break the link to the next and the following blocks.
  • As there are more miners the difficulty to guess the nonce is increased by lowering the target.
1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    POW consensus is built in a way that miner can make money only if they spend energy(money).They are incentives, like block rewards and tx fees for every block that miner solves, and after verification of btc network is added to blockchain. Miners can do that only by hashing, using a lot of computing power to guess a nonce. If miners break the rules, they lose money because theirs mined block get rejected and energy spent is in vain.
    That makes btc network trustless and secure.
    ,

  2. Why would it be very difficult for someone to go back change a previously added block?
    It would be very difficult because change in one block would break the link to next and every link after that to the very last freshly mined block. To remind all that, one would need more than 51% hash rate of network, enormous computing power, billions of $ and lots of millennia to work. Although that is theoretically possible, practically not so much. So, it is more profitable to mine fallowing the rules.

  3. How does the network regulate mining difficulty?
    Mining difficulty depends on a number of active miners. As there are more miners, targets gets lower which makes difficulty to increase, and vice versa (less miners-higher targets-lower difficulty)

1 Like
  1. Miners have to spend money on electricity as proof of work and this incentivizes them to be ethical as there are no rewards for unethical miners, hence they lose money spent on electricity.

  2. Changing a previously added block will affect the hash of all subsequent blocks and invalidate the blockchain; to correct this, all blocks after the altercation will be mined again and the miner has to catch up with current block. This is impracticable and not profitable.

  3. Difficulty is a measure of the number of miners in the network. It adjust by reducing or decreasing the target (threshold) miners have to hash for.

1 Like
  1. The spent money keep them working to earn more money.
  2. Because it will change a lot of other blocks too and it is nearly impossible to remine them.
  3. By the target number. (But at this time I don’t know who or how this is changing…)
1 Like

Target adjusts based on the network hashrate. :slight_smile:

  1. In order for them not to cheat the system as mining uses a lot of electricity to mine blocks, also this way for their efforts of securing the network playing by the rules they’re incentivized with Block rewards and transactions fees from the block appended.
    2Requires a lot of computing power, plus previous links would be broken and they would have to re-mine all the blocks which could take ages, meanwhile new blocks are being added by other miners which they would also need to catch up too, this is infeasible for them.
  2. More hashing power greater the difficulty.
1 Like

Why is it important to make sure that minners spend money (on electricity) while mining?
While they’re securing the network, the minners compete to resolve the cryptographic puzzle that once solved give the minner the right to put (append) his block on the network rigth next to the last. The spent of eletricity make sure that in the case of fraud, the minner dindt get the reward and still has to pay the eletricity bill. Thus, the incentive to be honest.

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

Because the cryptographic puzzle that the minners need to solve to append their blocks into the network is linked to the content of the previous blocks. If you try to change some information in a block previous to the actual, the link between the block and the network will be broke. Since the hashrate increases with more mining, the work to rebuild all the links between the block that you made the change and the network will demand more than thousands of years to be done. And even in the possibility of you spent those thousands of years, you’ll not be able to reach the new brocks that are created by people mining on the same thousand years you spent to reach the previous block. So its pretty much impossible.

How does the network regulate mining difficulty?
Every block has a distinct hash function that is based on the previous hash inside the previous block. More people are mining, reduced is the “nonce” wich is the target that the minners try to guess.
In simple words: Target is low when difficulty is high, thus the minners will spend more eletric energy to solve the puzzle.

1 Like

They have a distinct hash output from the same hash function. The function doesn’t really change. :slight_smile:

1 Like

Thanks for the alert.

1.Miners are paying up front with electricity. To make that money back with profit the miner would have to stay honest to the blockchain contributing security to the network.
2. 51% of the networks mining hashrate would be needed to redo subsequent blocks and create the longest chain for the network to accept it.
3. The more miners thier are the lower the threshold for miners to guess a cryptographic puzzle in order for their block to be linked to the blockchain.The threshold is called a target number. To guess a number less then target a hash is derived from list of transactions in the block, the hash form the previous block and a random number that computers have to guess called nonce. When miner hashes a number lower then the target number before others it is picked as the following block.

1 Like
  1. to force them to do the right things. Because they need to first spend money and energy in order to gain money. And if they don’t do the right or play by the rules, they will be penalized, by loosing money.

  2. cause it will change not just the previously hash, but the followings hash blocks, and that means that it will change the entire network, which can be done but no one will follow that network and in order to be accepted that network must be solved faster and solved alone, than the other that everyone is trying to solve.

  3. by lowering the target then it is m ore difficult to get the nonce.

1 Like
  1. So they have a vested interest in producing
  2. For the revised block, they would have to mine (solve) for that block as well as all future links and blocks from the revised block. Given blocks are added every 10 minutes or so and only the longest blockchain is accepted vs. the amount of time and energy required to revise and re-solve, it would be all but impossible to accomplish.
  3. Target #'s are constantly changing to make solving (guessing) a lower number more or less difficult.
1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?

It demonstrates that computational resources were provided in attempting to solve the hash problem by cycling through various nonces which requires a lot of electricity.

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

That person or group would have to change/mine all blocks moving forward and outpace the network, which would require 51% or greater of the network’s hash rate.

  1. How does the network regulate mining difficulty?

Lowering the target range of an acceptable hash, this happens if the time decreases to solve the POW algorithm, to keep mining to 10 minute blocks, the difficulty is adjusted up or down in order to maintain this timeframe.

1 Like

1. Why is it important to make sure that miners spend money (on electricity) while mining?
more computing power will lead to more electricity consumption. the more computing power they have the more likely they are to solve the puzzle and have their blocks added to the chain so they can collect the block reward + transaction fees, having to put some skin in the game before getting any sort of rewards incentivises the miners to play by the rules as they will get their initial investment + profits.

2. Why would it be very difficult for someone to go back change a previously added block?
they will have to create a new hash for that block but also rebuild the chain up to present, this makes it more likely to be impossible as the rest of the miners will keep adding new blocks while the malicious miner tries to catch up and have their chain validated, it will eventually become more and more expensive for the perpetrator to catch up as the requirements to build a new block increase with time and network usage.
**NOTE : I have made some notes of my understanding how mining, block creation and POW work. I will leave them here for people with similar mind set as mine, dunno if my explanation will make sense to everyone but most likely it will help someone understand :wink:

- If data is modified in any previous block(s) then the link between following blocks will be broken, the puzzle that miners are required to solve is not based only on the information from the previous puzzle but it is interconnected will all previous blocks as with each puzzle being solved has its information carried on to the next one, similar to a string of DNA, we all carry genetic information from our ancestors and that genetic information will be mixed with new one (spouse) and will be embedded into our predecessors DNA, so on an so forth.

- Example : Let’s say we started a blockchain, 1st block will contain the following information, a message “hello world” + Nonce (random number) the hash or digital fingerprint of this block is 1a2b3c4d , after I want to add e new block that will contain the message “my name is Emanuel”, this new block will receive a hash based on the following : 1a2b3c4d (previous block hash) + “my name is Emanuel” + Nonce, this will give us a new hash 1a5e3c6f2b7g4d, a mixture of the previous hash + the new information added from the new block and nonce, same thing applies again if I add e 3rdblock containing the message “thank you Ivan an Team!”, the hash for my 3rd block will contain the previous hash which is 1a5e3c6f2b7g4d + “thank you Ivan an Team!” + nonce, which will result in our new hash 4d5e6f7g1a3c. This is repeated over and over again with all new blocks, if we let’s say add a “!” to our 1st message and from “hello world” we get “hello world!” then that 1st hash (digital signature) changes and that change will invalidate all predeceasing blocks as they contain a digital signature assigned to the message “hello world” , the chain is broken not in one ring that connects it, but all the rings that follow will break.

3. How does the network regulate mining difficulty?

  • That new hash obtained from all that previous information (previous hash + transaction list + nonce) will then be compared to a target number, this new hash needs to be lower than that target, the target number is based/dependent on the difficulty of the network, the more miners there are on the network, the lower the target number, this overall difficulty will make it harder for the miners to guess the nonce. This is the cryptographic puzzle that miners need to solve to get their block connected to the chain. It is basically a guessing game that becomes harder and harder and requires more computing power and more electricity.
1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
    To keep the blockchain secure. The miner is incentivized by the block reward and transaction fees if their block they mined is valid and accepted by the network.
  2. Why would it be very difficult for someone to go back change a previously added block?
    It would invalidate the blockchain following it, so those would need to be mined again, which requires a lot of money, and it would be very difficult to be accepted by the network as it is a shorter blockchain with so much to catch up. Also it would just make sense for that miner to go by the rules if they have so much hash power.
  3. How does the network regulate mining difficulty?
    The mining target is inversely adjusted depending on the total hashrate of the network.
1 Like

Homework - Mining & PoW - Answers

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

Miners are made to spend electricity to make them committed to recouping their investment by following the blockchain’s rules and winning the block reward. With the majority of miners committed to doing so, winning is only possible if there is mathematical consensus with previously transcribed transactions in previously appended blocks on the blockchain. When there isn’t consensus, the block and its transactions are rejected, and the miner is not able to recover their investment already made in electrical energy utility. The integrity of the blockchain’s transactions and the security of the system is thus maintained.

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

When previously added blocks are changed in any way, the block hash changes. This affects all subsequent block hashes, so they would all have to be recalculated and replaced whilst also keeping to the appropriate target requirements. For this to be done on any scale would require astronomical amounts of hash power (and hence electrical energy) to do successfully and is currently not practically possible to accomplish.

  1. How does the network regulate mining difficulty?

The blockchain network regulates the mining difficulty by raising and lowering the numerical target which the block hashes values have to be lower than to be successful at appending that block onto the blockchain. The lower the target, the fewer the random hash values fall below the target number, hence the higher the mining difficulty.

1 Like
  1. Spending money incentivizes miners to follow protocol. It also makes it more difficult to solve the cryptographic puzzle.
  2. They would need unknown computing power to accomplish this. As they would attempt to travel back to change the transaction other miners would be solving blocks ahead of them, so they would fall behind. To go back and change a transaction from a previous block would require an insane amount of money so it would be fruitless for a miner to spend on something that will ultimately fail. The final reason is the network follows the longest chain.
    3.Yes mining becomes more difficult with more miners, and less difficult as miners fall off, or if it is taking too much time to solve blocks.
1 Like