2

I'm super fascinated by the entire concept of proof of work and how it allows for a trustless, decentralized system. Despite knowing that proof of work (or proof of stake) can be an inevitable necessity to having a cryptocurrency like Bitcoin, I'd like to fully understand where other methods fail.

The first problem Bitcoin addresses from my understanding is signatures with each transaction. To me, this completely makes sense, as it is completely necessary to be able to verify that the sender indeed was the creator of the transaction. But then the next problem is transaction order and validity to prevent double spending. I don't understand completely why a timestamp can't just be included for every broadcasted transaction, and the transaction could have the correct, universally agreed upon time, and each ledger gets sorted chronologically. Is this because it requires a centralized system to prevent people from forging timestamps? Or what am I missing? To me, it seems like if the transactions were broadcast publicly to the entire network, there wouldn't be conflicts in ledgers / double spending.

And how exactly does the main blockchain stay decentralized? Let's say I go offline and miss transaction broadcasts, and now I want an updated version of the main blockchain. I would have to rely/trust others for this main blockchain, which seemingly is centralized now in the way that all new users are pulling from this same copy of the blockchain. I don't quite see how that's different from the analogy with a community ledger with everyone just keeping their copy updated with that, or a main branch on a git repo which everyone continually pulls from. There is no single point of failure, but it seems to still be a community ledger in a sense.

I am completely well aware that the "solutions" I presented above have faults somewhere that I'm missing / scenarios in which these will fail which I haven't considered, and I'd like to understand exactly why a proof of work system is necessary in these scenarios. And, how it can stay decentralized and trustless despite having characteristics described in the above paragraph. This, I believe, will help me understand the true beauty of it.

7

But then the next problem is transaction order and validity to prevent double spending. I don't understand completely why a timestamp can't just be included for every broadcasted transaction, and the transaction could have the correct, universally agreed upon time, and each ledger gets sorted chronologically. Is this because it requires a centralized system to prevent people from forging timestamps? Or what am I missing? To me, it seems like if the transactions were broadcast publicly to the entire network, there wouldn't be conflicts in ledgers / double spending.

You need to remember that communication networks aren't perfect. There are latencies, and there are nodes connecting and disconnecting. The system needs to be robust to these dynamics.

You also need to remember that the problem Bitcoin set out to solve is how can a merchant know that a payment to him is final and will not be reverted.

Suppose a double spender pays a merchant, with a tx timestamped at 13:05. The merchant see the tx and provides the goods. The attacker then broadcasts a conflicting transaction timestamped at 13:04.

A node receiving this new transaction has no way of knowing whether the timestamp on this tx was forged, or if it was indeed broadcast at the specified time, and he has simply missed it so far. Since the rules say earlier txs take precedence, the payment to the merchant will be reverted.

And that's when the node was actually connected to the network at the time these transactions were broadcast. What if it's a new node, or it had downtime at that point? How could he possibly ever know which of these transactions actually appeared earlier on the network?

That's exactly what proof of work and the blockchain are solving - they are a permanent record that everyone can agree on, which is hard to forge because it includes proofs that actual computational work went into verifying it.

And how exactly does the main blockchain stay decentralized? Let's say I go offline and miss transaction broadcasts, and now I want an updated version of the main blockchain. I would have to rely/trust others for this main blockchain, which seemingly is centralized now in the way that all new users are pulling from this same copy of the blockchain. I don't quite see how that's different from the analogy with a community ledger with everyone just keeping their copy updated with that, or a main branch on a git repo which everyone continually pulls from. There is no single point of failure, but it seems to still be a community ledger in a sense.

The blockchain actually contains proofs. I don't need to trust any node - if I get conflicting blockchains from different nodes, I know which one is the correct one because it has proof of more computational work. This allows all nodes, everywhere, no matter when they connected, to agree on the same shared ledger.

And that's all that matters - agreement. As long as everyone agrees on which order of transaction is correct - in particular, the person who gave goods in exchange for bitcoins and the people he will later want to send these bitcoins to - the payment network works.

  • Perhaps interesting to point out that the only we way we know of to actually give strictly sequential timestamps to each transaction is using a central timestamping service, which indeed solves the same problem as PoW... but is not decentralized and effectively creates a trusted party with censorship rights. – Pieter Wuille Jul 18 '17 at 12:54
5

But then the next problem is transaction order and validity to prevent double spending. I don't understand completely why a timestamp can't just be included for every broadcasted transaction, and the transaction could have the correct, universally agreed upon time, and each ledger gets sorted chronologically. Is this because it requires a centralized system to prevent people from forging timestamps? Or what am I missing?

Because timestamps can be forged and not everyone is using the same time. Due to latency, clock inaccuracies, etc. not everyone is on exactly the same time. In order for everyone to have uniform timestamps, there would need to be some centralized system. Also, timestamps can be easily forged.

To me, it seems like if the transactions were broadcast publicly to the entire network, there wouldn't be conflicts in ledgers / double spending.

But you can broadcast multiple transactions spending the same coins. Which one is correct? If they are all broadcast simultaneously and they have the same timestamp, which one is the "real" one? Due to network latency, some nodes on the network may receive one transaction first, but other nodes may receive the other one first. There is no way to determine which one is the "real" one. That is part of what the blockchain solves, being the authority which says which transaction is "real".

And how exactly does the main blockchain stay decentralized? Let's say I go offline and miss transaction broadcasts, and now I want an updated version of the main blockchain. I would have to rely/trust others for this main blockchain, which seemingly is centralized now in the way that all new users are pulling from this same copy of the blockchain. I don't quite see how that's different from the analogy with a community ledger with everyone just keeping their copy updated with that, or a main branch on a git repo which everyone continually pulls from. There is no single point of failure, but it seems to still be a community ledger in a sense.

It isn't centralized. The blockchain is not being downloaded from some central source. It is being downloaded from multiple peers, and if they differ, then the valid chain with the most work will be the chain that your node uses. Your node is not just blindly accepting the chain that its peers give to it; it is also validating the chain according to its consensus rules.

The blockchain certainly is a community ledger. But it is one where you can't forge transactions and can't change the transaction history without performing a lot of work.

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.