Homework on Mining and Proof of Work - Questions

Nice sets of word used here. You perfectly explained why proof of work is a great and secure consensus. :smiley:

A bit of a confusing answer. When more miners join, the difficulty target is lowered. If the hash guess is lower than the target the block will be valid. :slight_smile:

  1. I believe that it is important for miners to spend money on electricity specifically if a blockchain is also a currency, because it creates a base cost in resources to the miners through electricity costs & mining equipment. This base cost helps regulate the price that the miners are willing to sell for and incentivizes them to follow the network rules so they can validate blocks & earn the block reward.
  2. It is difficult to change a previous block because the hash function of the block would change for the block where the transaction occurs and for every block after that. The further back the block is, the more the cost is in time & energy to rebuild the blockchain.
  3. The hash is created from predicting the nonce of a target number. The blocks are created every ten minutes and the difficulty will change every 2016 blocks depending amount of miners or hashrate on the network.
1 Like

They also keep the network secure. As you said in the second answer, their work makes changing the data difficult. :wink:

1 Like

You haven’t mentioned that changing a block causes all the block after it to become invalid (including the block being changed). This means that the attacker would need to remine all the block over again faster than the current network, in order for him to successfully make that change. But no worres, I am sure you understood it based on your answers. :smiley:

1 Like

Exactly, a chain reaction would happen. Making it very hard to change the block data, especially the older blocks. :slight_smile:

A nonce cannot regulate the difficulty. A nonce is just a place for a number that miners fill in order to get a specific hash. The difficulty is regulated by a difficulty target. If the miner finds a hash that is lower than the current difficulty target, the block will be valid and accepted by the network. :smiley:

Additionally, they are securing every transaction that was included in that block.

1 Like

Depends on the size and the consensus of the blockchain. If we are speaking about bitcoin, well, we can say that it is very hard and costly to do such an attack. :slight_smile:

3 Likes

They also have to repay their mining equipment. Mining is a serious business. :stuck_out_tongue_winking_eye:

The more hash rate there is on the network, the lower the target number is set.

It also secures the network. As you said in the second answer, a person would need to catch up to the network since they will be breaking all the work. And the only way to make the change is to put the work in all the blocks again. :smiley:

  1. It is important that miners spend their money on electricity to mine because it acts as insurance that these miners validate blocks ‘fairly’ and without ill-intent. If you are putting up your own money and investing to successfully mine, you wouldn’t want to jeopardize receiving your BTC reward (incentive) for doing so by maliciously/purposely altering the blockchain for a bigger individual gain. As a miner, although theoretically possible, there is no point in attempting to cheat the validation of blocks because you would be lighting money on fire (via electricity :zap: :money_with_wings:) since the difficulty to do so is astronomical. By getting miners to invest in electricity, it makes sure they have an ongoing investment at risk besides just buying the hardware, setting up, and attempting to cheat the chain.
  2. It would be difficult because the efforts would be futile. If you can imagine attempting to surf in the ocean on your board - against the ocean current and fighting the incoming crashing waves, you wouldn’t be able to even stand up
 the effort to surf is useless. No reward. Rek city
 and you’re the mayor. Now, if you’re on your surfboard and coming in WITH the ocean current going smoothly catching the waves, that is much easier. And enjoyable, and rewarding. You are surfing (mining). There are so many other miners validating(the oceans current) the blocks(waves) that if you want to be rewarded(surfing), you have to play by the natural order of which the system(ocean mechanics) is setup to succeed. Hahahah I just had a amazing Orange Cookies x MAC10 strain and tried using a metaphor :laughing:
 Basically because there are so many miners coming to consensus on which blocks have been validated, if you were to change just one block every other miner would see yours wasn’t agreed upon and yours would be invalidated. If one block changes, so do the following blocks. No point in changing one because then all the previous links are ‘broken’. In order to change so many in the chain, you must use so much power and money on the electricity for a 51% attack you’d get slapped silly just for trying.
  3. (No metaphors :kissing_smiling_eyes:) Mining difficulty is adjusted and set by the network based on how many miners there are. If there are few miners then the difficulty is low, giving a larger reward so that it attracts others to mine and the speed is fast. If there are a lot of miners then they are all ‘competing’ for the rewards and the difficulty is set higher and more power is needed to solve the puzzle. This forces the miners to get serious. The nonce target is set low when difficulty is high.
2 Likes
Why is it important to make sure that miners spend money (on electricity) while mining?

