LeoGlossary: Consensus

How to get a Hive Account

Consensus is defined as a general agreement. It is derived through a process where differing opinions and ideas come together where one is chosen. This is meant to reflect the general outlook of the group as a whole.

It serves a vital function in computer science which also translates to tremendous impact upon the overall economy and business therein.

Computer Science

In distributed computing and multi-agent systems there is a problem getting reliability in the presence of faulty processes. With separate variables, this requires coordinating processes to achieve a data value that is used for computation.

Some processes might fail (or be faulty). The reliability they put forth, at a given moment, could aversely affect other processes. For this reason, an agreement must be reached by all agents as to what is the true value that will be accepted. To arrive at this conclusion, processes must be designed in the form of a consensus mechanism which all adhere to.

One approach for multi-agent system is to have a majority for consensus. To arrive at a majority value, one more than half the agents much vote for the value.

With this approach, one or more faulty processes could skew the entire approach, hindering arriving at consensus.

Protocols that solve consensus problems are designed to deal with limited numbers of faulty processes. These protocols must satisfy a number of requirements to be useful.

Examples Requiring Consensus

There are a number of real world applications which requires consensus.

  • cloud computing
  • clock synchronization
  • PageRank
  • opinion formation
  • smart power grids
  • state estimation
  • control of multiple robots
  • load balancing
  • blockchain

Different agents have to arrive at a consensus for overall reliability.

Consensus In Finance

The world of finance depends upon consensus mechanism.

People have accounts with financial institutions. These entities provide a multitude of financial services. All of these depend upon consensus for trust.

For example, when someone enters his or her checking account, the balance has to be agreed upon. The bank process all transactions that go through it, updating the balances. Since transactions occur between different institutions, each has to keep updating the ledger.

The banks are the entities that are responsible for keeping the ledger. They have to agree between themselves, often with the assistance of the central bank. All movement of money is logged, ensuring agreement across the system.

It is a process that applies to all assets. Brokerage firms are also responsible for their ledgers. This will keep track of the stocks, bonds, and even commodities that an account buys or sells. These institutions interact with exchanges which interact with a number of other firms.

Agreement on all transactions is required. This is arrived at when the transactions are fully settled, meaning each party received either the cash or the security.

The entire monetary system depends upon consensus of the ledgers. This is something that governments has long sought ensure through regulation, increasing trust among the public. This became more important as we moved away from banknotes to ledger based money.

Blockchain and Cryptocurrency

Blockchain was designed to alter the way consensus was achieved.

Bitcoin was the first network to emerge which solved the double-spend problem without a centralized entity. One of the keys for a monetary system is to insure that the same money is not spent multiple times.

This is the onus of the banks, which are centralized.

Satoshi Nakamoto, the anonymous creator of Bitcoin, wanted to develop a system that did not contain the counterparty risk that exists with banks. By removing financial intermediaries from the process, the risk was reduced.

Since the banks are removed, another method of consensus was required.

Nakamoto created the consensus process known called Proof-of-Work (PoW). This entails computers solving complex mathematical equations for the right to be a block producer.

Those that assigned this role process all transactions in that block, updating the balances in each wallet.

Every node checks:

  • The data structure
  • The block header hash
  • The block timestamp
  • The block size
  • The first transaction

Blockchain uses distributed ledger technology (DLT). Regardless of the consensus mechanism, the idea is to have the ledger running on unrelated servers. Trust is generated by the fact any changes that do not agree with the consensus is rejected.

Other consensus mechanisms:

Cryptocurrency operates on top of blockchain and replaces the need for intermediaries for consensus. The moving of all coins or tokens are recorded on-chain, with wallet balances adjusted by the network.

3 columns
2 columns
1 column
Join the conversation now