By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Study Guide – Hyperledger Fabric & Enterprise Blockchain (Designed for software engineers & finance professionals moving into crypto‑enabled business solutions)
Hyperledger Fabric is an open‑source, permissioned blockchain framework built for enterprise use‑cases. Unlike public chains (Ethereum, Solana), Fabric lets a consortium of known organisations run a shared ledger where transaction privacy, governance, and performance are fully controllable. A concrete example: a consortium of banks and importers uses Fabric to digitise trade‑finance letters‑of‑credit—each party sees only the data they’re authorised to, while the network guarantees tamper‑evidence and auditability in near‑real‑time.
go // simple asset transfer chaincode (Go) func (s *SmartContract) TransferAsset(ctx contractapi.TransactionContextInterface, assetID, newOwner string) error { asset, err := s.ReadAsset(ctx, assetID) if err != nil { return err } asset.Owner = newOwner assetJSON, _ := json.Marshal(asset) return ctx.GetStub().PutState(assetID, assetJSON) }
"OR('BankA.peer','Exporter.peer')"
json // collection config (JSON) { "name": "confidentialDocs", "policy": "OR('BankA.member','BankB.member')", "requiredPeerCount": 1, "maxPeerCount": 2, "blockToLive": 1000 }
js const { Gateway, Wallets } = require('fabric-network'); const wallet = await Wallets.newFileSystemWallet('./wallet'); const gateway = new Gateway(); await gateway.connect(ccp, { wallet, identity: 'bankAUser', discovery: { enabled: true } }); const contract = gateway.getNetwork('tradechannel').getContract('tradecc'); const result = await contract.submitTransaction('CreateLC', 'LC001', 'Exporter', 'BankA', '100000');
cryptogen
Fabric CA
bash fabric-ca-client enroll -u https://admin:[email protected]:7054
bash configtxgen -profile TwoOrgsChannel -outputCreateChannelTx mychannel.tx -channelID mychannel peer channel create -o orderer.example.com:7050 -c mychannel -f mychannel.tx
tradecc
bash peer lifecycle chaincode package tradecc.tar.gz --path ./chaincode --lang golang --label tradecc_1 peer lifecycle chaincode install tradecc.tar.gz peer lifecycle chaincode approveformyorg --channelID mychannel --name tradecc --version 1.0 --sequence 1 --init-required peer lifecycle chaincode commit -o orderer.example.com:7050 --channelID mychannel --name tradecc --version 1.0 --sequence 1 --init-required
CreateLC
TransferAsset
js const tx = contract.createTransaction('CreateLC'); await tx.submit('LC001', 'Exporter', 'BankA', '100000');
Mistake: Deploying chaincode directly to the orderer. Correction: Chaincode runs only on peers; the orderer merely orders blocks. Deploying to the orderer breaks the endorsement model and leads to “invalid transaction” errors.
Mistake: Storing confidential data in the world state without a private collection. Correction: Use private data collections or off‑chain encryption. Plain world‑state entries are replicated to every peer on the channel, exposing sensitive info.
Mistake: Hard‑coding endorsement policies in the client code. Correction: Define policies in the channel configuration (or chaincode definition) and let the network enforce them. Changing a policy later then requires a channel update, not a client rewrite.
Mistake: Relying on a single orderer node (Solo) for production. Correction: Switch to Raft (or Kafka) consensus for fault tolerance. Solo is meant only for development; a single point of failure will halt the whole network.
Mistake: Neglecting TLS certificates for peer‑to‑peer communication. Correction: Enable mutual TLS (CORE_PEER_TLS_ENABLED=true). Without TLS, traffic can be intercepted, and many Fabric components will refuse to connect in production mode.
CORE_PEER_TLS_ENABLED=true
“Explain the difference between a public ledger and a private data collection in Fabric.” Interviewers expect you to discuss visibility vs. confidentiality: the public ledger is replicated to all channel members, while private collections keep the actual value off‑ledger and only share a hash on the public ledger.
“How does Fabric achieve deterministic execution without a global gas model?” Because chaincode runs inside a Docker container on each endorsing peer, the same input must produce the same output; Fabric relies on endorsement policies and deterministic chaincode rather than gas.
“What are the security implications of using tx.origin‑like patterns in Fabric?” Fabric does not have tx.origin, but using the client identity (GetClientIdentity().GetID()) for authorization is safe only when the MSP is correctly configured; otherwise a malicious org could spoof identities.
tx.origin
GetClientIdentity().GetID()
“When would you choose Raft over Kafka for ordering?” Raft is native, easier to set up, and works with any number of orderer nodes; Kafka requires an external Zookeeper cluster and is being deprecated. Choose Raft for new deployments.
Scenario: A chaincode function reads an asset, modifies its owner, and writes it back, but the transaction fails with “endorsement policy violation”. Answer: The required endorsing peers (per the policy) did not sign the proposal. Ensure the client submits the transaction to enough peers or adjust the policy.
Scenario: You need to share a confidential invoice between Bank A and Exporter but keep it hidden from other consortium members. Answer: Store the invoice in a private data collection scoped to those two orgs; the hash of the invoice will still appear on the public ledger for auditability.
Scenario: A developer hard‑codes the channel name in the SDK (gateway.getNetwork('mychannel')) and later the network is renamed to tradechannel. Answer: The client will throw a “channel not found” error. Always externalise channel names (e.g., via environment variables) and version them with the network configuration.
gateway.getNetwork('mychannel')
tradechannel
"AND('Org1.member','Org2.member')"
blockToLive
You now have a ready‑to‑use roadmap to design, build, and audit an enterprise‑grade Hyperledger Fabric solution. Good luck!
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.