Comparison of Hyperledger Fabric & Corda

Note: As of the writing of this post, the current version of Corda is v3.2 and Hyperledger Fabric v1.20

TODO

  • Expanded Overview

Brief Overview

Corda and Hyperledger Fabric are DLTs that have overlapping usage in various industries and at the same time have similarities in their architecture implementation.

This is a highly simplified comparison of the DLTs, do your own research if you’re planning on understanding how it works.

Corda Hyperledger Fabric
Communication Protocol AMQP Gossip
Process of Network creation <ol><li>Creation of Network Map Service</li><li>Formation of Nodes and Notaries</li><li>Implementation of Flows</li></ol> <ol><li>Creation of Orderer, Certification Authority (For Organisation)</li><li>Creation of Channel (By Orderer)</li><li>Creation of Peer</li><li>Implementing Chaincode</li></ol>
Process of Contract <ol><li>Party A sends to Party B transaction proposal</li><li>Party B replies to Party A accepting transaction</li><li>Notaries verifies that transaction is valid</li><li>Party A and B registers it into ledger</li></ol> <ol><li>Party A sends to Party B transaction proposal</li><li>Party B replies to Party A accepting transaction</li><li>Party A forwards Transaction to Orderer</li><li>Orderer distributes a copy of Transaction from Party A to all Organisations</li></ol>
Process of Private Data Having Oracle in the Loop
<ol><li>Party A sends to Party B transaction proposal</li><li>Party B sends a Copy of transaction with sensitive data redacted.</li><li>Oracle confirms parameters is valid</li><li>Party B replies to Party A accepting transaction</li><li>Notaries verifies that transaction is valid</li><li>Party A and B registers it into ledger</li></ol>
<ol><li>Party A sends to Party B transaction proposal</li><li>Party B replies to Party A accepting transaction</li><li>Party A forwards Transaction to Orderer with Sensitive data redacted. (Transaction hash remains to allow verifiability)</li><li>Orderer distributes a copy of Transaction from Party A to all Organisations</li></ol>
Consensus Pluggable, default of BFT Pluggable, default of RAFT or BFT
Final Blockchain Each peer will have likely a different ledger Similar ledger, depending on usage of private data.

Expanded Overview (WIP)

Picking up the DLTs Framework

Getting started with Corda

Start by reading Key Concepts (https://docs.corda.net/key-concepts.html) then implementing classes for the test cases on bootcamp-cordapp.

https://github.com/corda/bootcamp-cordap, solutions available here - https://github.com/corda/bootcamp-solutions

bootcamp-cordap test cases - bootcamp-cordapp/src/test/java/java_bootcamp/

bootcamp-cordap reference implementation - bootcamp-cordapp/src/main/java/java_examples/

bootcamp-cordap implementation - bootcamp-cordapp/src/main/java/java_bootcamp/

Here is a list of common Issues encountered during the bootcamp, and how to fix them.

• Java.io.NotSerializableException: net.corda.core.contracts.TransactionState -> data(net.corda.core.contracts.ContractState) -> Constructor parameter – “arg0” - doesn’t refer to a property of ‘class java_bootcamp.TokenState -> class java_bootcamp.TokenState’

Cause: The Corda serialisation framework requires the Java compiler to preserve the argument ran when generating bytecode so that objects can be correctly recreated later

Fix: Copy the ‘compiler.xml’ file in the ‘bootcamp_cordapp/lib’ folder to the ‘bootcamp_cordapp/.idea’ folder (replacing the existing ‘complier.xml’ file if it exists). Then completely rebuild the project (‘Build’ -> ‘Rebuild Project’)

• ‘java.lang.IllegalStateException; Missing the ‘-javaagent’. JVM argument. When running flow tests

Cause: the Quasar library must be used to instrument the flows so that the flows can be checkpointed correctly

Fix: Open the run configuration used to run the test and add the “-javaagent:lib/quasar.jar” flag to ‘VM options:’ see here

Getting started with Hyperledger Fabric

Read Key Concepts - https://hyperledger-fabric.readthedocs.io/en/release-1.2/key_concepts.html

Do tutorials - https://hyperledger-fabric.readthedocs.io/en/release-1.2/tutorials.html

Chaincode for Developers - https://hyperledger-fabric.readthedocs.io/en/release-1.2/chaincode4ade.html

Goh Puay Hiang

Hi, I own this website

gphofficial gphofficial


Published