<h2>Consensus</h2>

<p>My understanding of this word, in the context of cryptocurrencies, is as follows:</p>

<p>In a finite network of nodes with independent data-storage, consensus exists if all, or at least a majority of, nodes hold a set of data that is identical to, or at least not inconsistent with, the data sets held by other nodes.</p>

<p>That is, consensus is a state, independent of the rules or mechanisms used to achieve it.</p>

<blockquote>
  <p><strong>How do nodes know what data is correct from consensus?</strong></p>
</blockquote>

<p>They don't necessarily. Consensus is sometimes really an emergent behavior, albeit a planned one. In some systems, nodes don't <em>explicitly</em> seek consensus - that is they don't confer about consensus as a subject - only about what blocks other nodes know of and have already validated.</p>

<p>In these types of system consensus emerges simply because nodes follow the same rules, for example that the chain with the most proof-of-work (or equivalent) is accepted and any alternatives are discarded.</p>

<blockquote>
  <p><strong>What about if two nodes execute two different consensus with 2 different Valid blocks with the same height at the same time, can that happen?</strong></p>
</blockquote>

<p>That can and does happen for a short while in at least some systems. For example, eventually one of those blocks will have more blocks built on top of it than the other. This block will be then accepted in place of the other by the node(s) that had previously accepted the other. The other block and all blocks built on it will then be discarded. Or there may be other ways in which rules resolve the Byzantine Generals problem.</p>

<p>In this specific example system, transactions in those discarded blocks are also then lost unless they have already been included in the rival block or in blocks built on the rival block. If not they may still exist in memory pools and be later incorporated into the blockchain. This is probably one reason why a significant number of confirmations are needed in this specific system.</p>

<hr>

<p>Other sources:</p>

<ul>
<li><a href="https://medium.com/@chrshmmmr/consensus-in-blockchain-systems-in-short-691fc7d1fefe" rel="nofollow noreferrer">Consensus in Blockchain Systems. In Short &mdash; Chris Hammerschmidt  &mdash; 2017</a></li>
</ul>

CC BY-SA 4.0
2019-02-20T14:30:28.490Z
I think there’s a misunderstanding, I’m talking about Blockchain in general, not bitcoin, I’m talking about a system that doesn’t have proof of work. A system which doesn’t have mining involved. I’m talking about the blockchain technology itself and its problems with Byzantine fault, and how a blockchain software that processes about 10,000 blocks per minute can validate them if many of them have the same height. I did not mention that. since I didn’t want to get too technical, Just blockchain and consensus in general.
Juan
CC BY-SA 4.0
2019-02-20T14:35:27.447Z
@Juan, OK but I don't understand the distinction you are making. I was trying to answer in general based on what I believe are fundamental characteristics of blockchain that ought to be general to any implementation- but my knowledge is exclusively from Bitcoin. To avoid other people making the same mistake you might want to review your question and work out if there is a rewording that might make misunderstandings less likely.
RedGrittyBrick
CC BY-SA 4.0
2019-02-20T14:25:28.637Z
2019-02-20T15:14:00.717Z
2019-02-20T15:14:00.717Z
RedGrittyBrick
<p>How do nodes know what data is correct from consensus?</p>

<p>What about if two nodes execute two different consensus with 2 different <strong>Valid</strong> blocks with the same height at the same time, can that happen? </p>

<p>I’m talking about Blockchain in general, not bitcoin, not mining.</p>

<p><strong>Not bitcoin related, Not mining related</strong></p>

