Comparison of blockchain distributed ledger among fabric, corda and Ethereum

Jiedao jdon 2021-04-01 07:14:47 阅读数:251

本文一共[544]字,预计阅读时长:1分钟~
comparison blockchain distributed ledger fabric
This paper briefly analyzes the distributed ledger technology (DLT)Hyperledger Fabric,R3 Corda and Ethereum The most significant difference between ethereums . The aim is to provide decision makers with new DLT To guide the , To understand Hyperledger Fabric,Corda and Ethereum The most appropriate use case .

Three different frameworks

from Hyperledger Fabric,R3 Corda( The following are only referred to as Fabric and Corda) And Ethereum's white paper , These frameworks have very different visions in possible application areas .Fabric and Corda The development of is driven by specific use cases , and Corda The use case for the financial services industry . therefore , This is it. Corda See where its main applications are . by comparison ,Fabric Plan to provide a modular and scalable architecture , It can be used in various industries , From banking and healthcare to the supply chain . Ethereum is also completely independent of any specific application field . However , And Fabric comparison , It's not modular , It's a common platform for all kinds of transactions and Applications .

peer End participants

For the traditional central database system, such as oracle or nosql, Only a single entity ( owner ) Keep a copy of the underlying database , For example, the ledger . therefore , This entity controls which data is contributed and which other entities are allowed to contribute . With DLT Appearance , This fundamental change will benefit distributed data storage , Multiple of these entities hold copies of the underlying database and naturally allow contributions .

All entities participating in distributed data storage form so-called nodes or peers peer Network of . Because of distributed data storage , It is difficult to ensure that all nodes agree on common facts , For example, the correctness of the ledger , Because changes made by one node have to propagate to all other peers in the network . The result of reaching a common fact is called consistency between nodes , It will be described below .

About the consensus on participation , There are two modes of operation : No permission or permission . If participation is not authorized , Anyone is allowed to participate in the network . This model applies to Ethereum as a public blockchain . On the other hand , If allowed to participate , Choose participants in advance , And it is limited to these participants' access to the network .Fabric and Corda So it is with . Participation model , No permission or permission , It has a profound impact on reaching a consensus .

Consensus

1. All participants in Ethereum must be responsible for all transactions that have occurred (banq notes : A transaction is a business , All in English transaction) To reach a consensus on the order of , Whether or not the participants are involved in a particular transaction . The order of transactions is crucial to the consistent status of the ledger .

If you can't establish a clear transaction order , It could double the cost , That is, two parallel transactions transfer the same coin to different recipients , To make money out of nothing .

Because the network may involve mutual distrust and anonymous parties , Therefore, a consensus mechanism must be adopted to protect the ledger , Prevent fraudulent or unfavourable participants from attempting double spending .

In the current implementation of Ethereum , The mechanism is based on workload proof (PoW) The mining of solutions . All participants must agree on a common ledger , And all participants have access to all recorded entries . The consequence is PoW It affects the performance of transaction processing .

About the data stored in the ledger , Even if the record is anonymous , But all participants have access to them , This is a problem for applications that need a higher degree of privacy .

Compared with Ethereum ,Fabric and Corda The interpretation of the consensus is more elaborate , It doesn't just come down to being based on PoW Or its derivatives . Because running in permission mode ,Fabric and Corda Provides finer grained access control for records , This enhances privacy . Besides , Because the parties involved in the transaction have to reach a consensus , So you can get performance growth .

2.Fabric The understanding of consensus is broad , Including the whole transaction process , From proposal to network , And then to submit it to the ledger . Besides , Nodes take on different roles and tasks in the process of reaching consensus . This contrasts with Ethereum , The roles and tasks of the nodes involved in reaching consensus are the same .

stay Fabric in , They are based on client nodes , Peer or sorter . What the client does on behalf of the end user , Create and call transactions . They and peer The end communicates with the sequencer .

Counterpart peer Maintain the ledger and receive orderly update messages from the sorting party , To submit new transactions to the ledger .

Spokesperson ranking is a special type of peer End , Their task is to check whether the transaction meets the necessary and sufficient conditions ( For example, provide the required signature ) To support the deal .

The sequencer provides communication channels to customers and peers , Messages containing transactions can be broadcast through this channel . Especially in terms of consensus , Channels ensure that all connected peers deliver identical messages in exactly the same logical order .( Keeping order is the main responsibility of the sequencer )

here , The problem is , When using a lot of distrustful sequencers , An error may occur while delivering a message . therefore , Consensus must be reached on how to use the algorithm in case of failure , Or, for example, the message appears in an inconsistent order , This ensures that distributed ledger replication is fault tolerant .

Use Fabric, The algorithm used is “ pluggable ”, This means depending on the specific requirements of the application , Various algorithms can be used . for example , To handle the random or malicious replication errors described above , You can use Byzantine fault tolerance (BFT) Variants of the algorithm .

Besides , Channel partition message flow , This means that clients can only see the messages and related transactions of the channel they are connected to , And don't know the transaction of other channels .

