Hyperledger Fabric

Section V: Permissioned Chains

Army Cyber Institute

April 9, 2026

Learning Goals

  • Locate each major Hyperledger Fabric component in the execute-order-validate path.
  • Explain what each component does and which trust decision it is responsible for.
  • Translate the generic permissioned-ledger ideas from the previous lesson into Fabric terms.
  • Trace one Fabric invoke from proposal to commit, including endorsement, ordering, validation, and state update.
  • Recognize where Fabric records evidence of success, invalidation, and failure.

Agenda

  1. Fabric network mental model
  2. Fabric vocabulary: map generic concepts to Fabric components
  3. Component deep dive (identity, peers, orderers, channels, policies)
  4. Transaction lifecycle, observability, and lab troubleshooting

From Permissioned Concepts to Fabric Terms

Permissioned concept Fabric term Purpose in Fabric
Identity and membership Certificate Authority plus Membership Service Provider (MSP) Establish trusted identities and define whose signatures count
Transaction approval policy Endorsement policy Specify which organizations must approve a transaction
Ordering service Orderer cluster Produce one agreed transaction order
Shared ledger history Block log plus current-value snapshot Preserve accepted history while supporting efficient reads
Governance and admin control Channel configuration plus chaincode lifecycle policies Control membership, upgrades, and administrative changes

The Big Picture: End-to-End Fabric Path

  • The core architectural pattern is execute-order-validate:
    • Execute: Endorsing peers run chaincode and sign the proposed result
    • Order: The orderer cluster establishes one shared transaction sequence
    • Validate: Committing peers check endorsements and state conflicts, then update the ledger
  • Key separations that distinguish Fabric from simpler designs:
    • Ordering is separated from execution
    • Approval (endorsement) is separated from commit
    • Identity is verified at every stage

BigPicture CA Certificate Authority MSP Membership Service Provider CA->MSP APP Client App / SDK MSP->APP EP Endorsing Peers + Chaincode APP->EP ORD Orderer Cluster EP->ORD CP Committing Peers ORD->CP L Block Log + Current Values CP->L

Fabric-Specific Concepts To Watch For

  • Execute-order-validate: execute and endorse first, order second, validate at commit
  • Channels: separate ledger, membership, and policy boundaries (think classification compartments)
  • Block log vs. world state: durable history vs. current-value snapshot for fast queries
  • CA vs. MSP: CA issues identities; MSP decides which are trusted (like a SAP determining who is read into a program)
  • Chaincode: Fabric’s term for smart contracts. Application code that governs ledger updates. We will cover this in detail shortly.
  • Endorsement policy: which orgs must sign before a transaction moves forward

Why Fabric Splits Responsibilities

  • In the previous lesson, we presented a generic pyramid: identity → policy → ordering → commit. Fabric breaks that pyramid into distinct, named services rather than bundling them into a single consensus engine:
    • MSP + CA: decide whose signatures count (identity layer)
    • Endorsing peers: execute chaincode and sign proposal results (approval layer)
    • Orderer cluster: sequences accepted transactions but does not execute chaincode (ordering layer)
    • Committing peers: validate and update local ledger state (commit layer)
  • This separation means three questions that many systems blend together are answered by different components:
    • Who is authorized to act? → MSP
    • Which organizations approved this state change? → Endorsement policy
    • In what order should approved transactions be recorded? → Orderer
  • Importantly, authority in one layer does not grant authority in another. An organization that votes on policy upgrades does not automatically gain read access to every channel or the power to add new members to the network.

Identity Layer: CA and MSP

  • The Certificate Authority handles enrollment:
    • It issues the certificates and keys bound to users, peers, admins, and organizations
  • The Membership Service Provider is Fabric’s trust policy layer:
    • It names which certificate roots are trusted
    • Which roles are recognized
    • Which signatures satisfy local checks
  • Fabric provides both a concrete way to issue identities and a separate mechanism to decide what those identities are allowed to mean inside the network.
    • However, it is still up to the operators to verify the real-world identity of the people or organizations receiving those credentials.
  • Without valid identity, proposals, endorsements, administrative actions, and sometimes even channel participation are rejected before business logic matters.

What is an MSP?

  • An MSP is not a single server and it is not a node type.
  • It is Fabric’s structured trust definition for an organization:
    • MSP ID
    • trusted certificate roots
    • admin certificates
    • role rules and signature requirements
  • Fabric uses MSP information in more than one place:
    • Local MSP configuration lets a peer, orderer, or client identify itself and verify trusted identities from disk.
    • Channel MSP definitions tell the channel which organizations exist and which MSPs their signatures must satisfy.
  • So a network usually contains multiple MSPs, often one per organization, and a node checks both its local material and the relevant channel policy when deciding whether a signature counts.

