Posts

NAKAMOTO CONSENSUS

avatar of @cryptosimplify
25
@cryptosimplify
·
·
0 views
·
8 min read

This week we are going to talk about the conceptual umbrella that made possible the disruptive existence of Bitcoin and forever changed the history of the monetary system: the Nakamoto Consensus.

Eliminating the need for parallel communication between validators, as problematically occurred in classic protocols such as B-money, the Nakamoto Consensus proposal allowed permissionless and open source protocols to incorporate new nodes (nodes) at any time in the network and contributed to the probabilistic security in blockchain networks, minimizing the double spend problem.

How does this consensus model work, what does it address, and how has it decreed Bitcoin's success?

WHICH IS

The Nakamoto Consensus consists of a set of operationalization parameters and strategies for improving electronic money system attempts prior to Bitcoin.

Essentially, the concept of the Nakamoto Consensus is that it works as a general consensus algorithm, which uses the Proof of work (PoW) - consensus model of validation and interaction between users - in line with a specific set of rules for govern network mechanics.

Considered an essential component, the Nakamoto Consensus model addresses the basis on which users can interact with each other on the Bitcoin network without the need for proof of trust. What does this mean in practice?

HOW DID IT ARISE?

Since 1992, the “Cypherpunks” group - formed by Eric Hughes, Tim May and John Gilmore, among others - has discussed encryption and software development issues in face-to-face meetings and through mailing lists with dozens of people from different backgrounds. places.

With PGP (Pretty Good Privacy) cryptographic technology, the private character and freedom of information exchange perceived in these mailing lists was crucial to develop cryptography and software ideas and solutions, in order to create technological tools in favor of freedom and privacy.

The Cypherpunks saw the potential that cryptography and the internet had as instruments for creating digital economies, resilient to political censorship and alternatives to the centralization of traditional financial systems.

As a result, between 1990 and 2008, several innovations in this direction were outlined and projects came out of paper, but none of them managed to find “the magic formula” for a sustainable operation, at least until 2008.

The Nakamoto Consensus was first introduced to the community with the operationalization of Bitcoin in 2008.

The proposition of a new consensus operating model was necessary to seek the advancement of cryptographic projects in blockchain, since the existing ones presented sensitive gaps in terms of transparency and, above all, security, that is, security regarding the validity and maintenance of value generated by interactions. in the long-term networks, with the existence of double-spending problems, for example. This is the case with DigiCash, B-Money and Bit Gold.

PROOF OF WORK AND THE NAKAMOTO CONSENSUS

One of the most unique features of Bitcoin and what makes it so disruptive is, without a doubt, its consensus algorithm.

PoW (Proof-of-Work) is a consensus mechanism that relies on participants to solve cryptographic puzzles, then validate new sets of information and add them to the network.

Through PoW, Bitcoin makes validations and processing chronologically satisfactory, so as to enter new datasets into the blockchain not through synchronous and personal proofs of trust, but rather general and personal proofs of trust. pragmatic, built from network parameters.

While PoW is a significant part of the overall consensus model of the Bitcoin network, it does not correspond to the entirety of how the protocol works or how new blocks are added to the blockchain chain.

BYZANTINE FAULT TOLERANCE (BLOCKCHAIN)

The Nakamoto Consensus differentiates Bitcoin from the various attempts at digital currency protocols that preceded it, mainly due to the success achieved in circumventing the so-called “Byzantine Generals Problem”, making the protocol Byzantine Fault Tolerant (BFT).

Byzantine Fault Tolerance (BFT) is the algorithmic feature of a distributed network (blockchain) to reach a consensus among the members of the network even when some of the nodes do not respond or respond with incorrect information, making it impossible to close an operational cycle. .

The objective of a BFT algorithmic mechanism is to protect the network against eventual failures of consensus in the system and, for that, a collective decision-making is used that aims to reduce the influence of the nodes providing “defective” or incomplete information.

BFT is a direct solution implemented to solve the “Byzantine Generals Problem” and is addressed differently, with its peculiarities, in each protocol, with no standardization in these algorithms.

Demonstrating success, Bitcoin has set a precedent for subsequent cryptocurrency protocols to adopt variations of the Nakamoto Consensus, spreading the efficiency of BFT algorithmic models.

UNDERSTANDING THE BYZANTINE GENERALS PROBLEM

The problem of the Byzantine generals is one of coordination and synchronous communication.

Imagine that several divisions of an army are encamped outside any enemy city. Each division is under the command of its own general and the generals can only communicate with each other by messengers, as they are separated by the mountainous terrain of the territory.

After observing the enemy, the generals must decide on a common plan of action (attack or desist), articulating all divisions perfectly.

However, some of the generals may be traitors, trying to prevent generals loyal to the rules of war from reaching an agreement with each other, or some generals may simply not want to fight at all and limit the group's options. Fact is, there can be conflicting interests, in addition to the risk of messenger messages being lost or corrupted.

