<p>Steven's answer is correct. A complementary way of looking at it is optimization.</p>

<p><strong>Background</strong></p>

<p>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:</p>

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

<p>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.</p>

<p>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.</p>

<p><strong>So what does this have to do with optimization?</strong></p>

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

<p>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.</p>

<p>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."</p>

<p><strong>Conclusion</strong></p>

<p>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 ;-)</p>

CC BY-SA 3.0
2016-11-22T21:03:51.010Z
2016-11-22T21:03:51.010Z
earksiinni
<p>I think the introduction of block has much more a security-related origin:</p>

<p>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.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2013-04-09T03:52:11.387Z
Thank you for the response, now it makes much more sense to me. But here's [my follow up question](http://bitcoin.stackexchange.com/questions/9374/relationship-between-bitcoin-miner-and-verification-of-transactions)
Sida Zhou
CC BY-SA 3.0
2013-04-08T00:00:05.987Z
2014-02-23T02:40:27.280Z
2014-02-23T02:40:27.280Z
Steven Roose
<p>I'm trying really hard to understand how bitcoin works.</p>

<p>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..</p>

<p>So, <strong>my questions</strong> is, why cant we do a similar decentralized network, without proof of work/blockchain? In this network, we just keep a <code>list of all transactions</code> (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 <code>list of all transactions</code>, 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)</p>

<p>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.</p>

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

CC BY-SA 3.0
2013-04-07T15:51:47.650Z
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.
CodesInChaos
CC BY-SA 3.0
2013-04-08T00:56:00.387Z
Ripple does something like this. https://ripple.com/wiki/Consensus answers @CodesInChaos's questions wrt Ripple.
dchapes
<blockchain>
Why is blockchain necessary?
Sida Zhou
# Why is blockchain necessary?

(Asked by: username_0 on 2013-04-07)

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.

**Tags:** blockchain

> **Comments:**
> **username_1**: 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.  
> **username_2**: Ripple does something like this. https://ripple.com/wiki/Consensus answers @username_1's questions wrt Ripple.  

---

## 2 answers

### Answer by username_4 on 2013-04-08. Score: 5 | Accepted answer

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.

> **Comments:**
> **username_0**: Thank you for the response, now it makes much more sense to me. But here's [my follow up question](http://bitcoin.stackexchange.com/questions/9374/relationship-between-bitcoin-miner-and-verification-of-transactions)  

---

### Answer by username_3 on 2016-11-22. Score: 3

username_4'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 ;-)


---