MSP in Practice

  • MSP mistakes are often early, loud failures: signature validation errors, policy failures, and admin commands rejected even though containers look healthy.
  • In practice, several important controls live around MSP and channel configuration:
    • Enrollment and registration commands create identities through the CA.

    • Channel configuration defines which organizations exist on that channel and which MSPs their signatures must satisfy.

    • Endorsement policies are typically set as part of the chaincode definition committed to a channel.

  • Fabric nodes are not constantly asking a central MSP service whether every action is allowed.
    • They use local trust material plus channel policies to evaluate signatures and permissions.
  • MSP also explains why Fabric can be selective:
    • One identity may submit but not administer.
    • Another may approve lifecycle changes but not normal business transactions.

Peers: Two Jobs, One Node Type

  • A peer can play multiple roles in the same network.
  • As an endorser, a peer:
    • Simulates chaincode
    • Produces a read-write set
    • Signs the proposal response
  • As a committer, a peer:
    • Receives ordered blocks.
    • Re-checks policy and MVCC constraints.
    • Updates the block log and world state.
  • MVCC (multi-version concurrency control) means a peer checks whether the keys read earlier still have the same versions at commit time.
  • This separation matters because “executed by a peer” does not mean “globally committed by the network.”

Chaincode: What It Is and How It Runs

  • In Fabric, the smart contract is called chaincode: application code that all required organizations agree is allowed to govern ledger updates.
  • Chaincode exposes named functions that clients invoke: InitLedger, CreateAsset, ReadAsset, TransferAsset
  • Chaincode is where business rules live: what fields an asset has, which updates are allowed, and what events are emitted.
  • Chaincode alone does not create trust. Trust comes from chaincode plus endorsement policy, ordering, and commit validation.
  • Chaincode runs during proposal simulation, not during final commit.
  • The key output is the proposed read-write set (RW set): which ledger-state keys were read, which versions were seen, and which values the transaction wants to write.
  • Endorsers sign that result so the client can prove what was approved.
  • Later stages do not re-run the contract; they check whether the endorsed result still satisfies policy and state-version constraints.

Chaincode Example: CreateAsset

  • This example is adapted from the lab’s JavaScript chaincode.
  • It does four basic things:
    • Checks whether the asset already exists
    • Constructs a new asset object from the input fields
    • Saves it through the Fabric stub helper
    • Emits an event so observers can react
  • The important point is that this code looks like ordinary application logic.
  • What makes it “blockchain logic” is the surrounding Fabric pipeline that decides whether this proposed update becomes shared committed state.
async CreateAsset(ctx, id, color, size, owner, appraisedValue) {
  const exists = await this.AssetExists(ctx, id);
  if (exists) {
    throw new Error(`The asset ${id} already exists`);
  }

  const asset = {
    ID: id,
    Color: color,
    Size: Number(size),
    Owner: owner,
    AppraisedValue: Number(appraisedValue),
  };

  await this._saveAsset(ctx, asset);
  await ctx.stub.setEvent('CAR_LISTED', Buffer.from(JSON.stringify(asset)));
  return JSON.stringify(asset);
}

Chaincode Lifecycle

  • Lifecycle is distinct from normal transaction execution.
  • The package is the deployable chaincode artifact: smart-contract code plus metadata needed to run it on endorsing peers.
  • Organizations install the package on peers first, then approve a chaincode definition for a channel:
    • name, version, sequence number, endorsement policy, and related settings
  • Once committed to the channel, transactions use that agreed contract version and policy.
  • This is another example of Fabric separating governance and rollout from day-to-day business writes.

Lifecycle I Install package A Approve definition I->A C Commit definition A->C R Ready to invoke C->R

Determinism and Safety

  • Endorsers must produce matching results for the same proposal.
  • Non-deterministic logic breaks that expectation:
    • Local time
    • Randomness
    • Uncontrolled external API calls
    • Divergent local environment state
  • The result is usually endorsement mismatch rather than a spectacular crash.
  • That is a safety feature:
    • Fabric would rather reject a transaction than let different endorsers certify different outcomes for the same proposal.

