Hyperledger Fabric

Hyperledger Fabric architecture, Raft vs BFT ordering, chaincode lifecycle, private data, CA and HSM setup, and the 2.5 to 3.0 upgrade, with DeployOpen's design, deployment and handover scope.

On this page

When Hyperledger Fabric fits and how its architecture works

Hyperledger Fabric fits consortia of known organizations that share a ledger and need control over who sees which data. The Fabric repository describes it as an enterprise-grade permissioned distributed ledger framework and a graduated project under the Hyperledger umbrella. Source code is under Apache-2.0 and the documentation is under CC-BY-4.0.

Typical uses are trade finance documents, asset registries and interbank workflows. The demanding parts are governance, data visibility, certificate management and upgrades across nodes that different organizations run. Those four topics shape most of the work described on this page.

Every participant holds a certificate-based identity, issued by Fabric CA or an existing PKI and recognized through an organization's membership service provider (MSP). According to the membership docs, an MSP needs at least one root CA certificate in cacerts and at least one TLS root CA certificate in tlscacerts. Node OUs define four roles in config.yaml: admin, client, peer and orderer.

A Hyperledger Fabric tutorial setup starts with the docker-compose test network from fabric-samples. Its test-network-k8s supplement runs Fabric on Kubernetes with one ordering organization and two peer organizations. Local prerequisites are Git, cURL, Docker and docker-compose on macOS, Ubuntu or Debian Linux, or Windows via WSL2. Go is needed only for Go chaincode or SDK applications.

Consortium governance decisions to settle before network deployment

Fabric encodes many governance decisions in channel configuration and policies, so members must agree them before the network is built.

DecisionWhat to agreeWhere it lands
MembershipAgree how organizations join and leave, who approves each change, and what happens to their nodes and data on exit.Consortium agreement and a written channel configuration update procedure.
Channel policiesAgree who may update channel configuration, read the ledger and submit transactions on each channel.Channel configuration and policy definitions.
Chaincode governanceAgree who writes and reviews chaincode, how many organizations must approve a definition and how upgrades are scheduled. The default LifecycleEndorsement policy requires a majority of channel organizations.LifecycleEndorsement policy and the chaincode release process, built on the chaincode lifecycle.
Ordering serviceAgree which organizations run orderer nodes, how many each, and whether Raft or BFT fits the trust model. The deployment guide says to run at least three ordering nodes and ideally five.Orderer plan and consenter set per channel.
Certificate authoritiesAgree each organization's CA hierarchy, its intermediate CAs and who issues admin, node and client identities. The deployment guide calls for at least one enrollment CA and one TLS CA per organization.MSP and CA design.
UpgradesAgree who owns the upgrade calendar, the order of node upgrades and the rollback point, since each organization upgrades its own nodes.Upgrade calendar and runbook shared by all members.

Hyperledger Fabric architecture: peers, ordering, channels, private data and chaincode

Each organization runs its own components. Shared components need agreed owners.

Peers

Peers hold the ledger and world state and run chaincode. The Fabric Gateway service runs within a peer, arrived in v2.4 and serves Go, Node and Java client APIs. LevelDB is the default state database and is embedded in the peer. CouchDB runs as a separate process. Finalize that choice before deploying a production peer.

Ordering service

Raft is crash fault tolerant and built on etcd, and each channel runs a separate Raft instance. A three-node channel withstands the loss of one node and a five-node channel withstands two. Fabric 3.0 added SmartBFT ordering, which tolerates malicious or compromised orderers up to but not including one third, and needs V3_0 enabled on the channel.

Channels

Each channel is a separate ledger with its own members, policies and chaincode, managed through the channel participation API. Fabric 3.0 removed the system channel and the consortium concept, so a network moving to 3.0 must adopt that API first. Version 3.1.2 added config updates and block fetching through the channel participation API.

Private data collections

A collection consists of private data shared peer to peer with authorized organizations, plus a hash on every peer's ledger. Collections can purge data after a set number of blocks. Use PurgePrivateData rather than DelPrivateData to remove private data from all peers that have it. Fabric 3.0 raised the transient store block retention default from 1000 to 20000.

Chaincode

Chaincode moves through a lifecycle of package, install, approve per organization and commit. External builders control how chaincode is built and run in production. Fabric 3.0 removed the legacy chaincode lifecycle, so every channel must use this one. Version 3.1 added batched reads and writes, which depend on minimum fabric-chaincode-go versions.

Chaincode lifecycle, endorsement and Gateway SDK design

