Consensus

Consensus

Update: 2020-05-25
Share

Description

In general, consensus means agreement. In the context of blockchain, consensus is the agreement on the state of the blockchain among all the nodes in a network.
The basic characteristic of blockchains is that there’s no single point of control and failure. This means users can query and verify the data from any of the nodes in a network. For this to work, the nodes must agree on the state of the blockchain so that users get the same results when querying multiple nodes for verification of data.

Transactions are used to update state in a blockchain. For example, a transfer transaction can be used to update the balances of multiple users.
Order of TransactionsThe main area where consensus is needed is the order of transactions, within a block. If all nodes could agree on the order in which the transactions happened, then they would individually arrive at the same state after processing the respective blocks.For example, if a user has a balance of 5 tokens and they transfer 4 tokens to one user and 3 tokens to another one. In total, they tried to spend more than they had. In this case, the order of these two transactions would decide which one would be accepted and which one would be rejected by the chain. One of these would be marked as an invalid transaction. If the order of transactions is not agreed upon by all the nodes, then the state of blockchain (balances for these users) would be inconsistent across the network.
Consensus AlgorithmsTo achieve consensus in blockchains, there are several algorithms. The basic idea is: 

  • Transactions are grouped and packaged together as blocks.

  • Based on the consensus algorithm and its block production rules, one of the nodes proposes a block. This could be either using a round-robin fashion or by winning a race.

  • For each newly proposed block, the order and validity of transactions are checked against the current state of the chain.

  • When the new block is accepted by the chain, the order of transactions in this new block must be followed by all nodes, hence reaching a consensus on the state.


Music: https://www.purple-planet.com
Comments 
In Channel
Block Rewards

Block Rewards

2020-08-0304:48

Block Finality

Block Finality

2020-07-1304:59

Fork

Fork

2020-07-0604:32

Blockchain Governance

Blockchain Governance

2020-07-0204:54

Smart Contracts

Smart Contracts

2020-06-2204:45

Wallets

Wallets

2020-06-1804:47

Accounts and Keys

Accounts and Keys

2020-06-1504:43

Signing

Signing

2020-06-0805:14

Hashing

Hashing

2020-06-0404:42

Consensus

Consensus

2020-05-2505:10

Blockchain

Blockchain

2020-05-2104:54

Download from Google Play
Download from App Store
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Consensus

Consensus

Gautam Dhameja