The roles of the above nodes are described in the context of transaction flow : The client sends a transaction to the connected spokesperson to start the ledger update . All spokesmen have to agree on the proposed deal , So there must be some consensus on the proposed ledger update . Customers will collect all endorsements' approval one after another .

Approved transactions are sent to connected sequencers , And reach a consensus again . And then , The transaction is forwarded to peer For further transactions .

Without further elaboration , Obviously Fabric Allow fine-grained control of consensus and restrict access to transactional transactions , So as to improve performance scalability and privacy .

3. And Fabric similar ,Corda The consensus is also reached at the transaction level involving only the parties . Reaching a consensus is the validity and uniqueness of the transaction .

By checking all required signatures and ensuring that any transactions referenced are also valid , By running the smart contract code associated with the transaction ( The smart contract described in detail below ) To ensure effectiveness .

Uniqueness involves the input state of a transaction . To be specific , It must be ensured that the transaction in question is the only consumer of all its input states . let me put it another way , There are no other transactions consuming any of the same state . The reason for this is to avoid double spending . Participants are called notary nodes , There is a consensus on its uniqueness , And the algorithm used is similar to Fabric equally “ Pluggable ”. therefore , It can be used again BFT Algorithm .

Intelligent contract

“ Intelligent contract ” The first time you meet the word, it can cause quite a misunderstanding , Because it evokes the idea of a contract that acts on behalf of intelligence . However , The nature of the contract remains ambiguous , But intuitively it seems to have something to do with legal issues . in other words , Contracts are neither intelligent , It's not AI driven either , At least not yet , They don't usually encode legally binding obligations and rights .

Clark And colleagues provide a useful term , Highlighted “ Intelligent contract ” There are two different ways of using the word . The first is the smart contract code , The second is smart legal code , Two differences , It turns out to be beneficial in the context of this comparison .

Smart contract code only represents software written in a programming language . It acts as a software agent or representative of the party that uses it , Its purpose is to fulfil certain obligations , Exercise rights and control assets in the distributed ledger automatically . therefore , It takes on tasks and responsibilities in the distributed ledger world by executing code that models or simulates contract logic in the real world , Although the legal reasons may not be clear .

all DLT They all have smart contracts in the sense of smart contract code , It can be used Go or Java for Fabric To write ,Solidity In Ethereum ,Java or Kotlin be used for Corda .

stay Fabric in , The term “chaincode” Used as a synonym for smart contracts . As an illustrative example , Remind the reader of Corda Smart contract code is used in the consensus mechanism to ensure the effectiveness of the transaction . However , One side Fabric And Ethereum , and Corda On the other hand, with the use of “ Intelligent contract ” The second way the term is related .

stay Corda, Smart contracts don't just include code , Legal texts are also allowed . therefore , The above intelligent legal contract is a legal document , Its formulation can be expressed and implemented by smart contract code . The basic principle behind this is to give code legitimacy , This legitimacy comes from the relevant legal documents . This structure is called Ricardian Contract . here ,Corda Specifically designed to deal with a highly regulated environment in the financial services industry .Fabric and Ethereum They all lack this function .

Built in currency

Another notable difference is , Ethereum has built-in cryptocurrency (Ether). It is used to pay rewards to nodes that help reach consensus through mining blocks and pay transaction costs . therefore , You can build distributed applications for Ethereum (DApps), Allow currency transactions . Besides , You can create digital tokens for custom use cases by deploying smart contracts that meet predefined standards . such , You can define your own currency or assets .

Fabric and Corda No need for built-in cryptocurrency , Because we can't reach a consensus through mining . however , Use Fabric, You can use chain codes to develop native currency or digital tokens . Use Corda, No intention to create digital currency or token .

summary : Customization and common platform

To make a long story short , These three DLT Across a continuum . On the one hand is Fabric And etheric fang , They're all very flexible , But in different ways .

Ethereum's powerful smart contract engine makes it a common platform for any type of application . However , Ethereum's unauthorized operation mode and its complete transparency are at the expense of performance, scalability and privacy .

Fabric Through the allowed mode of operation , Especially by using BFT Algorithms and fine-grained access control to solve performance scalability and privacy issues . Besides , Modular architecture allows Fabric Customized for a variety of applications . You can draw an analogy of a multi-functional toolbox .

Corda On the other end . It's consciously designed to be DLT. The most remarkable thing is , It considers a highly regulated environment by adding smart contracts with legal documents .

obviously , And Fabric comparison ,Corda Focusing on financial services transactions simplifies its architecture design . therefore , It may provide a more out of the box experience . However , Because of its modularity ,Fabric It could be customized to something like Corda The function of the set . Seek will Corda Integrated into the Hyperledger The effort in the project already exists .Corda So it can't be regarded as Fabric competitors , It's more of a supplement .

original text

[ The quilt banq On 2018-10-07 16:55 A modified ]

                   

版权声明:本文为[Jiedao jdon]所创,转载请带上原文链接,感谢。 https://netfreeman.com/2021/03/20210329141150198i.html