0

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

  • 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 Feb 20 at 14:41
  • 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 Feb 20 at 14:43
  • Is your question largely about the subject covered in medium.com/@chrshmmmr/… – RedGrittyBrick Feb 20 at 14:48
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:

  • 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 Feb 20 at 14:30
  • @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 Feb 20 at 14:35

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.