Knowledge / Computer Science and Engineering / Enterprise blockchains: Hyperledger Fabric and Corda

Enterprise blockchains: Hyperledger Fabric and Corda

Computer Science and Engineering (B.E./B.Tech) · Blockchain · free study notes for exams, placements and interviews

In short

Enterprise (permissioned) blockchains are distributed ledgers in which every participant is a known, identified legal entity admitted by a membership authority, so consensus can rely on identity and legal contracts instead of mining or staking. Hyperledger Fabric (Linux Foundation, now under LF Decentralized Trust) and R3 Corda are the two dominant designs: Fabric is a general modular ledger with channels and chaincode, while Corda is purpose-built for financial agreements and shares data only with the parties to a transaction. Neither has a native cryptocurrency, both give deterministic finality, and both are examined in university DLT/blockchain electives and in GATE-style objective questions on permissioned ledgers, consensus and CAP trade-offs. In India they underpin the Indian Banks' Blockchain Infrastructure Company (IBBIC) letter-of-credit network on Corda, SEBI-mandated DLT monitoring of debt securities at the depositories, NPCI's Vajra, and MeitY's Vishvasya blockchain-as-a-service stack. Employers who ask about them include Infosys, TCS, Wipro, Tech Mahindra, Accenture, IBM, HCLTech, R3 partners and bank technology teams.

Explained

Where enterprise blockchains sit in the classification

Hyperledger Fabric: architecture

Fabric: the execute-order-validate transaction flow

  1. Propose: client (signed with its MSP identity) sends a transaction proposal to the endorsing peers named by the endorsement policy.
  2. Execute (simulate): each endorser runs the chaincode against its own world state and produces a read-write set (RWSet) - keys read with their versions, keys written with new values - and signs it. No state is changed yet.
  3. Collect: client gathers endorsements and checks they match; mismatched RWSets reveal non-determinism.
  4. Order: client submits the endorsed transaction to the ordering service, which batches it into a block (cut on MaxMessageCount, PreferredMaxBytes or BatchTimeout, whichever hits first) and delivers the block to all channel peers.
  5. Validate: every peer checks (a) endorsement policy satisfaction via the VSCC, and (b) MVCC - that the version of every key in the read set is still current.
  6. Commit: valid transactions update the world state; invalid ones are still written to the block, flagged MVCC_READ_CONFLICT or ENDORSEMENT_POLICY_FAILURE, and emit events to listeners.
  7. Why execute-before-order matters: parallel execution scales, and only nodes in the endorsement policy ever see the contract logic; the cost is MVCC conflicts on hot keys.
  8. Chaincode lifecycle (v2.x): package → install on peers → each org *approves* a definition → *commit* to the channel once the lifecycle policy (usually majority of orgs) is met. Decentralised, unlike v1.x where one admin instantiated it.
  9. Endorsement policies: principal expressions such as AND('OrgA.peer','OrgB.peer'), OR(...), OutOf(2,'A.peer','B.peer','C.peer'); also state-based endorsement (a policy attached to a single key) and private data collection policies.
  10. Private data collections: the actual values are gossiped only to authorised orgs and stored in their transient/private state database; only a hash of the private data goes into the block, so non-members can still verify but not read. Supports purge after N blocks.

R3 Corda: architecture and model

Comparing the two (and the Ethereum-derived option)

Indian practice, law and standards

Key points

Formulas and examples

Byzantine fault tolerance: n ≥ 3f + 1, i.e. f = ⌊(n − 1)/3⌋ - n = total consensus nodes, f = maximum malicious nodes tolerated
Crash fault tolerance (Raft): n ≥ 2f + 1, quorum q = ⌊n/2⌋ + 1, f = ⌊(n − 1)/2⌋
Endorsement sets satisfying "k of n": C(n, k) = n! / (k!(n − k)!)
Block cut time t = min(BatchTimeout, MaxMessageCount/λ, PreferredMaxBytes/(λ·s)) - λ = arrival rate (tx/s), s = mean transaction size (bytes)
End-to-end latency L = T_endorse + T_order + T_validate + T_commit (seconds); T_order ≈ block cut time + one ordering round trip
Ledger growth per peer = λ_day × s × 365 (bytes/year) - λ_day = transactions per day
Data copies per transaction: public/broadcast = N nodes; Corda = p parties + 1 notary
Message complexity per consensus round: Raft O(n); classical PBFT O(n²)

Example 1 - sizing an ordering service. A consortium of five banks each runs one Raft orderer (n = 5).

Example 2 - endorsement policy combinations. A channel has 10 member organisations and the policy is OutOf(2, ...) over all ten.

Example 3 - block cutting and latency. BatchTimeout = 2 s, MaxMessageCount = 100, PreferredMaxBytes = 512 KiB, mean transaction size s = 3 KiB, arrival rate λ = 500 tx/s.

Example 4 - ledger storage planning. A letter-of-credit network commits 1,000 transactions per day of 4 KiB each, with four peers per organisation across three organisations (12 peers), each holding the full channel ledger.

Example 5 - privacy by construction. A 50-member network processes a bilateral invoice-financing deal.

FeatureHyperledger FabricR3 CordaPublic Ethereum
AccessPermissioned, MSP/X.509Permissioned, doorman-issued certsPermissionless
Data modelKey-value world stateUTXO states in a vaultAccount/state trie
Smart contractChaincode (Go/Node/Java)Contract + flow (Kotlin/Java)Solidity on EVM
ConsensusOrdering (Raft/BFT) + endorsement + MVCCNotary uniqueness + contract validityPoS, global
Data sharingAll peers on a channelNeed-to-know, point-to-pointGlobal broadcast
Native tokenNoneNoneETH, gas
FinalityImmediate, deterministicImmediate on notarisationProbabilistic until finalised
Typical throughputThousands of tx/s per channelHundreds to thousands (notary-bound)Tens of tx/s
Notary typeSeesRiskUse when
Non-validatingInput state refs, tx id, time-windowA party could try to consume a state it does not own (detectable, needs recovery)Privacy is paramount, parties are legally bound
ValidatingFull transaction and backchainNotary learns the business dataCorrectness and dispute-proofing matter more

Where it is used

Interview questions

Common mistakes

Related topics

Smart contracts and Solidity · Blockchain security and smart-contract audits · Blockchain in finance and supply chain · Distributed systems: consensus, CAP and replication · Public key infrastructure and digital signatures · Containers and Kubernetes for deployment

Open in the Knowledge reader →Find jobs →