How unit 5 is examined
This unit covers Hyperledger Fabric (architecture, identities, membership, channels, validation, chaincode), Ethereum smart contracts and Ripple/Corda; Fabric architecture and transaction validation carry the marks.
Hyperledger Fabric- Architecture
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>Hyperledger Fabric is an open-source, permissioned, modular enterprise blockchain platform, hosted by the Linux Foundation, in which known participants run peers that execute chaincode and an ordering service that sequences transactions.</mark>
Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-01" viewBox="0 0 431 252" width="431" height="252" role="img" aria-label="Fabric flow. App = client application, Peer = endorsing/committing peer, Ord = ordering service, Led = ledger (blockchain + world state)"><style>#dsfig-u5-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-01 .t{fill:#16181D;font-weight:500}#dsfig-u5-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-01 .dot{fill:#16181D}#dsfig-u5-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-01 .ah{fill:#454C5A}#dsfig-u5-01 .ah.hi{fill:#2340B8}#dsfig-u5-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-01 .e{stroke:#B1B7C3}html.dark #dsfig-u5-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-01 .t{fill:#E6E8ED}html.dark #dsfig-u5-01 .t.inv{fill:#0F1115}html.dark #dsfig-u5-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-01 .dot{fill:#E6E8ED}html.dark #dsfig-u5-01 .ann{fill:#8FA3FF}html.dark #dsfig-u5-01 .lbl{fill:#858D9C}html.dark #dsfig-u5-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-01 .ah{fill:#B1B7C3}html.dark #dsfig-u5-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah5" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh5" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M58.8,123.3 Q140.3,111.6 192.2,59.8" marker-end="url(#ah5)"/><path class="e" d="M186.3,43.7 Q111.7,54.4 54.9,111.2" marker-end="url(#ah5)"/><path class="e" d="M57,134.5 L193.2,202.6" marker-end="url(#ah5)"/><path class="e" d="M212,193 L212,68" marker-end="url(#ah5)"/><path class="e" d="M238,40 L365,40"/><g class="wl"><rect x="102.2" y="92.6" width="61.5" height="18" rx="9"/><text class="t" x="132.9" y="101.6" dy=".35em" text-anchor="middle">propose</text></g><g class="wl"><rect x="85.4" y="56.9" width="61.5" height="18" rx="9"/><text class="t" x="116.1" y="65.9" dy=".35em" text-anchor="middle">endorse</text></g><g class="wl"><rect x="98.9" y="160" width="54.3" height="18" rx="9"/><text class="t" x="126" y="169" dy=".35em" text-anchor="middle">submit</text></g><g class="wl"><rect x="188.5" y="117" width="47.1" height="18" rx="9"/><text class="t" x="212" y="126" dy=".35em" text-anchor="middle">block</text></g><g class="wl"><rect x="270.9" y="31" width="54.3" height="18" rx="9"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">commit</text></g><circle class="n" cx="40" cy="126" r="18"/><text class="t" x="40" y="126" dy=".35em" text-anchor="middle">App</text><rect class="n" x="187" y="25" width="50" height="30" rx="15"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">Peer</text><circle class="n" cx="212" cy="212" r="18"/><text class="t" x="212" y="212" dy=".35em" text-anchor="middle">Ord</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">Led</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Fabric flow. App = client application, Peer = endorsing/committing peer, Ord = ordering service, Led = ledger (blockchain + world state)</figcaption></figure>
Key points.
- Fabric is permissioned: every participant has a known identity issued by a Membership Service Provider, unlike Bitcoin or Ethereum where anyone can join anonymously.
- Peers hold the ledger and run chaincode; endorsing peers simulate transactions and sign the result, and committing peers validate and write blocks.
- The ordering service (orderers) sequences transactions into blocks and delivers them to peers, without executing them.
- Chaincode is the smart contract, run in a Docker container, and it can be written in Go, Java or JavaScript instead of a single fixed language.
- Channels give private sub-ledgers, so only the organisations on a channel see its transactions.
- Fabric uses an execute-order-validate model, whereas public chains use order-execute, which lets it run non-deterministic-safe, parallel endorsement and higher throughput.
- The design is modular: consensus (Raft), membership and endorsement policy can be plugged in.
- There is no mining and no mandatory cryptocurrency, so transaction fees and energy cost are low.
| Feature | Hyperledger Fabric | Bitcoin / Ethereum |
|---|---|---|
| Access | Permissioned, known identities | Public, anonymous |
| Consensus | Pluggable ordering (Raft) | PoW / PoS |
| Privacy | Channels, private data | All data public |
| Smart contract | Chaincode (Go, Java, JS) | Solidity on EVM |
| Currency | Optional | Native coin needed (BTC, ETH) |
| Throughput | High | Low |
Answer frame. Open with the definition; draw the flow diagram; develop points 1-5 (peers, orderers, chaincode, channels, MSP); give the comparison table; close with "Fabric suits enterprise consortia needing privacy and speed". For "short notes" write 5 lines only.
Asked: [14 marks] (May 2022) Short notes: i) Hyperledger Fabric ii) Ripple and Corda iii) Cross border payments (Ripple/Corda and cross-border are under Ripple and Corda) Asked: [7 marks] (May 2024) What is Hyperledger Fabric and how does it differ from other blockchain platforms?
Identities and Policies
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. An identity is an X.509 digital certificate issued by a Certificate Authority that proves who a peer, orderer, admin or client is; a policy is a rule stating which identities must sign or may act.
Key points.
- Every actor in Fabric holds a certificate with a private key, and each transaction is signed with it.
- Endorsement policies state which organisations must endorse a transaction, for example "Org1 AND Org2".
- Channel and access policies decide who may read, write or administer a channel.
Membership and Access Control
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. The Membership Service Provider (MSP) turns identities into organisation membership and roles, and access control lists (ACLs) use them to permit or deny actions.
Key points.
- An MSP lists the root CA certificates of an organisation and defines its members, admins and peers.
- Roles such as admin, peer, client and orderer decide what an identity may do.
- ACLs attach policies to resources such as chaincode invocation or block events.
- Because only enrolled members are admitted, the network is permissioned.
Channels
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. A channel is a private communication sub-network with its own separate ledger shared only by its member organisations.
Key points.
- Each channel has its own ledger, members and chaincode, so data is isolated from other channels.
- A peer can join several channels and keeps a separate ledger for each.
- Channels give confidentiality in a consortium, for example two banks trading privately while a third sees nothing.
- Private data collections give finer privacy inside a channel.
Transaction Validation
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>Transaction validation is the process of checking that a transaction is correctly signed, authorised and not a double spend before it is committed to the ledger.</mark>
Steps (Fabric).
Step 1: Client sends a proposal to endorsing peers, which simulate it and return signed read-write sets.
Step 2: Client submits the endorsed transaction to the ordering service.
Step 3: Orderers sequence transactions into a block and deliver it to all peers.
Step 4: Each peer checks the endorsement policy is satisfied and signatures are valid.
Step 5: Each peer checks read-set versions (MVCC) to detect conflicts or double spends.
Step 6: Valid transactions update the world state; invalid ones are marked and kept in the block.
Know Your Customer (KYC). KYC is the mandatory identity and address verification of a customer by a bank before service. On a blockchain, a customer is verified once, the verified record is shared through the ledger with permitted banks, and this removes repeated checks, cost and fraud.
Crypto currency. A crypto currency is digital money secured by cryptography, created and transferred on a decentralised blockchain without a central bank, for example Bitcoin. Ownership is proved by digital signatures and a consensus mechanism prevents double spending.
Creation of coin. New coins are created when a miner solves the proof-of-work puzzle and adds a block; the block reward is a special coinbase transaction. In Bitcoin the reward began at 50 BTC and halves every 210,000 blocks, which caps supply at 21 million.
Key points.
- Validation checks digital signatures so only the owner spends a coin.
- It checks that inputs are unspent, which prevents double spending.
- In Bitcoin every full node validates each transaction and block independently.
- In Fabric validation happens at commit time, after ordering.
- Invalid transactions are rejected (Bitcoin) or flagged and not applied to state (Fabric).
Answer frame. Attempt any three terms; give each a definition line, the entities or steps involved, and one example; for transaction validation add the six-step list; close each term with its importance.
Asked: [14 marks] (May 2024) Explain any three: a) Transaction validation b) Know your customer c) Crypto currency d) Creation of coin
Writing smart contract using Hyperledger Fabric
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. A Fabric smart contract is chaincode, a program installed on peers that reads and writes the ledger world state through the chaincode API.
Key points.
- It is written in Go, Java or JavaScript and runs in a Docker container.
- Functions such as Init and Invoke use GetState and PutState to read and write key-value pairs.
- It must be installed on peers, approved by organisations and committed to a channel before use.
- It is executed by endorsing peers, and its result is validated later at commit.
Writing smart contract using Ethereum
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. <mark>A smart contract is self-executing code stored on the blockchain that enforces an agreement automatically when its conditions are met.</mark>
Key points.
- On Ethereum, contracts are written in Solidity and compiled to bytecode that runs on the Ethereum Virtual Machine (EVM).
- Deployment is a transaction that gives the contract an address; users then invoke its functions by sending transactions to that address.
- Every operation costs gas, paid in ether, which stops infinite loops and pays miners.
- Example uses: tokens, crowdfunding, voting and escrow.
contract Store { uint x; function set(uint v) public { x = v; } }
Asked: [7 marks] (May 2024) What is a smart contract and how is it used in the Ethereum blockchain?
Overview of Ripple and Corda
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Ripple is a real-time gross settlement and payment network with the XRP token, and Corda is an R3 permissioned distributed ledger for financial agreements.
Key points.
- Ripple uses the XRP Ledger consensus protocol among trusted validators, not mining, so settlement takes seconds at low cost.
- Ripple targets cross-border payments: faster, cheaper settlement between banks without correspondent intermediaries.
- Corda shares data only between parties to a deal, with no global broadcast, and uses notary nodes for consensus and uniqueness.
- Corda contracts (CorDapps) are written in Kotlin or Java.
Last-minute revision
- Fabric: permissioned, modular, peers + orderers + channels + chaincode, MSP identities.
- Flow: execute (endorse), order, validate, commit.
- Fabric uses Raft ordering, no mining, no mandatory coin.
- Channel = private ledger for member organisations.
- Endorsement policy states which organisations must sign.
- Validation checks signatures, unspent inputs and MVCC versions.
- KYC = verify customer identity once, share through ledger.
- Bitcoin reward halves every 210,000 blocks; supply cap 21 million.
- Smart contract = self-executing code; Ethereum uses Solidity, EVM and gas.
- Ripple = XRP payments consensus; Corda = notary, need-to-know sharing.
Memory hooks
- Fabric flow: "E-O-V" = Execute, Order, Validate.
- MSP = "Who are you?"; Channel = "Who may see?"; Policy = "Who must sign?".
- Gas = fuel for the EVM.
- Ripple = Real-time payments; Corda = Confidential deals.
Coverage checklist
- Hyperledger Fabric- Architecture: May 2022 short notes (Fabric), May 2024 comparison.
- Identities and Policies: no past questions.
- Membership and Access Control: no past questions.
- Channels: no past questions.
- Transaction Validation: May 2024 any three terms (validation, KYC, crypto currency, creation of coin).
- Writing smart contract using Hyperledger Fabric: no past questions.
- Writing smart contract using Ethereum: May 2024 smart contract in Ethereum.
- Overview of Ripple and Corda: May 2022 short notes (Ripple and Corda, cross border payments).