Endorsement Policies as Trust Logic

  • Endorsement policy is Fabric’s concrete implementation of the “approval layer” from the previous lesson’s policy pyramid.
    • It names the orgs/roles whose signatures are required for a transaction type.
  • Common approval patterns:
    • AND(Org1, Org2): every listed organization must endorse. High assurance, but any single org going offline blocks all transactions.
    • OR(Org1, Org2): any one organization is sufficient. Fast and resilient, but a compromised org can approve unilaterally.
    • OutOf(2, Org1, Org2, Org3): majority threshold. Balances resilience (one org can be offline) with assurance (no single org acts alone).
  • Policies are defined per-chaincode on a channel, so a high-value asset contract can require stricter approval than a routine contract on the same network.
  • Trade-off: stronger policy (more endorsers) increases assurance but also increases latency and the chance that one missing endorser blocks progress. Misconfigured policies are a real operational risk: too loose and attackers slip through, too strict and legitimate work stalls.

Channels: Confidentiality Boundary

  • A channel is a separate governance and ledger boundary.
  • It is a separate ledger domain with its own:
    • Members
    • Blocks
    • Policies
    • Smart-contract definitions
  • That makes channels powerful for confidentiality, but also expensive:
    • More channels can mean more governance surface and more operational overhead

Channels cluster_a Channel A cluster_b Channel B A1 Org1 Peer LA Ledger A A1->LA A2 Org2 Peer A2->LA B1 Org2 Peer LB Ledger B B1->LB B2 Org3 Peer B2->LB

Private Data Collections

  • Private data collections are a lighter-weight confidentiality tool than creating a whole new channel.
  • Authorized peers receive the plaintext private payload.
  • The channel still records a hash anchor so all peers can verify integrity and later detect tampering.
  • This gives Fabric a useful middle ground:
    • Not everyone sees the data
    • But everyone can still verify that the committed history is consistent

PrivateDataFlow APP Client Tx PVT Private Payload to authorized peers APP->PVT HASH Hash anchored in block PVT->HASH ALL All channel peers verify integrity anchor HASH->ALL

Orderer Cluster and Raft Quorum

  • Fabric commonly uses Raft for crash-fault-tolerant (CFT) ordering.
    • Raft handles orderer crashes but assumes orderers are not actively malicious. If Byzantine-fault tolerance (BFT) is needed, Fabric supports a BFT orderer option, though Raft remains the most common deployment.
  • The orderer cluster decides sequence, not business validity.
  • Its job is narrower but still critical:
    • Accept endorsed transactions
    • Produce one agreed sequence per channel
    • Deliver blocks consistently to peers

RaftQuorum O1 Orderer 1 O2 Orderer 2 O1->O2 Q Raft quorum agrees on block sequence O1->Q O3 Orderer 3 O2->O3 O2->Q O3->O1 O3->Q

Ledger Internals: Block Log vs World State

  • The block log is the durable history of what the network accepted.
  • It includes valid and invalid transactions, which matters for audit and diagnosis.
  • The world state is a performance layer:
    • A query-friendly snapshot of the latest values
  • This is why “query all” can feel database-like even though the underlying trust model is ledger-based.

LedgerInternals B Immutable Block Log R Replay / Audit B->R V Validation History B->V W World State B->W Q Fast current-state queries W->Q

One Invoke: Proposal to Commit

  • A single Fabric invoke passes through four distinct decision points:
    • Proposal: the client sends a signed request to endorsing peers
    • Approval: endorsers simulate chaincode and return signed read-write sets
    • Ordering: the client submits the endorsed transaction to the orderer cluster
    • Validation and commit: peers check policy and state-version rules, then update ledger and world state
  • Watching those stages separately is the key to understanding why a transaction can be approved, ordered, and still later be marked invalid.

TxLifecycle App Client CLI / SDK EP Endorsing Peers App->EP 1) Propose Ord Orderer Cluster App->Ord 3) Submit EP->App 2) Endorse (RW set + signatures) CP Committing Peers Ord->CP 4) Deliver block V Validate policy + MVCC CP->V 5) Validate C Commit valid tx to ledger/state V->C 6) Commit

Phase A: Proposal and Endorsement

  • The client sends a proposal under a valid MSP identity to the endorsing peers required by policy.
  • Each endorser simulates the chaincode without committing anything and returns a signed read-write set (RW set):
    • the ledger-state keys read, and the versions observed
    • the world-state values the transaction wants to write
  • The client gathers enough matching endorsements to satisfy policy.
  • If the endorsements disagree, or the policy threshold is not met, the transaction never reaches ordering.

Phase B: Ordering, Validation, and Commit

  • The endorsed transaction is submitted to the orderer quorum for channel-wide sequencing.
  • Orderers do not decide whether the business action is valid; they decide where in the block stream the transaction belongs.
  • Ordered blocks are then delivered to committing peers for validation.
  • Peers re-check endorsement policy and MVCC constraints:
    • MVCC (multi-version concurrency control) asks whether the keys read during endorsement still have the same versions at commit time
  • This is why a transaction can be endorsed successfully and still fail later:
    • another transaction may have changed one of the keys first
    • the endorsement set may no longer satisfy the final policy check
    • the transaction may be malformed or duplicate by the time it is validated
  • Valid transactions update world state; invalid ones remain in block history and are marked invalid for audit.