Design keys, composite keys and indexes around the queries the business needs. Choose the state database before the first production peer, because LevelDB is embedded in the peer while CouchDB runs as a separate process with its own operations. Plan for MVCC conflicts on keys that many transactions update, and test them under load. Fabric 3.1 adds batched writes (StartWriteBatch and FinishWriteBatch, set with chaincode.runtimeParams.useWriteBatch) and batched reads (GetMultipleStates and GetMultiplePrivateData, set with chaincode.runtimeParams.useGetMultipleKeys). Batched writes need fabric-chaincode-go v2.1.0 or higher, batched reads need v2.2.0, and GetAllStatesCompositeKeyWithPagination needs v2.3.0. See the what's new page.

Fabric CA setup, HSM PKCS11 and core system integration

Each organization usually runs a gateway service between its internal systems and Fabric. It submits transactions with the organization's identity, consumes events and updates core banking, ERP or document systems. Decide which system holds the authoritative copy of each data item, and reconcile ledger state against internal records on a schedule.

For Hyperledger Fabric CA setup, the Fabric CA users guide says the server defaults to SQLite in fabric-ca-server.db and supports PostgreSQL and MySQL. Clusters need PostgreSQL 13 or later, or MySQL 8.0 or later, as a shared database behind a load balancer such as HAProxy. Fabric CA can use LDAP as its user registry, supports intermediate CAs, and can revoke identities or single certificates. The fabric-ca-client gencrl command generates a CRL for callers with the hf.GenCRL attribute.

For Hyperledger Fabric HSM PKCS11 use, the HSM docs say Fabric delegates peer and orderer MSP crypto to the HSM with bccsp default set to PKCS11. TLS must use file-based keys. Prebuilt Docker images lack PKCS11 support, so build images with make docker GO_TAGS=pkcs11 and add the vendor library.

Decide how people and systems map to certificates. End users may hold their own identities, or applications may sign on their behalf. The choice affects onboarding, KYC record linkage, revocation and audit trails.

Hyperledger Fabric on Kubernetes: hosting, certificates, backups and monitoring

Fabric nodes run in each member's infrastructure, on Kubernetes or virtual machines. Build every environment from code.

AreaApproachCheck
Orderer availabilityRun at least three ordering nodes and ideally five, spread across organizations and failure domains. The Raft configuration docs allow adding or removing only one node at a time, and only while all consenters are online and healthy.Stopping one orderer leaves ordering running on every channel.
SizingBudget about one tenth of a peer's resources for a CA and about three times a single ordering node's resources for a peer. Run at least one enrollment CA and one TLS CA per organization.The capacity plan covers every CA, peer and orderer.
Secrets and storageStore sensitive configuration in Kubernetes secrets, an HSM or encrypted Persistent Volumes. Mount node volumes outside the node deployment so nodes restart without regenerating crypto material.Deleting and recreating a node pod keeps its identity.
Certificate lifecycleTrack expiry for every node, admin and client certificate. For a Raft TLS certificate, no channel config update is needed if the public key is unchanged. Otherwise update channel config, replace the files, restart, and finish as quickly as possible.Expiry alerts fire well ahead, and a rotation has been rehearsed.
BackupsBack up ledgers, MSP folders, CA databases and keys, and channel configuration, and always before an upgrade.A CA restore and a peer rebuild have both been rehearsed.
Operations servicePeers and orderers expose an operations service with /healthz, /metrics and /version. Secure it with mutual TLS using certificates from a separate dedicated CA, because without TLS authorization is bypassed.With TLS on, /metrics and /logspec reject calls without a valid client certificate.
Raft monitoringWatch consensus_etcdraft_is_leader, consensus_etcdraft_cluster_size and consensus_etcdraft_active_nodes. If no node reports itself as leader, quorum is lost.Alerts cover leader loss, endorsement failures, block height divergence and certificate expiry.

Security hardening and access control for Fabric networks

Use mutual TLS between all nodes, keep each organization's root CA offline and issue from intermediate CAs, and use Node OUs so certificates carry admin, peer, orderer or client roles. Keep organization admin identities in an HSM or under tight custody, since they can change channel configuration and approve chaincode.

Staff sign in to the applications and consoles around Fabric through your identity provider. Those applications use Fabric identities with only the rights they need. Restrict operations endpoints to the node's network. For CouchDB, pass the password as an environment variable and expose its container port only to the peer that uses it.

Review chaincode for nondeterminism and access checks before every approval. DeployOpen's infrastructure and application testing can cover the gateway services, nodes and chaincode.

Hyperledger Fabric versions, LTS, SmartBFT and upgrade questions

Which Hyperledger Fabric LTS version should we run?

