BC6: Choosing a ledger: public, permissioned, or an ordinary database
Public chains and layer 2 networks
🎯You'll be able to
Weigh the strengths and costs of building on a public chain or a layer 2 network.
🏠The everyday picture
A public road: anyone may use it, nobody needs permission, and everyone can see who drives by. Tolls vary with traffic.
📘What it really is
- Open: anyone can read, send transactions and run a node. No single party can block a valid transaction for long.
- Verifiable by all: outsiders can check the record without asking anyone.
-
Costs: every write pays a fee that changes with demand (BC5). Layer 2 networks lower fees, with different security assumptions and, for some, a central sequencer that orders transactions.
-
Privacy: everything is public by default. Addresses can be linked to people. Personal data has to stay off-chain.
- Speed and finality: blocks every few seconds; finality in minutes on Ethereum, faster on some layer 2 networks.
- Regulation: tokens and payments may fall under financial rules in many countries. Get advice before handling real money.
📝A worked example
Input: a federation wants members' certificates to be checkable by anyone, for years, without the federation's website.
Steps:
- Store a hash of each certificate (not the certificate) on a public chain or a layer 2 network.
- Give each member their certificate file; anyone can hash it and look up the hash.
- Fees are paid once per batch if many hashes go into one Merkle root (BC1).
Expected output: public checking, no personal data on-chain, and low cost per certificate.
🌍Where it's used
- Stablecoin payments on public chains and layer 2 networks.
- Public registries of hashes and timestamps.
- Open finance applications.
📝Case scenario
A university put graduates' full names and degrees in a public contract so employers could check them. Graduates who wanted their records corrected or kept private couldn't remove them. A later version stored only a Merkle root per year, with each graduate holding their own proof.
🖱️Try it
List two benefits and two costs of putting SakhiKosh's fund on a public chain. Success: at least one cost is about privacy and one about fees or regulation.
⚠️Common mistakes
- Personal data on a public chain. Sign: names or phone numbers in contracts. Fix: hashes and IDs only.
- Assuming fees stay low. Sign: costs planned at today's prices. Fix: plan for busy periods.
- Ignoring rules about money. Sign: real funds with no advice. Fix: legal advice before real money.
🛠️For your project
The kit runs on a practice network with test ether. The capstone's design notes compare a public network with a permissioned one.
✅Quick check
What can outsiders do with a public chain that they can't with a private database?
Show the answer
Check the record themselves, without asking the operator.
Why should personal data stay off a public chain?
Show the answer
Everyone can read it, and it can't be removed later.
