Taking the simple case of Bitcoin here:

If all nodes can validate published transactions by checking the signature (created using the private key of the sender) of the transaction against the public key of the sender, why isn't that sufficient to validate a block?

I understand that we also solve the puzzle of finding a nonce that when combined with a block's contents, gives us a hash that has N number of leading zeroes. Why do we need this at all? Isn't it enough to check the validity of each transaction in the block?

As for double spending, if a miner decides erroneously to include both transactions, nodes can see there isn't enough balance and reject such blocks. As for which transaction of the two to take, the code could have a way to order transactions and if an attacker decides to do the opposite intentionally and decides to spam the network (since there's no proof of work cost) but how does the attacker benefit from that?

  • $\begingroup$ You focus too much on double spending as only goal of an attacker. Without some mechanism to fix past transactions, the entire blockchain would be meaningless, and anyone could change every transaction from everyone. The only guarantee it has: As long as no one controls half of the participating computing powers, no one can change past transactions. That does not work without proof of work. $\endgroup$ – tylo Apr 3 at 11:15

Since Blockchain is a decentralized system, it has to stop malicious behaviour [which may just be disruptive if not benefiting the attacker directly] and collusion.

Proof of work achieves that by introducing a very large computational cost.

It also removes the burden on the nodes of checking transaction ordering. Also the code is running in parallel in multiple nodes so how is theany transaction ordering going to be universal without local copies being different?

  • $\begingroup$ I think I understand the problem. We need a mechanism to create "milestones" or "savepoints" for our shared database/ledger, this is to agree on e.g. order of transactions to prevent double-spending. If there was no cost for publishing a milestone (a block), attackers could spam the network and create two many split chains. Also, with no cost, you can have DDoS. A puzzle is cheap to check so it can't be used to DDoS nodes. $\endgroup$ – SpaceMonkey Apr 2 at 22:34
  • $\begingroup$ about your last point, we can agree on an order based on which tx is received first. If nodes receive txes in a different order then we'll have a split chain and we can decide which chain to keep based on length (just like how it's done in Bitcoin). However, an attacker can spam the network with many split chains if there's no cost to publish a block. Does that make sense? $\endgroup$ – SpaceMonkey Apr 2 at 22:36
  • $\begingroup$ yes your second comment sounds reasonable $\endgroup$ – kodlu Apr 2 at 22:44

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.