If it didn’t cost miners anything to mine, that means they would be getting free bitcoin (block reward and tx fees).
If everyone can mine at no cost and get rewarded with bitcoins, that devalues bitcoin.
Miners need to be incentivised to mine. They spend money upfront on electricity and mining hardware in order to get the block reward and transactions fees.

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

The hash of each block is based, in part, of the hash of the previous block. If someone changes a transaction in a block, the links between that block and all succeeding blocks is broken. All these blocks would need to be re-mined. It would be very difficult to do because you would have to re-mine these blocks as well as catch-up with other miners continuously creating new blocks.
This would be very computational intensive/expensive and would require mining at a significantly higher hash rate than other miners.

How does the network regulate mining difficulty?

The network adjusts the target for the nonce to regulate mining difficulty.

1 Like
  • Why is it important to make sure that miners spend money (on electricity) while mining?
    Mining keeps the network strong and secure. Miners will spend money on electricity to solve the math puzzle as quickly as possible and to create and append the block and in return they will earn incentive as a block rewards and transaction fees
  • Why would it be very difficult for someone to go back change a previously added block?
    Any change in transaction of the previous block will change the hash of the previous blocks and the blocks ahead
  • How does the network regulate mining difficulty?
    Minining difficulty will be adjusted based on on the no. of miners participation in the network. If there are more miners than difficulty is increased by lowering the target and hence miners need more hashing power to solve the puzzle to create a next block.
1 Like

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

To make sure that they use POW practices to claim the reward. It would cost more to change a
transaction then to mine a new block and recieve the rewards that way.

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

It would take years to remine the broken links if you break one link by changing a transaction

How does the network regulate mining difficulty?

When more miners are mining the cryptographic puzzle that miners are trying to solve becomes more difficult.
When the target number is low the difficulty is high. The miners need to spend more energy guessing the correct
(nonce) target number.A hash of a new block needs to be below the target.

1 Like

QNS 1. Why is it important to make sure that miners spend money (on electricity) while mining?
It is important because by spending money to mine, miners will be incentivised to follow the rules and earn BTC together with transaction fees.

QNS 2. Why would it be very difficult for someone to go back change a previously added block?
It is because in doing so, all the new blocks will have to be mine again as the chain between the transaction record has been tampered.

QNS 3. How does the network regulate mining difficulty?
The network regulate the difficulty by lowering the target when there are more miners. As they will need to guess the nonce, the lesser the range of the nonce, the harder it will be.

1 Like

1.Proof of work, it keeps them honest by making it unprofitable to break the rules
2. It would change the hash for all the blocks and they would have to be remined which isn’t feasible.
3.Mining difficulty is based on the networks hash rate. The higher the hash rate the lower the target for the nonce will be making it more difficult to guess.

1 Like
  1. Why is it important to make sure that miners spend money (on electricity) while mining?
  2. Why would it be very difficult for someone to go back change a previously added block?
  3. How does the network regulate mining difficulty?

A1. To incentivise them and prevent them from not following protocols.

A2. It would take way too long almost impossible and cost too much. A miner would actually be losing money in doing so.

A3. It is regulated by miners having to guess a random number known as ‘nonce’ which must be lower than the target, and the target depends on the difficulty. The more miners on the network the lower the target number. The lower the target is, it makes it more difficult for the miner to guess the nonce.

1 Like

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

By having miners spend money / electricity while mining, it will incentivize them to mine honestly (not break any rules and create invalid blocks). Since only valid blocks will be accepted on the network and rewarded with the block reward and transaction fees, only honest mining will allow miners to recoup their upfront outlay of money.

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

Yes, it would be very difficult for someone to go back and change a previously added block because it would mean that they would have to re-mine the changed block as well as all subsequent blocks. This would be practically impossible (possible in theory only) since re-mining a block would require a very long time for someone to do, while simultaneously the rest of the network would be mining new blocks and further extending the existing chain. So in order to “catch up” and overtake the network, one would have to have more hashpower (at least 51%) than the rest of the network. This is why it would be practically impossible.

3. How does the network regulate mining difficulty?

The network regulates mining difficulty by adjusting the target value of the hash. When constructing a block, miners need to hash together three items:

  1. The nonce they have guessed
  2. The transactions
  3. The previous block’s hash.

Since there is no way to determine if the resulting hash of the above 3 items will be lower than the set target, miners have no choice but to repeatedly guess by using a different nonce until they find a hash that is lower than the target. Only then will the block be accepted. The lower the target, the higher the mining difficulty will be. Conversely, the higher the target, the lower the mining difficulty will be. This is how the network regulates mining difficulty.