0

So I understand the concept behind PoW (that if someone wants to overturn the current chain, they'd have to do all that work again).

But why is it even necessary since transactions are confirmed only if they contain valid signature?

Say there is Bob and Alice and miner X and all the other miners. Bob signs a transaction showing that he sent Alice $10, and the miners seeing the signature is indeed valid and there is enough balance, deduct it from Bob and add it to Alice. Now say miner x, wants to make a fake transaction to empty Bob's wallet for himself, sure, he could make a fake transaction with a fake signature, but in that case, all the other miners reject it, and he himself can't add balance to his own wallet from the empty air, because again, all the other miners reject it (another wallet with the actual balance has to sign the transaction). Now I can see how that would make rewarding difficult, but again, you can't just reward yourself without all the other miners also agreeing (could be that the reward goes to the first miner to add it to chain and again in case of conflicting chains, miners switch to the one with the most other miners in, the one that the majority agree on, and if they are both equal, this goes on until the majority switches to either chain).

And again, if someone just went and made up their own chain, all the other miners reject it, since they are only one miner, and the majority don't agree with that chain.

Now how do you track the majority? The same way you connect to other peers in the network, you connect to different peers, and always update this info (you connect to many peers, so that if one peer lies to you, most of the others tell the truth, you keep a list of all the other miners with you and the chain they all agree with).

You might then wonder "why can't one node create many clones and make you think they are many"? Sure, if they can overcome the sheer number of other miners that is and keep up (without getting blacklisted by other peers too, keep in mind that even without PoW there is still a cost). It'd be like acquiring all the ips on internet as an example.

2
  • 1
    I'm not really sure I understand the question, but in any case it's to give an authoritative way to set the order of transactions. There can only be one "correct" order, and if you relied on merely connecting to different peers, everyone's ordering of transactions would be slightly different if not for any reason than they each find out about different transactions at different times. So instead, we use this lottery system to pick one "authoritative" ordering of transactions per block, and to make it computationally impossible for anyone to modify the historical order of transactions.
    – ieatpizza
    Jan 14 at 2:13
  • 1
    Does this answer your question? What is the problem that mining solves? Jan 14 at 11:28

2 Answers 2

6

The problem that Bitcoin solved was the double spending problem. The scenario that causes the double spending problem does not pertain to "miner x" trying to spend Bob's money—he can't obviously. The double spending problem stems from Mallory, an attacker, being able to sign two conflicting transactions in parallel, one stating that he paid Alice, another stating that he paid the same funds to Bob. How does a system without an arbiter decide which of the two takes precedence? Obviously they cannot both be valid, or the money wouldn't be scarce. We can't leave each individual participant to make their own decision, or the network would be split immediately as each transaction is seen by parts of the network first.

Satoshi Nakamoto discovered that Proof of Work could be used to create a distributed lottery, a lottery which elects a sole author for each block. By allowing a single entity to record their version of the transaction journal, the blockchain records a canonical order of the transactions. If the author saw Mallory's transaction to Alice first, that's the one that's authoritative, and the one that paid Bob is invalid. Thus, the double spending problem is solved.

4

But why is it even necessary since transactions are confirmed only if they contain valid signature?

Proof of work is not used for transaction validation. A signature prevents other people stealing bitcoin which they do not own (without the private key), and prevents a transaction from being tampered with. However, Bob could spend the same bitcoin multiple times, sign all the transactions, and they would all be valid as transactions independently. Obviously, though, they all conflict with each other and can't all be included in the blockchain - this is the double spend problem. Only one of these competing transactions can be accepted. The one that does end up in the blockchain is the valid transaction, and all the others are discarded as invalid.

For more information on proof-of-work, see some of the other questions on this site. For example, Why do we need Proof of Work in bitcoin?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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