<p>That's not how consensus works in Bitcoin, as that would be highly vulnerable to a sybil attack.</p>

<p>First a full node validates all aspects of all blocks (incl. transactions) it receives. Anything invalid is discarded and not further considered.</p>

<p>Second the node picks the chain with the most total Proof of Work in it*.  Usually there's only one, but sometimes two miners find a block at roughly the same time, so the blockchain temporarily forks until the next block increases the total PoW for one of the chains and all nodes will converge on that chain.</p>

<p>TL;DR The <em>valid</em> chain with the <em>most total Proof of Work</em></p>

<p>*) Often referred to as the "longest chain" or better "longest valid chain", although strictly it's not about the length, but about the aggregate difficulty.</p>

CC BY-SA 3.0
2016-09-12T09:42:21.857Z
Could you explain how this (not) relates to a `51% percent attack`? Is there any `51%` coded anywhere? Or is this just a rule of hand?
BlockChange
CC BY-SA 3.0
2016-09-12T10:40:19.090Z
51% stems from the fact that if you have enough hashing power, you can essentially outrun everybody else. So you might decide to ignore someone else's block and instead create your own competing block, knowing that (eventually, it might take a while) you will be able to create the most-work chain that everyone else will accept. So 51% (technically anything above 50%) is just a fact of nature, not a setting.
Jannes
CC BY-SA 3.0
2016-09-12T09:15:24.020Z
2016-09-12T09:15:24.020Z
Jannes
<p>Is the minimal amount/percentage of <code>nodes that need to agree</code> configurable in a blockchain genesis file? </p>

<p>As far as I can find there is no setting for this, and I assume this is set somewhere in the sourcecode?</p>

CC BY-SA 3.0
2016-09-12T11:25:46.887Z
Are you asking about Bitcoin or some other blockchain?
David Schwartz
<consensus><genesis-block>
Setting minimal amount of nodes to reach consensus
BlockChange
# Setting minimal amount of nodes to reach consensus

(Asked by: username_0 on 2016-09-12)

Is the minimal amount/percentage of `nodes that need to agree` configurable in a blockchain genesis file?

As far as I can find there is no setting for this, and I assume this is set somewhere in the sourcecode?

**Tags:** consensus, genesis-block

> **Comments:**
> **username_1**: Are you asking about Bitcoin or some other blockchain?  

---

## 1 answers

### Answer by username_2 on 2016-09-12. Score: 1 | Accepted answer

That's not how consensus works in Bitcoin, as that would be highly vulnerable to a sybil attack.

First a full node validates all aspects of all blocks (incl. transactions) it receives. Anything invalid is discarded and not further considered.

Second the node picks the chain with the most total Proof of Work in it\*. Usually there's only one, but sometimes two miners find a block at roughly the same time, so the blockchain temporarily forks until the next block increases the total PoW for one of the chains and all nodes will converge on that chain.

TL;DR The *valid* chain with the *most total Proof of Work*

\*) Often referred to as the "longest chain" or better "longest valid chain", although strictly it's not about the length, but about the aggregate difficulty.

> **Comments:**
> **username_0**: Could you explain how this (not) relates to a `51% percent attack`? Is there any `51%` coded anywhere? Or is this just a rule of hand?  
> **username_2**: 51% stems from the fact that if you have enough hashing power, you can essentially outrun everybody else. So you might decide to ignore someone else's block and instead create your own competing block, knowing that (eventually, it might take a while) you will be able to create the most-work chain that everyone else will accept. So 51% (technically anything above 50%) is just a fact of nature, not a setting.  

---