The repository README names v2.5.x as the current Long-Term Support release and says important fixes are backported to LTS releases during overlap periods. Maintenance ended for v2.2.x in February 2024 and for v1.4.x in April 2021. The releases page lists v3.1.5 as the latest release, dated June 18, 2026, and v2.5.16 with the same HandleTransaction panic fix. The README gives no fixed release schedule.

What does Hyperledger Fabric 3.0 SmartBFT add?

The v3.0.0 release notes, dated September 17, 2024, describe a SmartBFT-based ordering service that tolerates malicious or compromised orderers, up to but not including one third. It requires V3_0 on the channel. The same level adds Ed25519 support in MSP functions. The v3.1.1 notes recommend that release for BFT operators, and v3.1.2 added BFT enrollment certificate rotation without a config update.

How do Raft and BFT ordering compare?

The ordering service docs describe Raft as crash fault tolerant, with quorum equal to a majority of the consenter set. A BFT orderer cannot agree on blocks if a third or more of its nodes crash or are unreachable. Raft fits members that trust the orderer operators. BFT fits cases where some operators may not be trusted. Either way, plan at least three ordering nodes.

What changes in a Hyperledger Fabric upgrade from 2.5 to 3.0?

Before upgrading, remove any system channel and move to the channel participation API. Fabric 3.0 removed the consortium concept, Kafka and Solo ordering, and the legacy chaincode lifecycle. Remove the global OrdererAddresses setting before enabling V3_0 and use per-organization OrdererEndpoints. The v3.0 release was tested with Go 1.23.1 and CouchDB v3.3.3, its images use Ubuntu 22.04, and the fabric-tools image was removed.

How should a Fabric upgrade be sequenced?

Back up the ledger and MSPs first. Upgrade orderers, then peers, in a rolling fashion, and update channel-level feature settings only after all components run the new version. Each organization upgrades its own nodes, so agree the schedule and rollback point across members. Also review peer delivery settings. In v3.0 peer.deliveryclient.blockGossipEnabled defaults to false, and block dissemination via gossip is deprecated.

How does the Hyperledger Fabric chaincode lifecycle work?

The chaincode lifecycle has four steps: package, install, approve per organization, and commit. The default LifecycleEndorsement policy requires a majority of channel organizations to approve a definition. Fabric 3.0 removed the legacy lifecycle, so networks still using it must move before upgrading. Agree who reviews and approves each version before the first deployment.

How do private data collections work, and how is data removed?

A collection consists of private data shared peer to peer with authorized organizations, plus a hash on every peer's ledger. Collections can purge data automatically after a set number of blocks. To remove private data from all peers that have it, use PurgePrivateData rather than DelPrivateData. Fabric 3.0 raised the peer.gossip.pvtData.transientstoreMaxBlockRetention default from 1000 to 20000 blocks.

Can we run Hyperledger Fabric on Kubernetes?

Fabric nodes run in each member's infrastructure, on Kubernetes or virtual machines. The fabric-samples test-network-k8s runs one ordering organization and two peer organizations on Kubernetes as a learning setup. For production, the deployment guide says to keep sensitive configuration in Kubernetes secrets, an HSM or encrypted Persistent Volumes, and to mount node volumes outside the node deployment so restarts keep crypto material.

Operating ownership in a Fabric consortium

Every member operates part of the network, and some duties are shared. Write down who does each before go-live.

Member node operators

  • Run peers, CouchDB and gateway services.
  • Apply upgrades on the agreed schedule.
  • Monitor endorsement and commit health.

Ordering service operators

  • Run orderer nodes and watch leader and active node metrics.
  • Change consenters one node at a time.
  • Coordinate certificate rotation.

CA and identity owners

  • Operate CAs and protect admin identities.
  • Track expiry and revoke certificates.
  • Map staff and systems to Fabric roles.

Consortium governance

  • Approves members, channel changes and chaincode.
  • Owns the upgrade calendar.
  • Commissions security testing.

Implementation scope, effort drivers and handover

Effort depends on the number of organizations and channels, chaincode complexity, private data needs, the ordering trust model, HSM use, integrations with internal systems and whether an existing network needs to move to 3.x.

A move to 3.x adds its own work: dropping the system channel, replacing Kafka ordering with Raft, moving chaincode to the current lifecycle and replacing legacy SDKs. These steps come before the V3_0 channel level can be enabled.

DeployOpen runs governance and design workshops with members, designs channels, policies and the CA structure, writes and tests chaincode, and builds network configuration as code. It deploys and hardens nodes in each member's infrastructure, integrates internal systems and plans upgrades.

Handover includes the governance and channel design, MSP and CA procedures, chaincode source and tests, a certificate inventory with expiry tracking, monitoring setup and runbooks.

Sources and further reading

More on Hyperledger Fabric

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.