How Fabric Avoids Public-Chain Consensus Costs

  • Known identities reduce Sybil assumptions.
  • Endorsement restricts who must execute and sign.
  • Orderer quorum agrees on order without a PoW race or open validator competition.
  • Peers validate deterministically rather than relying on probabilistic depth.
  • Finality is operationally immediate after valid commit under normal crash-fault assumptions.
  • The tradeoff is that Fabric inherits the strengths and weaknesses of managed membership, policy, and operational governance.

Where Consensus Can Still Fail

  • Even with a sound architecture, Fabric transactions can fail at three distinct pipeline stages:
    • Pre-order: endorsement or identity checks reject the proposal before it reaches the orderer
    • Post-order: the transaction is ordered into a block but invalidated during commit-time validation
    • Liveness: the ordering service itself stalls, so no blocks are produced
  • Use the diagram as a “which stage broke?” checklist when debugging.

FailureModes root Transaction Failure Modes A Pre-Order Rejection root->A B Post-Order Invalidation root->B C Liveness Failure root->C A1 Insufficient endorsements A->A1 A2 MSP / certificate mismatch A->A2 B1 MVCC read-set conflict B->B1 B2 Endorsement policy not satisfied B->B2 C1 Orderer quorum lost C->C1 C2 Network partition or severe latency C->C2

Observability: What to Watch Live

  • A clean mental model for observation is:
    • Peer and orderer logs tell you which stage is currently happening and where it failed.
    • The block log tells you ordering happened and whether the transaction was later marked valid or invalid.
    • World state and queries tell you whether a valid commit changed current values.
  • If a block appears but state does not change, the transaction may have been ordered but later marked invalid.

Wrap-Up

  • Fabric’s architecture is role-separated by design: identity, execution, ordering, validation.
  • Its consensus-equivalent guarantees emerge from policy plus ordered commit, not mining.
  • The key analytic move is to ask which component is making which trust decision.
  • In the lab, the goal is to recognize how Fabric’s architecture produces both successful commits and specific failure modes.

References

[1]
E. Androulaki et al., “Hyperledger fabric: A distributed operating system for permissioned blockchains,” in Proceedings of the Thirteenth EuroSys Conference, Porto Portugal: ACM, Apr. 2018, pp. 1–15. doi: 10.1145/3190508.3190538.
[2]
Hyperledger, “A Blockchain Platform for the EnterpriseHyperledger Fabric Docs main documentation.” Accessed: Oct. 27, 2025. [Online]. Available: https://hyperledger-fabric.readthedocs.io/en/release-2.5/
[3]
Hyperledger Fabric Docs, “Chaincode for Developers.” 2018. Available: https://hyperledger-fabric.readthedocs.io/en/release-1.3/chaincode4ade.html
[4]
Hyperledger Fabric Docs, “Fabric-samples (GitHub repository).” 2025. Available: https://github.com/hyperledger/fabric-samples
[5]
Amazon, “Work with Channels - Amazon Managed Blockchain (AMB).” Accessed: Oct. 28, 2025. [Online]. Available: https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/hyperledger-work-with-channels.html
[6]
Hyperledger Fabric Developers, “Private Data.” Accessed: Oct. 28, 2025. [Online]. Available: https://github.com/hyperledger/fabric/blob/main/docs/source/private-data/private-data.md
[7]
Hyperledger Fabric Docs, “Secured Private Asset Transfer Tutorial.” 2024. Available: https://hyperledger-fabric.readthedocs.io/en/latest/secured_asset_transfer/secured_private_asset_transfer_tutorial.html
[8]
D. Ongaro and J. Ousterhout, “In Search of an Understandable Consensus Algorithm,” in 2014 USENIX Annual Technical Conference (USENIX ATC 14), Philadelphia, PA: USENIX Association, Jun. 2014, pp. 305–319. Available: https://www.usenix.org/conference/atc14/technical-sessions/presentation/ongaro
[9]
S. Bano et al., “Consensus in the Age of Blockchains.” 2017. Available: https://arxiv.org/abs/1711.03936
[10]
M. Pishdar, Y. Lei, K. Harfoush, and J. Manzoor, “Denial-of-Service Attacks on Permissioned Blockchains: A Practical Study,” Journal of Cybersecurity and Privacy, vol. 5, no. 3, p. 39, Sep. 2025, doi: 10.3390/jcp5030039.