5

Why can malicious miners not award themselves any number of bitcoins? Is that because the award itself is a transaction which has to be confirmed by a random miner? And if so, what if the miner himself will win the race?

Also, why can't any miner that has solved the block broadcast a self-award transaction at any time?

Also, if the award is in a transaction, who is the sender?

4 Answers 4

4

A miner is at perfect liberty to create any sort of block he wants and broadcast it to the network. This could include rewarding himself with an unlimited number of bitcoins, or including transactions without proper signatures. However, this block means nothing if other miners do not consider the block valid. If other miners reject the block, then it doesn't matter what the block says.

This creates a situation where a miner is wasting his valuable computational resources if he chooses to do the proof-of-work on an invalid block. He would be throwing away the money invested into the mining hardware. Unless he has reason to believe that the majority of hashing power on the network will accept his invalid block, it's in his best interest to follow the rules of the system. A situation like this is known as a 51% attack.

So long as hashing power is not centralized into the hands of those colluding with one another, Bitcoin is considered safe from this sort of vulnerability.

3
  • "However, this block means nothing if other miners do not consider the block valid. If other miners reject the block, then it doesn't matter what the block says." Okay, and how do we know that they consider it valid or invalid? Do they review the miner's work and sign a validation agreement and distribute that too or something?
    – Andrew
    Commented Aug 28, 2018 at 19:24
  • 1
    @Andrew, another miner approves a block by mining on top if it. If they continue to mine on top of a previous block or an alternate block, then they clearly don't consider the rejected block as being the true record.
    – Jestin
    Commented Aug 29, 2018 at 20:55
  • But doesn't that require there to be transactions? Obviously it's in heavy usage today but my understanding is the blocks are pretty long.
    – Andrew
    Commented Aug 31, 2018 at 0:01
2

Miners get paid by including one transaction in the block that creates and sends new bitcoins to their own address. This rule allows the Bitcoin network to pay for its own security and serves as a fair mechanism to distribute the initial bitcoins. The amount that a miner may mint is limited. Currently, miners get to mint 25 new bitcoins per block. They also use this transaction to collect the transaction fees of the transactions included in the block. This special transaction must be in the first position of the block's transactions and is called the Coinbase transaction.

Miners create the blocks, but the rules are checked and enforced by the whole network. If a miner creates a block that doesn't follow the rules, other network participants will discover this and not accept the block.
If a miner where to award himself more money than the rules allow, the other participants see when they go through the block that it's breaking the rules. The same happens when a miner changes a transaction to give the money to himself: The signature on the transaction would not match the transaction and other network participants would not accept the block.

It is easy to check whether a block is valid, but hard to find a valid block. Therefore, it is impractical for a miner to lie about a block, because nobody would believe him anyway.

2

First, from a cryptography point of view, transactions have to be signed, and the other nodes in the network will be able to detect and reject transactions for which the signature was forged. Second, from an incentive point of view the miner will have invested some time in solving a block that will, as a result of the previous point, not earn him anything. So we can expect he won't try in the first place.

Another way to 'award themselves with any number of bitcoins' would be to create, rather than steal, the bitcoins. Indeed, mining is also about creating some bitcoins (currently ca. 25). But if a miner was to create more than 25, the block would again, not be acknowledged by the other nodes in the network.

I think the point is that a race is not won by "adding the next block" but rather by adding a block that will be considered by the other nodes to be valid.

5
  • yes, but what if I say that I solved the block, when I really didn't?
    – nix
    Commented Jun 26, 2016 at 17:59
  • so, after I confirm (solve) the block, then someone else has to confirm my confirmation and so on?
    – nix
    Commented Jun 26, 2016 at 18:00
  • 1
    Solving a block is like solving a puzzle: it takes long to solve it but it is almost immediate to see whether you indeed solved it or not. So the other nodes will see almost immediately the puzzle is not solved. So the miner will not reep benefits from his/her lie.
    – hartmut
    Commented Jun 26, 2016 at 18:01
  • okay, I think I understand how hashing works. but does anyone have to confirm my solution to the block I was solving AND also solve the transaction I created as a self-reward for solving it?
    – nix
    Commented Jun 26, 2016 at 18:02
  • 1
    @NikaGamkrelidze The entire network works by consensus. If you broadcast a block that doesn't follow the bitcoin consensus rules, everyone else on the network will reject your block. They reject it because they look at all of the transactions and the coinbase reward and if any of those are invalid they know your block is wrong.
    – Brandon
    Commented Jun 26, 2016 at 18:20
1

Even if a miner pulled a 51% attack and tried to mine a block with a coinbase transaction of, say, 26 bitcoin instead of 25, (or even 25 bitcoin after the halving), the rest of the network would reject that block. And, as others have said, the miner would have waisted resources. Also, note that one of the rules also state that a miner can only spend his reward after 100 blocks have been mined on top of his.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.