5

I'm trying really hard to understand how bitcoin works.

I understand that bitcoin miners does proof of work, and creates blocks, and then transactions are sealed inside this block to become "confirmed". And this has something to do with double spending.. somehow..

So, my questions is, why cant we do a similar decentralized network, without proof of work/blockchain? In this network, we just keep a list of all transactions (akin to blockchain) (a copy for each node), and then use majority rule. Ie, if there is a dispute in the new transaction, we just go to every node, check their list of all transactions, and if the new transaction contradicts majority of list of all transactions, then the new transaction will be rejected etc. And nobody need to solve any hard math problems (ie proof of work)

And for new transactions, our protocol can be following: If nobody disputes the transaction over the next 60minutes, then we set confirmed flag of this transaction to be 1, and thus this transaction is now confirmed etc.

In other words, im struggling to understand the value of proof-of-work process in bitcoin.

2
  • 3
    How do you define majority of nodes? How do you stop an attacker from creating a billion new nodes? And what happens if an attacker sends two contradictory transactions to nodes? Everybody need to agree on a single authoritative order. Apr 7, 2013 at 15:51
  • 3
    Ripple does something like this. ripple.com/wiki/Consensus answers @CodesInChaos's questions wrt Ripple.
    – dchapes
    Apr 8, 2013 at 0:56

2 Answers 2

5

I think the introduction of block has much more a security-related origin:

Currently, getting transactions confirmed costs a certain amount of work for which computer have to run a long time and cost some time, effort and money. Because of this, it is hard to manipulate the chain of transactions. It is hard to find a correct block with a certain set of transactions and cheating will result in your block being refused by the network.

However, when clients just keep lots of transactions, it would be much easier to f.e. set up thousands of false nodes that manipulate the network. A node that only requires memory is much cheaper than one that requires hashpower. With some resources it's easy to add thousands to hundreds of thousands of clients (these don't have to be separate machines but can be virtual ones) participating and entering bogus transactions or leaving some out.

The fact that creating the blocks is "difficult" add a lot of security to the network, making it extremely hard to falsely manipulate the transaction history.

1
3

Steven's answer is correct. A complementary way of looking at it is optimization.

Background

Let's start by assuming that one understands why consensus by majority doesn't work (too easy for an attacker to create bad nodes and take over). Bitcoin's proposed solution is to use a log that keeps track of all transactions and to maintain consensus by log length, not node count. For this to work, Bitcoin proposes a few conditions:

  1. We assume that anyone can create a log (i.e., we don't trust anyone to maintain a "known good log").
  2. The log with the most entries is always considered authoritative.
  3. Each entry has some kind of intrinsic link to the entry that comes before it and the one that comes after it.
  4. It's really difficult (i.e., it takes a lot of time) to add a log entry.

The last condition is really important. If it's easy to add log entries--for example, if the log is just a text file sitting on your desktop--then any attacker can create really long, fake but authoritative transaction logs with whatever sort of transactions that the attacker wants.

If it takes a lot of time to add each entry, however, then an attacker will need to spend all the time that has already been spent on creating the main log just to catch up and create a fake log that is as long. By the time they catch up, the main log will have already moved on and gotten even longer. It becomes increasingly unlikely that an attacker will ever be able to catch up by creating a fake log that is longer than the main log as the main log gets longer and more popular. That diminishing probability is what makes Bitcoin secure.

So what does this have to do with optimization?

Now, the question is, what exactly goes into the transaction log? This is where optimization comes in.

If each log entry were literally a record of a single transaction and if each log entry took, say, 10 minutes to create, it would take forever to make transactions. So instead, Bitcoin proposes that the log tracks mini-logs of transactions. Each transaction is trivial to create and easy to verify, but each mini-log is difficult to create and tracks all the transactions that occurred during a period of time. The idea is that with each new mini-log, faking transactions continues to become increasingly difficult, but at the same time transactions can occur instantly.

How does this work? When you conduct a new transaction, that transaction is broadcast to all nodes who keep track of it in local copies of the current mini-log. Each node is also working on a difficult calculation (hashing) that takes a relatively long time (for Bitcoin's network as of writing, about 10 minutes on average). All it takes is for one node in the network successfully complete the problem, and then that node's local mini-log copy is considered complete and is sent to every other node. Once every node accepts the winning mini-log copy, that copy is considered the authoritative mini-log for all the transactions that had previously been considered conditional. All the transactions that occurred instantly are now said to have one "confirmation."

Conclusion

Now...replace the word "log" with "chain" and "mini-log" with "block" and now you understand why blockchains are necessary not just from a security standpoint but from an optimization standpoint, as well ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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