The generals must decide when to attack the city, but they need all divisions of their army to attack at the same time in order to defeat the enemy. That is, there is a need to reach a consensus about the day and time to attack.

Thus, the role of a BFT algorithm is to guarantee the conditions for the protocol-loyal nodes/generals to decide on the same course of action regardless of what the traitors/intricate information providers do.

As a whole, it must ensure a way to ensure that all generals who are loyal decide on the same course of action. In addition, there still needs to be the consideration that a small number of traitors may not want to fight, so it is important to establish a mechanism that prevents them from getting loyal generals to adopt a bad plan.

All loyal generals will do what the consensus says they must do, but traitors can do whatever they want.

THE PROBLEM OF BYZANTINE GENERALS AND BLOCKCHAIN TECHNOLOGY

In blockchain, the problem of Byzantine generals refers to the pitfalls and challenges of the process of trying to coordinate communication actions within the network whose nodes/peers are not fully trusted with each other.

What happens here is the so-called Byzantine fault, arising from the impossibility of verifying with 100% certainty that everyone is aware of the attack plan and will act in a perfectly coordinated way.

How to troubleshoot?

The metaphor of the Byzantine generals or the two generals shows us that if a single general commanded the entire army, the problem would not even exist, as it would suffice to issue the attack order and all forces would be concentrated in a single point.

However, in a decentralized peer-to-peer distributed network, as is the case with bitcoin, this is not possible, as the trust problem demands decentralization in multipoints to have value in a digital money project.

THE PROBLEM OF BYZANTINE GENERALS AND THE NAKAMOTO CONSENSUS

For a long time the trade-off of the Byzantine generals' dilemma was considered insoluble, until Satoshi Nakamoto presented his consensus model.

In the blockchain, each transaction becomes part of a block after being validated by the parameters of the network. After this process, the block is submitted to the cryptographic function that generates a hash identifier - which considers not only the transactions of the block in question that is being transacted, but also the information of the previous block which, in turn, also includes that of the block. above, and so on.

That is, the factor that generates trust in transactions on the Bitcoin network is the chaining with previously validated transactions, since the beginning of the network. There is also the fact that all these operations can be consulted through a public ledger to which any individual has access, making fraudulent attempts difficult.

For example, suppose address T has 5 bitcoins and receives 6 bitcoins from address A. Later, address T tries to transfer 22 bitcoins to address X (double the amount it actually owns).

This transaction will not be validated, as the signature algorithms, Block stacking and hash identifier validation combined raise information on how many bitcoins wallet T actually holds and prevent fraudulent transaction by verifying blockchain records.

But beyond the transactional difficulty, is there any other disincentive to fraud? Yes, the Nakamoto Consensus not only made it difficult, but built in disincentive mechanisms for fraudulent action on blockchain networks.

A BFT system/algorithm can work under different conditions, for example, the condition that the maximum number of malicious nodes is less than one third of all nodes in the system. As the number of nodes increases, the system becomes more and more secure.

Example of BFT consensus that breaks down into four phases:

  • The client sends a request to the main (leader) node;
  • This node then broadcasts the request to all child nodes (nodes from backup);
  • This set of nodes performs the requested service and then sends back a customer response;
  • The request is successfully fulfilled when the customer receives responses from different nodes in the network with the same result.

A VERY WELL STRUCTURED SET OF METRICS

An interesting aspect of the consensus model proposed by Nakamoto is the damage caused to the fraudster, which also serves as another vector of disincentive to fraud.

The operational consensus model established to feed transactional interactions on the Bitcoin (Proof-of-Work) network plays a large role in this.

Implicating high computational and energy expenditure and cost to solve the mathematical equations, the participating nodes try to receive the right to participate in the validation process and the consequent receipt of rewards through the amount of computational power available to the network.

Anyone can participate in the mining process, as the system is decentralized and the process encourages nodes to act honestly because of the rewards associated with transmitting the correct block, it is financially uninteresting to act fraudulently.

Incentives add an extra layer of security to the network, ensuring that validators compete for incentives, in the form of fees and block rewards, to secure the network. As a basic rule of chain validation and construction, an honest node should only accept blocks that have a compatible hash, valid transactions and a correct block size. Thus, the security of the network is ensured, ensuring that even a long chain is an honest chain.

In the case of BTC, for a malicious node to succeed, it needs to hold more than 51% of the network's computational power to validate the malicious blocks. Considering the current size of the network and its difficulty/computing power rate at record levels, the economic cost of achieving this feat makes it almost unlikely and strengthens Bitcoin's decentralized security thesis.

Thus, the set of network operational parameters (including the signature and cryptographic identification algorithms) coupled with the economic incentives for network validators to behave well, made Bitcoin so secure.

Its security only tends to increase as the network grows in number of nodes (miners and validators) and more transactions are validated and more blocks added to the blockchain.

Finally, the PoW components, cryptographic signatures, validation rules and incentive mechanisms make up the Nakamoto Consensus, one of the most efficient and successful consensus mechanisms among decentralized networks.

Posted Using LeoFinance Beta