A366/

Blockchain, Framework, Hyperledger

Hyperledger Frameworks Explained for Secure Systems

Lecture 5 min
Hyperledger Frameworks Explained for Secure Systems

Hyperledger is an open-source project that provides modular frameworks for building permissioned blockchains. Unlike Bitcoin or Ethereum, which are single networks with fixed protocol rules, Hyperledger frameworks are toolkits: you deploy your own blockchain with components you choose and organizations you control. Each framework makes different trade-offs between modularity, performance, and use case fit.

Hyperledger Fabric: Modularity and Pluggable Consensus

Fabric is designed for enterprises that need customization. You specify which organizations are endorsers, ordering service operators, and committers. Endorsement policies are per-chaincode (smart contract): you can require three out of five hospitals to approve a medical record update, but only two out of three banks to approve a payment. This granularity is absent from public blockchains, where protocol rules apply uniformly to all transactions.

Fabric's consensus is pluggable. Organizations can swap out the ordering service from Solo (single point of failure, development only) to SBFT (Byzantine fault tolerant) without rewriting application code. Private data collections allow subset channels: a payment transaction's amount can be hidden from uninvolved organizations while its hash is recorded on the public channel for audit.

Performance: Fabric networks typically achieve 1,000-10,000 transactions per second. Throughput scales with the number of channels (separate ledgers between different organization subsets). A single channel's throughput is bounded by the endorsement phase: if policy requires approval from five peers across three continents, latency and bandwidth limit throughput to a few thousand TPS.

When to Use Fabric:

Consortiums where organizations do not fully trust each other but agree to a settlement process. Each organization maintains its own peer; no single organization controls validation. Examples: supply chain networks (manufacturer, distributors, retailers), inter-bank settlement, healthcare data sharing with explicit consent.

Hyperledger Sawtooth: Energy-Efficient Validation

Sawtooth separates the transaction processor (application logic) from the consensus layer. This allows developers to build applications without understanding Byzantine agreement or distributed consensus. The consensus mechanism is pluggable: Proof of Elapsed Time (PoET) is the default, using Intel SGX enclaves to prove a node waited a random duration before proposing a block. This avoids the power consumption of proof-of-work while maintaining fairness.

Sawtooth's state is stored as a merkle tree with a web of trust model: any authorized node can verify the entire state without the tree's custodian. This design supports light clients and offline verification.

Performance: PoET achieves 1,000-5,000 TPS depending on network topology. Because validation does not require Byzantine agreement, block finality is probabilistic: a block becomes increasingly final as more blocks are appended, similar to proof-of-work chains.

When to Use Sawtooth:

Supply chain tracking or asset tokenization where participants are semi-trusted and you want low energy consumption. IoT networks where validators are resource-constrained. Applications where transaction finality can be probabilistic (like confirmations in Bitcoin).

Hyperledger Indy: Decentralized Identity Without a Public Ledger

Indy is a specialized ledger for identity credentials. Instead of storing identity data on-chain, Indy stores schemas and revocation registries on-chain, while credential holders keep their actual credentials (e.g., a university diploma) in a wallet off-chain. Verification happens peer-to-peer using zero-knowledge proofs: you prove you have a valid credential without revealing who issued it or what it contains beyond the verified claims.

Indy is the smallest Hyperledger framework. Its ledger is write-optimized for identity operations (schema registration, credential revocation) and does not handle general-purpose smart contracts.

When to Use Indy:

Digital identity systems, self-sovereign identity (individuals control their own credentials), verifiable credentials for employment or education, government-issued licenses where privacy from third parties is required (e.g., proving age without revealing birthdate).

Hyperledger Besu: Ethereum Compatibility

Besu is an Ethereum-compatible blockchain client that runs on the Java Virtual Machine. It supports both public Ethereum networks (mainnet, Ropsten) and private networks. Enterprises can deploy Besu as a permissioned fork of Ethereum: use the same smart contracts and development tools, but restrict validator nodes to known organizations.

Performance: Besu achieves similar throughput to Ethereum mainnet (20-30 TPS), limited by global consensus. Private deployments without Byzantine agreement (using simpler consensus like Clique or QBFT) achieve 100-1,000 TPS.

When to Use Besu:

Teams already invested in Ethereum tooling (Solidity, Hardhat, MetaMask) who need a private deployment. Permissioned DeFi where you want Ethereum compatibility. Token issuance (ERC-20) in a controlled environment.

Hyperledger Iroha: Simple Asset Management

Iroha is minimal: it provides asset management, permissions, and simple smart contracts without the complexity of Fabric's endorsement policies or Sawtooth's state machines. Its consensus is Yet Another Consensus (YAC), which finalizes blocks in rounds. Validators vote on proposed blocks; if two-thirds or more vote yes, the block is final.

Iroha is designed for embedded systems and IoT where resources are constrained. SDKs exist for Python, Java, JavaScript, and Go, making it accessible to teams without blockchain expertise.

Performance: Iroha achieves 500-5,000 TPS on local networks. In geographically distributed deployments, latency dominates throughput.

When to Use Iroha:

Mobile or embedded systems that need a minimal blockchain footprint. Asset issuance and transfer without complex logic. Organizations that prefer simplicity over customization.

Comparison: When to Choose Which Framework

If you need modular consensus and flexible endorsement policies (most enterprises), use Fabric. If you need to avoid proof-of-work and energy consumption, use Sawtooth. If you need decentralized identity without public data, use Indy. If you want to reuse Ethereum smart contracts in a permissioned setting, use Besu. If you need minimal footprint and simplicity, use Iroha.

Each framework imposes trade-offs. Fabric's flexibility comes with operational complexity (multiple configuration files, multi-step deployment). Sawtooth's pluggable consensus means no single correct consensus for all use cases. Indy's identity model is powerful but non-obvious to teams used to account-based ledgers. Besu's Ethereum compatibility means inheriting Ethereum's gas model and EVM limitations.

Common Implementation Errors

Mistake: choosing endorsement policies without understanding latency. A policy requiring approval from peers in three continents will timeout if endorsers take more than the configured timeout (usually 30-60 seconds) to respond. Start with local peers in one region, then test geographic distribution.

Mistake: assuming permissioned blockchains prevent data breaches. Peers still store the ledger in plaintext (or encrypted with keys you control). If a peer is compromised, all its data is exposed. Use private data collections for sensitive information and encrypt at-rest separately.

Mistake: deploying without an off-chain backup. Hyperledger blockchains are ledgers, not primary databases. If every peer crashes, you must restore from backups. Design operational procedures for peer recovery before deploying to production.