0

I have read

"Hashcash is a proof-of-work algorithm that requires a selectable amount of work to compute, but the proof can be verified efficiently. For email uses, a textual encoding of a hashcash stamp is added to the header of an email to prove the sender has expended a modest amount of CPU time calculating the stamp prior to sending the email. In other words, as the sender has taken a certain amount of time to generate the stamp and send the email, it is unlikely that they are a spammer. " (https://en.wikipedia.org/wiki/Hashcash)

Then, in bitcoin, it seems natural that the senders engage in the proof of work instead of miners. Why it is not so?

2 Answers 2

0

There are cryptocurrencies that operate like this, for example, I believe Nano requires the proof of work in the transaction itself, see Nano Whitepaper.

Transaction Spam Reduction

Bitcoin, however, instead of using proof of work to reduce transaction spamming, this is prevented with a miner fee. Because miners can select transactions to put in the block they mine, they are incentivized to select transactions with higher fees. Without a decent fee, your transaction may never get mined if the average fees are much higher, so it won't enter a block (thus spamming is reduced).

Proof of Work in Bitcoin

Proof of work is used to achieve consensus. Instead of preventing transaction spamming, you could consider it as a block submission spam prevention. Because a majority of nodes have to validate the blocks and all the transactions in them, you could see how without proof of work, this could be easily spammed and transaction validity could become difficult to prove. See Proof of Work.

Another effect for proof of work in the block is to control the work required to mine a new block, thus regulating the release of Bitcoins. The reasoning behind this in the Bitcoin Whitepaper was:

"To compensate for increasing hardware speed and varying interest in running nodes over time."

2
  • Is there any argument that bitcoin proof of work by miners is better than email type proof of work by sellers?
    – 171124
    Commented Jun 5, 2018 at 21:53
  • I think your answer is good overall, but it dances around the important point that POW provides transaction ordering, which is the more relevant issue being solved in the bitcoin system. In email, the issue being solved is spam messages.
    – chytrik
    Commented Jun 5, 2018 at 22:13
1

Proof of work helps to solve the issue of transaction ordering: miners must create blocks that contain an order of transactions, and each block builds upon the last. Thus all bitcoin transactions are ordered, and this is required in order to resolve any potential transaction conflicts.

As an example: in the case of a double spend, which transaction is actually valid, and which should be discarded? A simple way to resolve this question is to say "the first transaction is valid, the second is not", but this solution requires the network to be in consensus regarding the ordering of all transactions.

In the case of email, ordering of messages is not critically important, so the inclusion of a POW has a slightly different primary function: to increase the cost of sending an email, in order to discourage spam messages.

Then, in bitcoin, it seems natural that the senders engage in the proof of work instead of miners. Why it is not so?

Transaction ordering is important, but keep in mind that it is not trivial to reliably keep a decentralized network in consensus. Each transaction could include a proof-of-work, but this alone is not enough to give the transactions a well-defined order. Proof-of-work establishes a way to ensure resources were spent, but on it's own is not sufficient to establish an ordering of data.

Bitcoin solves this by grouping transactions into blocks, and each block references the one before it. You can imagine this as a sort of 'decentralized clock', where the smallest increment of time is one block. For transactions to function similarly, each transaction would have to reference the one before it, thus establishing an order. This would lead to a whole host of latency issues, higher rates of 'orphan transactions', potential for spam and DOS attacks, etc.

7
  • Great point! That last sentence seems out of place
    – JBaczuk
    Commented Jun 5, 2018 at 22:58
  • True. But theoretically one can think of discouraging senders to engage in double spending by taxing senders for sending multiple spending messages?
    – 171124
    Commented Jun 5, 2018 at 23:00
  • @JBaczuk I see what you mean, but I think its simple enough to understand how 'every transaction being ordered' would lead to issues, and I'm not really interested in parsing out the exact details of such a theoretical system. So I settled for a vague description of risks, if someone wants to edit to add more info please feel free to. OPs question was "why can't we use POW in the same way email anti-spam uses it?", not "what would be the effect of ordering each individual transaction, instead of grouping them in ordered blocks".
    – chytrik
    Commented Jun 6, 2018 at 0:32
  • @171124 double spending is only one issue, another example is that latency issues would be very critical. What if txA is the most recent, and two nodes that are not immediately connected try to publish their own txs at the same time (txB and txC)? The longest chain becomes valid, so in situations like this, only one of txB or txC will be accepted, and the other will be orphaned, which means the node that published it originally will need to re-try with a new POW attached (that references the now longest chain tip).
    – chytrik
    Commented Jun 6, 2018 at 0:45
  • To understand, why would it be that "two nodes that are not immediately connected try to publish their own txs at the same time (txB and txC)"?
    – 171124
    Commented Jun 6, 2018 at 0:50

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.