CC BY-SA 4.0
2019-02-20T14:41:06.943Z
What do you mean by "execute two different consensus"? In my understanding, "consensus" means "agreement between a majority of nodes concerning data-state" it isn't something that is executed.
RedGrittyBrick
CC BY-SA 4.0
2019-02-20T14:43:56.273Z
That is right. Although, at a code level, it’s an algorithm, a function, it needs to be executed, meaning, two nodes can call the function at the same time, thus proposing a consensus process.
Juan
CC BY-SA 4.0
2019-02-20T14:48:52.507Z
Is your question largely about the subject covered in https://medium.com/@chrshmmmr/consensus-in-blockchain-systems-in-short-691fc7d1fefe
RedGrittyBrick
<blockchain><consensus>
Blockchain: How do nodes know what Data is correct from Consensus process?
Juan
# Blockchain: How do nodes know what Data is correct from Consensus process?

(Asked by: username_0 on 2019-02-20)

How do nodes know what data is correct from consensus?

What about if two nodes execute two different consensus with 2 different **Valid** blocks with the same height at the same time, can that happen?

I’m talking about Blockchain in general, not bitcoin, not mining.

**Not bitcoin related, Not mining related**

**Tags:** blockchain, consensus

> **Comments:**
> **username_1**: What do you mean by "execute two different consensus"? In my understanding, "consensus" means "agreement between a majority of nodes concerning data-state" it isn't something that is executed.  
> **username_0**: That is right. Although, at a code level, it’s an algorithm, a function, it needs to be executed, meaning, two nodes can call the function at the same time, thus proposing a consensus process.  
> **username_1**: Is your question largely about the subject covered in https://medium.com/@chrshmmmr/consensus-in-blockchain-systems-in-short-691fc7d1fefe  

---

## 1 answers

### Answer by username_1 on 2019-02-20. Score: 1

## Consensus

My understanding of this word, in the context of cryptocurrencies, is as follows:

In a finite network of nodes with independent data-storage, consensus exists if all, or at least a majority of, nodes hold a set of data that is identical to, or at least not inconsistent with, the data sets held by other nodes.

That is, consensus is a state, independent of the rules or mechanisms used to achieve it.

> **How do nodes know what data is correct from consensus?**

They don't necessarily. Consensus is sometimes really an emergent behavior, albeit a planned one. In some systems, nodes don't *explicitly* seek consensus - that is they don't confer about consensus as a subject - only about what blocks other nodes know of and have already validated.

In these types of system consensus emerges simply because nodes follow the same rules, for example that the chain with the most proof-of-work (or equivalent) is accepted and any alternatives are discarded.

> **What about if two nodes execute two different consensus with 2 different Valid blocks with the same height at the same time, can that happen?**

That can and does happen for a short while in at least some systems. For example, eventually one of those blocks will have more blocks built on top of it than the other. This block will be then accepted in place of the other by the node(s) that had previously accepted the other. The other block and all blocks built on it will then be discarded. Or there may be other ways in which rules resolve the Byzantine Generals problem.

In this specific example system, transactions in those discarded blocks are also then lost unless they have already been included in the rival block or in blocks built on the rival block. If not they may still exist in memory pools and be later incorporated into the blockchain. This is probably one reason why a significant number of confirmations are needed in this specific system.

---

Other sources:

* [Consensus in Blockchain Systems. In Short — Chris Hammerschmidt — 2017](https://medium.com/@chrshmmmr/consensus-in-blockchain-systems-in-short-691fc7d1fefe)

> **Comments:**
> **username_0**: I think there’s a misunderstanding, I’m talking about Blockchain in general, not bitcoin, I’m talking about a system that doesn’t have proof of work. A system which doesn’t have mining involved. I’m talking about the blockchain technology itself and its problems with Byzantine fault, and how a blockchain software that processes about 10,000 blocks per minute can validate them if many of them have the same height. I did not mention that. since I didn’t want to get too technical, Just blockchain and consensus in general.  
> **username_1**: @username_0, OK but I don't understand the distinction you are making. I was trying to answer in general based on what I believe are fundamental characteristics of blockchain that ought to be general to any implementation- but my knowledge is exclusively from Bitcoin. To avoid other people making the same mistake you might want to review your question and work out if there is a rewording that might make misunderstandings less likely.  

---

