0

I'm trying to understand the proof-of-work idea for verifying a transaction. I think I understand why proof of work is needed to verify transactions (essentially to prevent spoofing/double spending etc).

But my understanding is this:

  • the proof of work for verifying a transaction is the same as for mining a new bitcoin
  • if this is the case, then it becomes harder and harder to verify transactions.

I'm pretty certain the first statement is false, in which case I'd like to know what exactly is the proof-of-work for verifying a transaction.

3 Answers 3

1

I think I understand why proof of work is needed to verify transactions (essentially to prevent spoofing/double spending etc).

This is right.

the proof of work for verifying a transaction is the same as for mining a new bitcoin

This is right too.

if this is the case, then it becomes harder and harder to verify transactions.

It depends it can become harder as it can become easier. But whatever happens there is no issue with that.

Explanations:

The miner generates blocks which header have the lowest possible sha256 hash until he finds one which sha256 is lower than the Target. This block will be valid and can then be included in the blockchain. Inside of the block the first transaction is different from the others because it hasn't a valid input and it has as transaction output an address controlled by the miner. This address will receive the block reward(new bitcoins that are generated with the block) as well as the transaction fees of the transactions that were included in the block.

Now actually it's true that generating new blocks become more and more difficult because there are more and more miners with more and more sophisticated mining material. This is why the target becomes more and more lower in order to maintain an average time between each generated block of about 10minutes. But if miners will start to stop mining bitcoin the target will increase and mining will become easier again.

This post will help you to understand a little bit better what are the different components of a block. Bitcoin: 285 bytes that changed the world

3
  • 1
    I guess my confusion is the following: if verifying a transaction is as easy (or hard) as mining a block, why would all bitcoin miners not just mine their own blocks instead of verifying transactions ? because mining your own block gets you (some fraction of) 25 BTC, but verifying a transaction only gets you whatever the transaction cost might be. Commented Jul 31, 2014 at 12:34
  • Nothing forces the miner to include transactions in the block. They can create empty blocks if they want. Whereas there is no extra cost (in mining power) to include transactions in the block.
    – Jan Moritz
    Commented Jul 31, 2014 at 12:44
  • 1
    @SureshVenkat: It's not either/or, it's both. The miner does work which both verifies transactions and mines new coins. Commented Jul 31, 2014 at 14:48
1

The miner (the person who does the proof of work) doesn't have to choose between verifying transactions or mining new coins. He does work to find blocks, and with each block he simultaneously verifies transactions and mints new coins. The added cost of including transactions in the block is negligible.

1
  • ah. I think that's where my confusion was. Thanks ! Commented Jul 31, 2014 at 14:50
0

From https://en.bitcoin.it/wiki/Proof_of_work: "A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements."

Mining bitcoins involves grouping a bunch of pending transactions together, appending a random number, and computing the hash value until you get one with a lot of zeros at the beginning. Since hashes are essentially random, creating one with a lot of zeros means that you probably tried a lot of random numbers before you got one that resulted in the hash with a lot of zeros. Showing the transaction list, the random number, and the hash with a lot of zeros is "proof" that you did a lot of "work."

Validating transactions is very easy, since you just have to recompute the hash with the one number that "works" and check that it has a lot of zeros.

Mining gets harder and harder (requires more zeros) as more people mine, but if you are successful you get 25 BTC. Verifying transactions stays easy no matter how hard it is to mine, but no Bitcoins are awarded for this.

One point of confusion is that you typically validate as part of mining (as Meni Rosenfeld commented), but you can also validate without mining, which is what most Bitcoin wallets do to be sure they display the correct amount in your wallet.

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.