Ken Huang:Why it is impossible to solve Blockchain trilemma?
original article link:https://www.topmarketgroup.com/news/-why-it-is-impossible-to-solve-blockchain-trilemma-
Abstract
In 1985, FLP Theory Was Proposed In A Paper Written By Fischer, Lynch And Patterson. FLP Theory Proves That In A Completely Asynchronous Distributed System, No Completely Asynchronous Consensus Protocol Can Tolerate Even A Single Unannounced Process Death.
In 2002, Lynch And Gilbert Put Forward CAP Theory In Their Paper. CAP Theory Proves That In A Distributed System, It Is Impossible To Achieve All Three Properties: Consistency, Availability, And Partition Tolerance, At The Same Time, While Any Two Of These Three Properties Can Be Achieved.
As A Typical Distributed System, FLP And CAP Are Also Applicable To The Blockchain. Based On FLP Theory And CAP Theory, This Paper Will Analyze The Logical Relationship Between Consistency, Availability, Partition-Tolerance And The Impossible Triangle Of The Blockchain, So As To Explain Why The Impossible Triangle Of The Blockchain Can’t Be Broken Through.
1. Summary Of FLP Theory
In April 1985, FLP Theory, Demonstrated By Fischer, Lynch And Patterson, Is One Of The Most Important Distributed System Theories. They Also Won The DijkstraPaper Award, The Most Influential Award In The Field Of Distributed Computing, For Their Paper On FLP Theory.
FLP Theory Proves That In Asynchronous Communication System, No Consensus Protocol Can Completely Solve The Consensusissue In Spite Of One Faulty Process.
In A Synchronous System, Consensus Can Be Achieved. Because In A Synchronous System, When A Process Fails Or A Response Times Out, We Can Assume That It Has Crashed.
While In An Asynchronous System, It Is Impossible To For One Process To Tell Whether Another Has Died Or Is Just Running Very Slowly. In This Case, If There Is A Problem With Any Of The Processes, There Is No Distributed Algorithm That Can Make All Non-Faulty Processes Reach A Consensus.
Due To The Limitations Of FLP Impossibility, The Consensus Algorithm Of Most Blockchain Projects Presupposes That Most Nodes Are Honest And Meet Certain Synchronization. POW Assumes That 51% Of The Nodes Are Honest And Have Some Degree Of Synchronization. POS And PBFT Also Believe That Most Nodes (66%) Are Honest.
2. Summary Of CAP Theory
At The Symposium On Principles Of Distributed Computing (PODC) In 2000, Computer Scientist Eric Brewer Proposed His Conjecture About The Consistency, Availability, And Partition-Tolerance Of Distributed Computing Systems. In 2002, His Conjecture Was Proved By Nancy Lynch And Seth Gilbert, Two Professors At The Massachusetts Institute Of Technology, And Was Called The CAP Theory.
CAP Theory Proves That It Is Impossible To Provide Reliable Atomic Consistency Data When The Network Is Partitioned, Whileit Is Feasible To Achieve Any Two Of The Three Properties: Consistency, Availability, And Partition-Tolerance. In An Asynchronous Communication System, When No Lock Is Used, There Is No Way To Provide Consistent Data Even If Stale Data Is Allowed To Be Returnedwhen Messagesare Lost. In A Synchronous Communication System, There Is A Tradeoff Between Consistency And Availability.
2.1. Consistency
In CAP Theory, Consistency Is Limited To Atomic Dataobjects, Which Is The Same As Most Other Methods That Formally Define Consistency Services. A System That Satisfies The Consistency Has A Total Order On All Operations Such That Each Operation Looks As If It Were Completed At A Single Instant. This Requires That All Requests From The Distributed System Must Be Synchronized Before Operations Can Be Performed. This Is Equivalent To Requiring Requests Of The Distributed Share Memory To Act As If They Were Executing On A Single Node, Responding To Operations One At A Time.This Is The Easiest Consistency Assurance Model For Users To Understand, And Is Most Convenient For Those Attempting To Design A Client Application That Uses Distributed Service.
2.2 Availability
For A Distributed System To Be Continuously Available, Every Request Received By A Non-Failing Node In The System Must Result In A Response. That Is, Any Algorithm Used By The Service Must Eventually Terminate.
In The Argument Of CAP Theory, Availability Is Defined As Two Types:
1. Weak Availability: It Puts No Bound On How Long The Algorithm May Run Before Terminating, And Therefore Allows Unbounded Computation.
\2. Strong Availability: Even When Severe Network Failures Occur, Every Request Must Terminate.
Under Weak Availability Conditions, The System Is Allowed Not To Guarantee Response Time, But The Response Is A Must. When The System Has An Error, It Does Not Guarantee The Termination Of The Request. In The Case Of Strong Availability, The Request Must Terminate Even If A System Error Occurs.
2.3. Partition Tolerance
In CAP Theory, Partition Refers To The Possibility Of Losing Arbitrarily Many Messages Sent From One Node To Anotherin A Network. When A Network Is Partitioned, All Messages Sent From Nodes In One Component Of The Partition To Nodes In Another Component Are Lost.
Partition Tolerance Refers To The Fact That The System Stillmeets The Consistency And Availability As Defined Above When A Partition Occurs. The Atomicity Requirement Therefore Implies That Every Response Will Be Atomic, Although Arbitrary Messages Sentas Part Of The Algorithm Might Not Be Delivered. The Availability Requirement Implies That Every Node Receiving A Request From A Client Must Respond, Although Arbitrary Messages That Are Sent May Be Lost.
\3. Using CAP Theory To Explain Why The Impossible Triangle Of The Blockchain Can’t Be Broken Through
In The Field Of Blockchain, Security, Scalability And Decentralization Are Known As The "Impossible Triangle" Of The Blockchain, Which Means That In The Same Blockchain System It Is Impossible To Achieve All Three Properties And Meetthe High Requirements At The Same Time.
Our Basic Argument Is That CAP Theory Is True In A Distributed System, And The Blockchain Belongs To A Distributed System, So Blockchain Must Abide By The CAP Theory.As Long As We Can Prove The Logical Relationship Between Consistency, Availability, Partition Tolerance In CAP Theory And The Impossible Triangle Of The Blockchain, Then We Can Prove That The Impossible Triangle Of Blockchain Cannot Be Broken Through.
3.1. Consistency And Security
In The Proof Process Of CAP Theory, It Is Proved That It Is Impossible In The Asynchronous Network Model To Implement A Read/Write Data Object That Guarantees Both Availability And Consistency. We Apply This Conclusion And Proof Process To The Blockchain System.
In The Network Environment Definedby CAP Theory, We Assume That There Are Two Nodes A And B In A Blockchain System, And Both A And B Record The Cryptocurrency Balance Of One Address H As X1, Now A And B Are Partitioned.
When The User Initiates A Transaction In The Partition Where Node A Is Located, The Balance In Address H Will Change To X2. When The User Queries The Balance In The Partition Where Node B Is Located, The Balance In Address H Is Still X1. Thus We Reckon That In This Blockchain System, The Inconsistency Occurs In The Ledge.
When Inconsistency Occurs In A Blockchain System, We Conclude That Such A Blockchain System Is Not Secure. Under This Definition, Consistency Is The Basic Premise Of Blockchain System Security. In Other Words, The Security Of Blockchain Systems Is A More Stringent Requirement Than The Consistency Of Distributed Systems. Security >Consistency.
3.2. Availability And Scalability
The Availability In CAP Theory Is Divided Into Weak Availability And Strong Availability, But Both Require That The System Must Respond To All Normal Requests. From A Technical Point Of View, Thatmeans To Implement Normal Readand Write.
In A Blockchain System, Scalability Refers To The Number Of Transactions That Can Be Processed Per Second. Technically, High Scalability Is To Achieve High-Frequency Read And Write Operationsper Second.
Logically, We Can See That Availability Is A More Fundamental Network Requirement Than Scalability. A Blockchain System That Cannot Achieve Availability Is Unable To Achieve Scalability, That Is, Availability Is The Premise Of Scalability. In Other Words, The Scalability Of Blockchain Systems Is A More Stringent Requirement Than The Availability Of Distributed Systems. Scalability > Availability.
3.3. Partition-Tolerant And Decentralization
In CAP Theory, Partition Is Considered To Be A Must Exist For Distributed Systems. Indeed, In A Real Distributed Environment, It Is Impossible To Guarantee That Every Node In The System Will Not Fail.
As A Basic Feature Of The Blockchain, Decentralization Means That The Blockchain System Must Be Distributed, That Is To Say, Decentralization Will Inevitably Lead To The Partition, Which Also Means That The Partition Tolerance Is The Premise For The Realization Of Decentralization.
3.4. Balance Of Existing Consensus Algorithms On CAP
In CAP Theory, Partitionis Considered To Be An Inevitable Presence Of Distributed Systems, So It Makes No Sense To Discuss A Distributed System Without Partition. As A Typical Distributed System, The Different Consensus Algorithms Of Blockchain Have Balanced The Consistency And Availability Of The System Under The Premise Of The Partition.
Tendermint: Tendermint Is A POS-Type Consensus Algorithm, Which Mainly Includes Five Stages: NewHeight -> Propose ->Prevote ->Precommit ->Commit. Propose ->Prevote ->Precommit Belongs To The Consensus Phase And Is The Core Of The Algorithm, Which Is Called A Round. Multiple Rounds May Be Required On A Single Block For Block Commit Confirmation. In Multiple Rounds, The Height Of The Block Will Not Increase, Only Empty Blocks Are Submitted To The System, And Once A Block Is Confirmed, It Cannot Be Modified. So Tendermint Could Theoretically Get Stuck, Which Results In The Block Height Never Increasing. This Means That Tendermint Is More Focused On Consistency When There Are Partitions.
Casper FFG: Casper FFG Is A POS-Type Consensus Algorithm. In The Design Of Casper FFG, Consistency Is A Priority Because It Doesn't Allow Checkpoints To Be Completed Without The Approval Of The Vast Majority Of Verifiers, So That The Block Will Not Turn Into The Final Confirmation State.
Algorand: Algorand Is A POS-Type Consensus Algorithm. Algorand Is Similar To Tendermint In The Design. When There Is A Conflict Between Consistency And Availability, The System Tends To Produce Empty Blocks Rather Thanblocks Of Real Significance. So Algorand Gives Priority To Consistency.
Dfinity: Dfinity Is A POS-Type Consensus Algorithm. When The Network Is Partitioned, It Automatically Suspends The Random Beacon And Does Not Allow Any Partitions In The Network To Continue. So Dfinity Prioritizes The Consistency.
POW: When The Network Using POW Is Partitioned, All Partitions Can Produce Blocks Normally. When The Network Is Restored And The Partition Ends, According To The Longest Chain Principle, Chains Of Different Partitions Will Be Merged And Eventually Become One Chain. So POW Prioritizes The Availability.
POC: The Full Name Of POC Is Proof Of Credit, Which Is Innovatively Used In NULS, A Global Open-Source And Community-Driven Project. When The Network Using POC Is Partitioned, All Partitions Can Produce Blocks Normally. When The Network Is Restored, Similar To The POW, The Blockchain Will Be Merged Following The Longest Chain Principle. Therefore, The Priority Of POC Innovatively Used By NULS Is Availability.
ConsensusAlgorithm | Comparison Between A(Availability) And C(Consistency) | RelevantProjects |
---|---|---|
Tendermint | A | Cosmos |
Casper FFG | A | ETH |
Algorand | A | Algorand |
Dfinity | A | Dfinity |
POW | C | BTC |
POC | C | NULS |
Note: A < C Represents That The Consensus Algorithm Gives Priority To Consistency;
C < A Means That The Consensus Algorithm Gives Priority ToAvailability;
4. Conclusion
By Deducing The Above Logical Relationships Between Consistency And Security, Availability And Scalability, Partition-Tolerant And Decentralization, We Can Draw The Following Conclusion:
- Consistency is necessary for Security
- Availability is necessary for Scalability
- Partition-tolerant is necessary for Decentralization
According To The Theorem In CAP Theory That It’s Impossible To Achieve All Three Properties: Consistency, Availability And Partition Tolerance, We Can Draw The Following Conclusion: Under The Conditions Of CAP Theory, Security, Scalability And Decentralization Cannot Be Achieved At The Same Time, That Is, The Impossible Triangle Of Blockchain Cannot Be Broken Through.
About The Author:
Ken Huang
A Well-Known Blockchain Expert, Chief Scientist Of NUChain, American DistributedApps CEO, Member Of Blockchain Experts Committee Of Chinese Institute Of Electronics And NULS Technical Advisor.
Xiang Wenbo
Java Software Engineer, Cryptotech-Writer And NULS Core Team Member. He Focuses On Blockchain Technology Research And Blockchain Solutions.
References:
Brewer's Conjecture And The Feasibility Of Consistent, Available, Partition-Tolerant Web Services Seth Gilbert, Nancy Lynch
Impossibility Of Distributed Consensus With One Faulty Process MICHAEL J. FISCHER, NANCY A. LYNCH, MICHAEL S. PATERSON
CAP Theory For Distributed Systems: Https://Www.Hollischuang.Com/Archives/666
Compare The Finality And Liveness Of Various Consensus Algorithms:
Https://Www.Odaily.Com/Post/5134107
Finality In Blockchain Consensus:
Https://Medium.Com/Mechanism-Labs/Finality-In-Blockchain-Consensus-D1f83c120a9a
Join our social media and explore NULS!
LinkedIn 👉 Follow now
Twitter 👉 Follow now
Reddit 👉 Subscribe now
Telegram 👉 Join now
YouTube 👉 Subscribe now
Medium 👉 Join now
Instagram 👉 Follow now
Discord 👉 Follow now