Private blockchain platforms

Private blockchain platforms are networks for a specific group, like a business or organization. Only authorized users get access, improving privacy and security. They are permissioned: an administrator grants access first. They are customizable: businesses design the network for their case, with custom governance.

Compared to public blockchains, private blockchain platforms offer improved performance, lower transaction costs, and better scalability. They suit regulated enterprises, such as finance and healthcare.

[CIMG ID=ef5e941a-ebe4-4b04-9464-57d09e4fd300]

Overall: more control, privacy, security, cost, and compliance.

Private blockchain platforms that are well-known and widely used

  • Hyperledger Fabric: open-source enterprise platform. Private, permissioned networks customized to business needs. (https://www.hyperledger.org/use/fabric)
  • Corda: decentralized finance platform for complex transactions and direct transactions between parties. (https://www.corda.net/)
  • Quorum: permissioned Ethereum for enterprise. Private transactions, contract management, enterprise-grade features. (https://consensys.net/quorum/)
  • EOSIO: platform for high-volume enterprise applications. Fast transactions, high scalability. (https://eos.io/)
  • IBM Blockchain: private enterprise platform with tools for building and deploying blockchain applications, including smart contract and network management. (https://www.ibm.com/blockchain)
  • R3 Corda Enterprise: enhanced Corda for large enterprises. High availability, disaster recovery. (https://r3.com/)
  • MultiChain: private enterprise platform. Asset issuance and permissions management. (https://www.multichain.com/)

What is Hyperledger Fabric?

Hyperledger (or the Hyperledger Project) is an umbrella project of open source blockchains and tools. The Linux Foundation started it in December 2015. IBM, Intel and SAP Ariba contributed to blockchain-based distributed ledgers. Renamed Hyperledger Foundation in October 2021.

[CIMG ID=9daea903-af10-48e9-e4f5-2594e12f4400]

Hyperledger Fabric, a product of Hyperledger, is a widely used private platform:

  • Modular architecture allows customization for enterprise use cases.
  • Permissioned blockchain (a distributed ledger not publicly accessible; only permitted users can access it), suitable for privacy and confidentiality. 
  • Handles thousands of transactions per second. Smart contracts, or "chaincode," handle complex business logic and automation.
  • Interoperates with other blockchains and traditional enterprise systems, suitable for existing IT infrastructures.

These features suit secure, scalable, customizable applications. Read more: https://www.ibm.com/topics/hyperledger

This blog covers Fabric fundamentals: network components and transaction flow.

The use cases of Hyperledger Fabric

It suits enterprise use cases across industries.

[CIMG ID=b23aa4de-f913-4f4b-0a10-114565d6c400]

Examples:

  • Supply Chain Management: a shared ledger lets parties track goods and ensure authenticity, preventing fraud, reducing waste, and improving efficiency.
  • Healthcare: a shared ledger lets providers share patient data securely in real time, improving outcomes, reducing costs, and enhancing care quality.
  • Finance: a shared ledger lets institutions transact securely and efficiently, reducing costs, improving efficiency, and enhancing security.
  • Government: a shared ledger ensures voting integrity and prevents fraud, increasing turnout and legitimacy.
  • Insurance: a shared ledger lets all parties process claims faster, reducing costs and improving customer experience.

Components of the Hyperledger Fabric Network

Components (channels not shown for simplicity):

[CIMG ID=59d2c538-830e-428e-8b9e-2b9547b6cf00]

  • Assets: items with value, ownership, and state. Structured as key-value pairs.
  • The ledger, two elements, records an asset's status and ownership:
    • The world state: the ledger database at a point in time.
    • The blockchain: log of all transaction history.
  • Peers: nodes hosting ledgers and smart contracts. They execute chaincode (a program in Go, Node.js, or Java implementing a prescribed interface), access ledger data, endorse transactions, and interface with applications. Endorsing peers or approvers may be included. Each chaincode can define an endorsement policy with required conditions.
  • Channel: a peer group with a distinct transaction ledger, forming a logical structure.
  • Organizations: the network integrates peers from various organizations. Organizations pool resources; each peer gets an identity (digital certificate) from its organization's Membership Service Provider. Peers from distinct organizations can share a channel.
  • Membership Services Provider (MSP): a Certificate Authority authenticating member identities and roles using certificates. Unknown identities cannot transact. The MSP governs user IDs and verifies all participants. This makes Hyperledger Fabric private and permissioned (only pre-selected parties can validate transactions and perform operations).
  • Ordering service: assembles transactions into blocks and dispatches them to channel peers for reliable delivery. It interacts with peers and endorsing peers. Supported mechanisms: Solo and Kafka.

Solo is a development consensus mechanism for a basic ordering service, letting developers focus on chaincode and apps. Not for production. Fabric 1.4.0 offers Kafka, a distributed streaming platform for reliable real-time pipelines and streaming applications, transferring data between systems.

Several types of peers

[CIMG ID=2d0ab95f-5beb-4f3f-c405-326393029800]

  • Normal Peers: participate in the network and maintain a ledger copy. They execute chaincode, endorse transactions, and can validate transactions for specific channels.
  • Orderer Peers: order transactions, create blocks, ensure correct order, and maintain the shared ledger.
  • Anchor Peers: normal peers representing an organization, communicating directly with other organizations' anchor peers.
  • Certificate Authorities (CA) Peers: issue and manage digital certificates, verify identities, and provide credentials to join.
  • Endorsing Peers: validate and endorse transactions by executing associated chaincode, ensuring network rules are met.
  • Committer Peers: commit validated transactions from endorsing peers to the blockchain after checking consensus rules.

Each peer type plays a critical role.

Several types of chanels

[CIMG ID=6d5744ba-9b0e-4d6f-4bfc-c76052a2cb00]

  • Public channel: default channel at initialization. Visible to all members; all peers can interact.
  • Private channel: created between two or more specific members for private communication and data sharing.
  • System channel: manages network configuration and components. Created at initialization; cannot be deleted.
  • Application channel: created for an application or related applications. Allows private communication and data sharing between participants.
  • Orderer channel: manages transaction ordering and inclusion in the ledger.
  • Consortium channel: connects organizations in a consortium for private communication and data sharing.

Channels can be customized for specific requirements.

How a blockchain solution works

A blockchain solution uses the Fabric network as a backend with an application front-end. SDKs like Node.js and Java let users execute chaincode, make transactions, and monitor events.

To create a blockchain application:

  • Write chaincode in a supported language, such as Go, Node.js, or Java.
  • Deploy the chaincode on the Hyperledger Fabric network.
  • Develop a client application with an SDK.

Transaction Flow in Hyperledger Fabric Network

The transaction flow has these steps:

Step 1: Endorsement

The client sends a transaction proposal to endorsing peers on a channel. They execute the chaincode and return results with an endorsement signature.

Step 2: Ordering

Orderer nodes validate endorsed transactions, create a block, and broadcast it to all channel peers.

Step 3: Validation

Peers validate transactions and check endorsement policies. Valid transactions are committed to their ledgers.

Step 4: Consensus

Consensus algorithms vary by network requirements because the mechanism is pluggable. The default is the Kafka ordering service.

[CIMG ID=b0bc80f4-a45b-41cf-1061-12e046358c00]

Step 5: Commitment

After consensus, committed transactions become immutable and are added to the ledger, which updates on all peer nodes.

Conclusion

Hyperledger Fabric provides a sturdy framework for blockchain applications across industries. Its components, including nodes, channels, chaincode, and MSP, secure, scale, and optimize performance. The transaction flow validates and endorses transactions only by authorized participants and adds them consistently and immutably. Understanding this flow is essential to leverage Fabric for innovative applications.