Bitcoin — From Zero to Blockchain
Welcome to Sri Lanka's most comprehensive and cyberpunk-themed Bitcoin educational experience. This is an exclusive free opportunity provided exclusively by Crypto Raviya to empower our community. This masterclass is designed to take you from absolute beginner to Blockchain expert in 20 strategic steps. Dive into the core mechanics of decentralization, cryptography, and the future of digital finance.
20-Step Curriculum
Master everything from the Genesis Block to Complex UTXO models.
Verified Certification
Earn Gold, Silver, or Platinum tier certificates based on your final evaluation score.
Expert Insights
Learn strategies and foundational truths directly from the Crypto Raviya brand.
1. මුදල් (Money) යනු කුමක්ද?
මුදල් යනු මිනිස් සංස්කෘතියේ සහ ආර්ථික පද්ධතියේ පදනමයි. යම් සමාජයක භාණ්ඩ හා සේවා හුවමාරු කර ගැනීමට, වටිනාකම් මැනීමට සහ ගබඩා කර තබා ගැනීමට පොදුවේ පිළිගන්නා ඕනෑම මාධ්යයක් මුදල් ලෙස හැඳින්විය හැක.
Bitcoin ගැන කතා කරන්න කලින් "මුදල්" කියන්නේ මොකක්ද කියලා තේරුම් ගන්න ඕන. ඉස්සර කාලේ භාණ්ඩ හුවමාරුව (Barter system) භාවිතා වුණාට, පස්සේ කාලෙක රත්රන්, කාසි, සහ අද අපි පාවිච්චි කරන කඩදාසි මුදල් (Fiat money) ආවා.
මුදල්වල විකාශනය දෙස බැලීමේදී, පැරණි භාණ්ඩ හුවමාරු ක්රමයේ (Barter System) තිබූ ප්රධාන ගැටලුව වූයේ "Coincidence of Wants" හෙවත් දෙපාර්ශවයේම අවශ්යතා එකිනෙකට совපත වීම අනිවාර්ය වීමයි. උදාහරණයක් ලෙස, සහල් ඇති අයෙකුට එළවළු අවශ්ය වූ විට, එළවළු ඇති සහ සහල් අවශ්ය අයෙකුම සොයා ගැනීමට සිදු විය. මෙම අපහසුතාව මගහැරීමට කවච, ලුණු, රත්රන් සහ රිදී වැනි වටිනා දේවල් පොදු මාධ්ය ලෙස භාවිතයට ආ අතර, පසුව මහජන විශ්වාසය සහ රජයන්ගේ මැදිහත්වීම මත පදනම් වූ Fiat Currency (කඩදාසි මුදල්) බිහි විය.
සාර්ථක මුදල් ඒකකයකට පහත ලක්ෂණ තිබිය යුතුයි:
- Scarcity (හිඟකම) - ඕනෑවට වඩා තිබුණොත් වටිනාකමක් නැහැ.
- Durability (කල්පැවැත්ම) - ඉක්මනින් විනාශ වෙන්න බැහැ.
- Portability (පහසුවෙන් ගෙන යා හැකි බව) - තැනින් තැනට ගෙනියන්න පහසු වෙන්න ඕන.
- Divisibility (බෙදිය හැකි බව) - කුඩා කොටස් වලට කඩන්න පුළුවන් වෙන්න ඕන.
- Fungibility (එකිනෙකට ආදේශ කළ හැකි බව) - එකම වර්ගයේ එකම අගයක් ඇති ඕනෑම ඒකක දෙකක් අතර වෙනසක් නොතිබිය යුතුය. (උදාහරණයක් ලෙස මගේ ළඟ ඇති රුපියල් 100 නෝට්ටුවත් ඔබේ ළඟ ඇති රුපියල් 100 නෝට්ටුවත් එකම වටිනාකමකින් යුක්ත වේ.)
- Verifiability (සත්යතාව තහවුරු කළ හැකි බව) - ව්යාජ නෝට්ටු හෝ කාසි පහසුවෙන් හඳුනාගත හැකි විය යුතුය.
- Acceptability (සාධාරණ පිළිගැනීම) - ගනුදෙනු සඳහා බොහෝ දෙනා විසින් එකඟතාවයෙන් පිළිගත යුතුය.
මුදලක් ප්රධාන කාර්යයන් 3ක් ඉටු කරයි:
1. Medium of Exchange: ගනුදෙනු කිරීමේ මාධ්යයක් ලෙස ක්රියා කිරීම.
2. Unit of Account: භාණ්ඩ හා සේවාවල වටිනාකම මැනිය හැකි ඒකකයක් වීම.
3. Store of Value: අනාගත ප්රයෝජනය සඳහා වටිනාකම එකතු කර තබා ගැනීමට හැකි
වීම.
ආණ්ඩුවකට ඕනෑ තරම් රුපියල් ප්රින්ට් කරන්න පුළුවන් (Inflate). මේ නිසා සල්ලි වල වටිනාකම අඩු වෙනවා. නමුත් Bitcoin වලට Mathematics වලින්ම Limit එකක් දීලා තියෙනවා (21 Million). මේ නිසා Bitcoin කියන්නේ Hard Money (ශක්තිමත් මුදල්) වර්ගයක්.
වැඩිදුර පැහැදිලි කිරීමක් ලෙස, Fiat Money යනු මධ්යම බැංකු මගින් පාලනය වන සහ රජයේ නීතිමය නියෝග මත වටිනාකම ලබන මුදල් වර්ග වේ. උද්රමණය (Inflation) නිසා කාලයත් සමඟ Fiat Money වල ගනුදෙනු බලය (Purchasing Power) පහත වැටේ. නමුත් Bitcoin හි කේතය (Code) තුළම උපරිම සැපයුම නිකුත් වන වේගය සහ සීමාව ලියා ඇති බැවින්, කිසිදු මධ්යම ආයතනයකට හෝ රජයකට හිතුමනාපයේ අලුතින් Bitcoin නිර්මාණය කළ නොහැක.
1. What is Money?
Money is the foundation of human civilization and economic systems. Any medium generally accepted within a society for exchanging goods and services, measuring value, and storing wealth can be defined as money.
Before diving into Bitcoin, it is essential to understand what "money" truly is. In ancient times, the Barter System was utilized. Later, precious commodities like shells, salt, gold, silver, and modern paper fiat currency emerged.
Examining the evolution of money reveals that the primary challenge of the Barter System was the "Coincidence of Wants" — both parties had to simultaneously desire what the other offered. To overcome this limitation, durable and scarce commodities like gold were adopted, eventually leading to government-backed Fiat Currency based on legal tender laws and central authority trust.
A successful currency must possess the following core characteristics:
- Scarcity - If an item is in infinite supply, it loses its economic value.
- Durability - Must withstand wear and tear over time without decaying.
- Portability - Must be easy to transport and store across distances.
- Divisibility - Must be divisible into smaller fractional denominations.
- Fungibility - Each unit must be interchangeable and equivalent in value (e.g., any 100-rupee note equals another 100-rupee note).
- Verifiability - Must be simple and reliable to authenticate and detect counterfeits.
- Acceptability - Widely recognized and accepted by the economic community.
Money serves three fundamental functions:
1. Medium of Exchange: Facilitates frictionless trade and transactions.
2. Unit of Account: Provides a standard numeric measure for valuing goods and services.
3. Store of Value: Preserves purchasing power reliably into the future.
Governments and central banks can inflate fiat currency by printing unlimited supply, which erodes purchasing power over time. In contrast, Bitcoin's maximum supply is strictly capped by mathematics at 21 Million coins, making it the hardest form of sound money ever created.
Fiat money derives value from governmental decree and central bank authority. Due to ongoing inflation, purchasing power diminishes over decades. Because Bitcoin's issuance rate and supply cap are immutable in code, no government or institution can arbitrarily dilute its value.
2. Cypherpunks සහ මුල් කාලීන Digital Money
ඩිජිටල් මුදල් පද්ධති සහ රහස්යතාව ආරක්ෂා කරන ගුප්තකේතන විද්යාවේ (Cryptography) ඉතිහාසය දශක ගණනාවක් ඈතට දිව යන්නකි. විසිවන සියවසේ අගභාගයේදී අන්තර්ජාලයේ දියුණුවත් සමඟ පුද්ගලිකත්වය, නිදහස සහ විමධ්යගතකරණය අගය කළ බුද්ධිමතුන් පිරිසක් එකතු වී මෙම තාක්ෂණික විප්ලවයට මුල පිරූහ.
Bitcoin කියන්නේ එකපාරටම අහසින් කඩාපාත් වුණු දෙයක් නෙවෙයි. 1990 ගණන් වල ඉඳන් "Cypherpunks" කියන cryptography විශේෂඥයින් කණ්ඩායමක් උත්සාහ කළා රජයේ පාලනයෙන් තොර digital මුදල් ක්රමයක් හදන්න.
Cypherpunk ව්යාපාරය (Cypherpunk Movement) යනු ප්රධාන වශයෙන් Cryptographic Mailing List එකක් හරහා එකිනෙකා හා සම්බන්ධ වූ ක්රමලේඛකයින් (Programmers), ගණිතඥයින් සහ පෞද්ගලිකත්ව ක්රියාකාරීන්ගේ එකතුවකි. ඔවුන්ගේ ප්රධාන අරමුණ වූයේ රාජ්ය හෝ ආයතනික නිරීක්ෂණයන්ගෙන් තොරව, අන්තර්ජාලය තුළ පුද්ගලිකත්වය සුරකින ඩිජිටල් සන්නිවේදන සහ මුල්ය මෙවලම් ගොඩනැගීමයි. Eric Hughes විසින් 1993 දී ලියන ලද "A Cypherpunk's Manifesto" හි සඳහන් වන්නේ "Privacy is necessary for an open society in the electronic age" යන්නයි.
මේ වෙනුවෙන් ආපු මුල් project කිහිපයක්:
- DigiCash (1989) - David Chaum ගේ නිර්මාණයක්. පෞද්ගලිකත්වය (Privacy) තිබුණත් මේක Centralized සමාගමක් මත යැපුණා.
- Hashcash (1997) - Adam Back ගේ නිර්මාණයක්. Spam emails නතර කරන්න Proof-of-Work පාවිච්චි කළා. (Bitcoin mining වලට මූලික වුණේ මේකයි).
- B-money (1998) - Wei Dai විසින් යෝජනා කළ Decentralized money ක්රමයක්.
- Bit Gold (1998) - Nick Szabo විසින් නිර්මාණය කළා. මේකත් Bitcoin වලට ගොඩක් සමානයි.
- eCash / Blind Signatures - David Chaum විසින් ඉදිරිපත් කළ Blind Signature සංකල්පය මගින් ගනුදෙනුකරුවන්ගේ අනන්යතාවය බැංකුවට පවා සඟවා ගනුදෙනු කිරීමට මග පෑදීය.
- Reusable Proofs of Work (RPOW - 2004) - Hal Finney විසින් Hashcash සංකල්පය තවත් දියුණු කරමින් හඳුන්වා දුන් පද්ධතියකි.
මෙම සෑම තාක්ෂණික පරීක්ෂණයක්ම Bitcoin නිර්මාණය වීමට අවශ්ය විවිධ තාක්ෂණික කොටස් එකිනෙක සම්පූර්ණ කිරීමට උපකාරී විය. Hashcash මගින් Proof-of-Work ද, B-money සහ Bit Gold මගින් විමධ්යගත ලෙජර සංකල්පය ද, Cryptography මගින් Public/Private key ආරක්ෂණය ද විකාශනය විය.
මේ හැම project එකක්ම fail වුණේ එක ප්රධාන ප්රශ්නයක් නිසා. ඒ තමයි "Double-Spending Problem" එකට Central Authority එකක් නැතුව විසඳුමක් හොයාගන්න බැරි වීම.
ඩිජිටල් ගොනුවක් (Digital File) ඕනෑම අයෙකුට Copy/Paste කර නැවත නැවත භාවිත කළ හැක. ඩිජිටල් මුදල් ඒකකයකදී එකම මුදල දෙදෙනෙකුටම එකවර යැවීම වැළැක්වීමට (Double-Spending) සාම්ප්රදායික පද්ධතිවල මධ්යගත බැංකුවක් හෝ Server එකක් අවශ්ය විය. මධ්යගත Server එකක් ඇති විට එය වසා දැමීමට, නීතිමය බාධා පැමිණවීමට හෝ ප්රහාරයන්ට ලක්වීමට ඇති ඉඩකඩ වැඩි නිසා ඒ සියලු පද්ධති අසාර්ථක විය. Satoshi Nakamoto විසින් Blockchain සහ Consensus Algorithm එකතු කරමින් මෙම Double-Spending ප්රශ්නය මධ්යගත ආයතනයක් නැතුව විසඳන තෙක් සාර්ථක Decentralized Digital Money එකක් සෑදීමට කිසිවෙකුට නොහැකි විය.
2. Cypherpunks & Early Digital Money
Long before Bitcoin was created, visionary cryptographers and computer scientists known as Cypherpunks laid the intellectual and technical groundwork for decentralized digital currency.
In 1993, mathematician and activist Eric Hughes published the historic Cypherpunk Manifesto, declaring: "Privacy is necessary for an open society in the electronic age... We cannot expect governments, corporations, or other large, faceless organizations to grant us privacy out of their beneficence."
Key pioneer projects and breakthroughs before Bitcoin include:
- DigiCash (1989): Created by David Chaum, DigiCash invented "Blind Signatures" for untraceable cryptographic payments. However, it relied on a centralized company and servers, which caused the project to fail when the firm went bankrupt in 1998.
- E-Gold (1996): A digital currency backed by physical gold held in vaults. Despite processing billions in volume, centralized custody allowed authorities to shut it down in 2009.
- Hashcash (1997): Invented by Dr. Adam Back, Hashcash introduced Proof-of-Work to throttle email spam and DoS attacks by requiring computational work. This exact concept became the core of Bitcoin mining.
- B-Money (1998): Proposed by Wei Dai, an anonymous, distributed electronic cash system using public-key cryptography.
- Bit Gold (1998): Designed by Nick Szabo, introducing unforgeable Proof-of-Work strings to create digital scarcity, closely anticipating Bitcoin's architecture.
Every previous attempt relied on a Single Point of Failure: centralized servers, companies, or founders that could be targeted, legally seized, corrupted, or pressured by governments. Bitcoin solved this by eliminating the central server entirely through peer-to-peer decentralized consensus.
3. Bitcoin වලට කලින් වැදගත් Ideas
Bitcoin යනු හුදෙක් එක් නව නිපැයුමක් පමණක් නොව, දශක ගණනාවක් පුරා පරිගණක විද්යාව, ගුප්තකේතන විද්යාව (Cryptography) සහ ජාලකරණය (Networking) තුළ සිදු වූ ප්රධාන තාක්ෂණික සොයාගැනීම් කිහිපයක එකතුවකි.
Bitcoin එක නිර්මාණය කරන්න කලින් තිබුණු ප්රධාන තාක්ෂණයන් කිහිපයක් Satoshi Nakamoto ඉතාම දක්ෂ විදිහට එකතු කළා.
Bitcoin පද්ධතියේ ක්රියාකාරීත්වයට පදනම් වූ මූලික තාක්ෂණික මූලධර්ම සහ සංකල්ප පහත පරිදි පැහැදිලි කළ හැක:
- Public-Key Cryptography - කෙනෙක්ගේ අනන්යතාවය ඔප්පු කරන්න (Public & Private Keys).
- Hash Functions (SHA-256) - Data වලට unique digital fingerprint එකක් දෙන්න.
- Peer-to-Peer (P2P) Networks - BitTorrent වගේ central server එකක් නැතුව පරිගණක එකිනෙක සම්බන්ධ වෙන්න.
- Merkle Trees (Hash Trees) - බ්ලොක් එකක් තුළ ඇති දහස් ගණනක් ගනුදෙනු කාර්යක්ෂමව සහ ආරක්ෂිතව සත්යාපනය (Verify) කිරීමට භාවිතා කරන දත්ත ව්යුහයකි.
- Digital Signatures - Private Key එක භාවිතයෙන් ගනුදෙනුවක් අත්සන් කර, එය හිමිකරු විසින්ම සිදු කළ බව ජාලයේ ඕනෑම අයෙකුට Public Key එක හරහා තහවුරු කර ගැනීමට ඉඩ සලසයි.
- Timestamps & Linked Data Structures - Stuart Haber සහ W. Scott Stornetta විසින් හඳුන්වා දුන්, දත්ත වෙනස් කළ නොහැකි පරිදි (Immutably) කාල රාමුවකට අනුව එකිනෙක අමුණා තැබීමේ තාක්ෂණය.
Satoshi Nakamoto විසින් කරන ලද විප්ලවීය කාර්යය වූයේ මෙම පවතින තාක්ෂණයන් වෙන වෙනම තබන්නේ නැතිව, Economic Incentives (ආර්ථික දිරිගැන්වීම්) සහ Proof-of-Work Consensus එකක් සමඟ මුසුකර ප්රථම වරට සාර්ථක Self-Sustaining Decentralized Network එකක් නිර්මාණය කිරීමයි.
3. Pre-Bitcoin Foundations & Cryptography
Bitcoin was not created in isolation. Instead, Satoshi Nakamoto masterfully synthesized three pre-existing, battle-tested technologies into a harmonious decentralized system:
- Cryptographic Hash Functions (SHA-256): Converts any arbitrary data into a fixed 256-bit (64 hex characters) digital fingerprint. Hashes are deterministic, irreversible (one-way), and highly sensitive (Avalanche Effect: changing one character changes the entire hash).
- Asymmetric Public-Key Cryptography (ECDSA): Generates a mathematically linked Key Pair: a Private Key kept secret to create digital signatures, and a Public Key shared openly to verify authenticity.
- Peer-to-Peer (P2P) Networking: Inspired by Napster, Gnutella, and BitTorrent, all network participants connect directly to each other without central servers or routers.
ඕනෑම text එකක් type කරන්න. එයට අදාළ SHA-256 Hash එක live generate වන ආකාරය බලන්න. Type any text below to observe how its SHA-256 cryptographic hash is generated live in real time.
4. Bitcoin Whitepaper — 2008
2008 වසරේ පැවැති ගෝලීය මූල්ය අර්බුදය (Global Financial Crisis) අතරතුර, සාම්ප්රදායික බැංකු පද්ධතිය කෙරෙහි පැවැති විශ්වාසය බිඳ වැටෙමින් තිබූ මොහොතක, විප්ලවීය තාක්ෂණික ලේඛනයක් එළිදක්වන ලදී.
📅 October 31, 2008
Satoshi Nakamoto කියන අන්වර්ථ නාමයෙන් හිටපු කෙනෙක් (හෝ කණ්ඩායමක්) "Cryptography Mailing List" එකට email එකක් යැව්වා. ඒකෙ title එක වුණේ:
මේ Whitepaper එකේ පිටු 9ක් ඇතුළත, අර කලින් කිව්ව "Double-Spending" ප්රශ්නයට central authority (බැංකුවක්) නැතුව විසඳුමක් දෙන විදිහ පැහැදිලි කරලා තිබුණා.
Whitepaper එක මගින් ඉදිරිපත් කළ ප්රධාන අංශ සහ තාක්ෂණික විසඳුම් කිහිපයක් පහත පරිදි වේ:
- Rejection of Trusted Third Parties: ගනුදෙනු තහවුරු කිරීමට මැදිහත් වන තෙවන පාර්ශවීය බැංකු හෝ මධ්යම ආයතන ඉවත් කර, ඒ වෙනුවට ගණිතමය සහ ගුප්තකේතන සාක්ෂි (Cryptographic Proof) මත පදනම් වූ පද්ධතියක් හඳුන්වා දීම.
- Proof-of-Work Architecture: ජාලයේ නෝඩ් (Nodes) අතර පොදු එකඟතාවයක් (Consensus) ඇති කර ගැනීමට සහ බ්ලොක් එකතු කිරීමේදී සිදුවිය හැකි වංචා වැළැක්වීමට Proof-of-Work පද්ධතිය යොදා ගැනීම.
- Incentive Mechanism: ජාලයේ ආරක්ෂාව වෙනුවෙන් පරිගණක බලය කැපකරන Miner වරුන්ට අලුතින් නිකුත් වන Bitcoin සහ Transaction Fees ප්රතිලාභ ලෙස ලබා දීම.
- Privacy Model: ගනුදෙනුකරුවන්ගේ සැබෑ නම් සහ අනන්යතාවයන් වෙනුවට Public Keys (Pseudonymity) භාවිත කිරීමෙන් පෞද්ගලිකත්වය සුරැකීම.
මේක තමයි ලෝකයේ මූල්ය පද්ධතිය වෙනස් කරපු ලියවිල්ල. Bitcoin protocol එකේ constitution එක විදිහට සලකන්නේ මේ Whitepaper එකයි.
අදටත් bitcoin.org වෙබ් අඩවියෙන් නොමිලේ බාගත කරගත හැකි මෙම පිටු 9යක ලේඛනය, පරිගණක විද්යාව සහ ආර්ථික විද්යාව මුසු වූ විශිෂ්ටතම තාක්ෂණික මගපෙන්වීමක් (Technical Blueprint) ලෙස මුළු ලෝකයම පිළිගනී.
4. The Bitcoin Whitepaper (2008)
Amidst the chaos of the 2008 Global Financial Crisis — triggered by reckless mortgage lending, bank insolvencies, and emergency multi-billion-dollar government bailouts — an anonymous cryptographer using the pseudonym Satoshi Nakamoto published an academic paper that would change economic history.
On 📅 October 31, 2008, Satoshi sent an email to the Cryptography Mailing List (metzdowd.com) entitled:
"I've been working on a new electronic cash system that's fully peer-to-peer, with no trusted third party."
The 9-page whitepaper, titled "Bitcoin: A Peer-to-Peer Electronic Cash System", solved computer science's greatest unsolved puzzle: how to achieve consensus on the state of a digital ledger without relying on a central authority or clearinghouse.
- Trust Minimization: Replaced trusted financial intermediaries with cryptographic proof.
- Decentralized Timestamp Server: Implemented Proof-of-Work to order transactions chronologically.
- Censorship Resistance: Anyone can transact freely across borders without permission or accounts.
5. Double Spending Problem එක
ඩිජිටල් මුදල් පද්ධතියක් නිර්මාණය කිරීමේදී මුහුණ දීමට සිදු වන විශාලතම සහ සංකීර්ණතම තාක්ෂණික අභියෝගය වන්නේ Double-Spending එනම් එකම ඩිජිටල් මුදල් ඒකකය එකකට වැඩි වාර ගණනක් වියදම් කිරීමේ හැකියාවයි.
Digital file එකක් (උදා: MP3 එකක්, Photo එකක්) අපිට ලේසියෙන්ම Copy කරන්න පුළුවන්. ඒත් සල්ලි එහෙම copy කරන්න පුළුවන් වුණොත් මොකද වෙන්නේ?
භෞතික මුදල් (Physical Cash) භාවිතයේදී මෙම ප්රශ්නය පැන නොනගී. මන්ද ඔබ යමෙකුට රුපියල් 100 නෝට්ටුවක් ලබා දුන් පසු එය ඔබේ අතින් ඉවත් වී අනෙකා සතු වන බැවිනි. නමුත් ඩිජිටල් දත්ත සරලවම පිටපත් (Copy/Paste) කළ හැකි බැවින්, ඩිජිටල් මුදල් ඒකකයක් ව්යාජ ලෙස නැවත නැවත භාවිත කිරීම වැළැක්වීමට විශේෂ ආරක්ෂණ ක්රමවේදයක් අවශ්ය වේ.
මගෙ ගාව $100ක digital token එකක් තියෙනවා. මම ඒක Aliceටත් යවනවා, ඒ වෙලාවෙම ඒකම Bobටත් යවනවා.
බැංකුවක් තියෙනවා නම්, බැංකුව ඒක දැකලා එක transaction එකක් reject කරනවා. හැබැයි Bank එකක් නැති Peer-to-Peer network එකක කවුද මේක check කරන්නේ?
සාම්ප්රදායික ඩිජිටල් ගෙවීම් පද්ධතිවල (උදා: VISA, PayPal, හෝ බැංකු) මෙම ගැටලුව විසඳන්නේ මධ්යගත දත්ත ගබඩාවක් (Central Ledger) මගිනි. එහිදී බැංකුව විසින් ඔබේ ගිණුමේ ශේෂය පරීක්ෂා කර, ගනුදෙනුව අනුමත කර, ශේෂය අඩු කරයි. නමුත් මධ්යගත ආයතනයක් නැති P2P ජාලයක සෑම පරිගණකයකටම එකම වේලාවක වෙනස් ගනුදෙනු ලැබිය හැකි බැවින් නිවැරදි ගනුදෙනුව කුමක්දැයි තීරණය කිරීම ඉතා අසීරු විය.
Satoshi මේකට විසඳුම ගෙනාවේ Blockchain (Public Ledger) සහ Proof-of-Work Consensus කියන සංකල්ප හරහායි. මුළු network එකම එකඟ වෙනවා (Consensus) ඇත්තටම මුලින්ම ගියේ කාටද කියලා.
Bitcoin පද්ධතියේදී සියලුම ගනුදෙනු කාලානුක්රමිකව (Chronological Order) Cryptographic Timestamps සහිතව බ්ලොක් ලෙස සකස් කර ජාලය පුරා බෙදා හරිනු ලබයි. Proof-of-Work තාක්ෂණය මගින් එකම අරමුදල භාවිත කරමින් සිදු කරන දෙවන ගනුදෙනුව ජාලය විසින් ප්රතික්ෂේප කරනු ලබන අතර, දිගම බ්ලොක් චේන් එක (Longest Chain) එකම සත්ය ලෙජරය ලෙස මුළු ජාලයම පිළිගනී.
5. The Double Spending Problem
In the physical world, double spending is impossible with cash: if you hand a physical paper note to a merchant, you no longer possess it. However, digital files (documents, images, music) can be duplicated infinitely with Ctrl+C and Ctrl+V.
If digital money were simply a digital file, a fraudster could copy the same token and send it to multiple merchants simultaneously. This is the notorious Double Spending Problem.
Historically, the only solution was a trusted central intermediary (a bank or credit card processor like Visa or PayPal) maintaining a private, centralized database to debit and credit balances.
Instead of relying on a centralized bank, Bitcoin broadcasts every transaction to a global decentralized network. Transactions are bundled into chronological blocks secured by Proof-of-Work. Once confirmed inside the blockchain, reversing a transaction requires re-doing all computational work, making double spending practically and economically impossible.
6. Bitcoin Software Release (2009)
Bitcoin Whitepaper එක මගින් න්යායාත්මක සංකල්පය ඉදිරිපත් කිරීමෙන් පසුව, එය ප්රායෝගිකව ක්රියාත්මක වන සැබෑ පරිගණක පද්ධතියක් සහ මෘදුකාංගයක් බවට පත් කිරීමේ ඊළඟ වැදගත් පියවර තබන ලදී.
📅 January 8, 2009
Whitepaper එක publish කරලා මාස 2කට පස්සේ, Satoshi Nakamoto විසින් Bitcoin software එකේ පළමු version එක (v0.1.0) SourceForge හරහා open-source project එකක් විදිහට release කළා.
මේ මුල් software එක සම්පූර්ණයෙන්ම C++ වලින් ලියලා තිබුණේ, Windows operating system එකට විතරයි. මේකත් එක්කම ලෝකේ ඕනෑම කෙනෙක්ට තමන්ගේ පරිගණකයට මේ software එක දාගෙන Bitcoin Network එකේ කොටස්කරුවෙක් (Node එකක්) වෙන්න අවස්ථාව ලැබුණා.
Bitcoin v0.1.0 මෘදුකාංගයේ ප්රධාන ලක්ෂණ සහ තාක්ෂණික වැදගත්කම:
- Open-Source License: MIT Open Source බලපත්රය යටතේ කේතය (Source Code) නිකුත් කළ බැවින්, ලෝකයේ ඕනෑම අයෙකුට එය නොමිලේ පරීක්ෂා කිරීමට, වෙනස් කිරීමට සහ භාවිතා කිරීමට හැකියාව ලැබුණි.
- Built-in Mining & Wallet: මුල් මෘදුකාංගය තුළ ගනුදෙනු සිදු කිරීමට අවශ්ය Wallet එක මෙන්ම, සාමාන්ය පරිගණක Processor එකක් (CPU) හරහා Bitcoin Mining සිදු කිරීමේ පහසුකමද එකට අඩංගු වී තිබුණි.
- P2P Networking Engine: මධ්යම Server එකකින් තොරව වෙනත් පරිගණක (Peers) ස්වයංක්රීයව සොයාගෙන සම්බන්ධ වීමේ IRC-based node discovery පද්ධතියක් මෙහි අඩංගු විය.
- Evolution to Bitcoin Core: මෙම මුල් C++ මෘදුකාංගය පසුව "Bitcoin-Qt" ලෙසද, වර්තමානයේ විමධ්යගත ජාලයේ පදනම වන "Bitcoin Core" ලෙසද කාලයත් සමඟ පරිණාමය විය.
කිසිදු සමාගමක හෝ රජයක බලපත්රයකින් තොරව, විමධ්යගත අන්තර්ජාල මුදල් පද්ධතියක් සැබෑ ලෝකය තුළ සක්රියව ක්රියාත්මක වීම ආරම්භ වූයේ මෙම Software Release එකත් සමඟය.
6. Bitcoin Software Release (2009)
While the whitepaper outlined the theoretical and mathematical architecture, Satoshi Nakamoto understood that real-world implementation was necessary to prove the concept.
On 📅 January 9, 2009, Satoshi released the very first software version — Bitcoin v0.1.0 — hosted on SourceForge.
- Programming Language: Written primarily in C++ for extreme performance, low-level memory management, and high security.
- User Interface: Included an integrated GUI desktop application written with the wxWidgets framework, containing both an interactive wallet and a built-in CPU miner.
- Open Source License: Released under the permissive MIT Open Source License. The entire source code was made publicly available so anyone could audit, verify, and improve the software.
Today, the software is known as Bitcoin Core and is collaboratively maintained by a worldwide community of independent developers on GitHub.
7. Genesis Block (ආරම්භය)
📅 January 3, 2009
Bitcoin Network එකේ නිර්මාණය වුණු පළවෙනිම Block එකට කියන්නේ Genesis Block කියලා (Block Height 0).
මේක ඒ දවසේ UK වල පත්තරේක (The Times) තිබුණු ප්රධාන සිරස්තලයක් (Headline එකක්). Satoshi Nakamoto විසින් මේ Message එක Coinbase Transaction එක ඇතුළට Insert කළේ ප්රධාන හේතු 2ක් නිසා:
- Proof of Date (Timestamp Proof): මේ Block එක 2009 Jan 3 වෙනිදාට කලින් Pre-mine කරලා හංගලා තිබ්බේ නැහැ කියලා ලෝකෙටම ඔප්පු කරන්න (මක්නිසාද යත් ඒ නිව්ස් එක පළවුණේ ඒ දවසේ නිසා).
- Political & Economic Message: සම්ප්රදායික බැංකු පද්ධතියේ (Traditional Centralised Banking System) අසාර්ථකත්වයට සහ උද්ධමනයට එරෙහිව Decentralized, Trustless විකල්පයක් විදිහට Bitcoin නිර්මාණය කළ බව පෙන්වීමට.
7. The Genesis Block (Block 0)
📅 January 3, 2009 (18:15:05 UTC) marks the birth of the Bitcoin Blockchain. Satoshi Nakamoto personally mined Block 0, universally known as the Genesis Block.
The Genesis Block had several unique and historic attributes:
- 50 BTC Reward: The first coinbase transaction created 50 Bitcoins. Due to a quirk in the original code, this initial 50 BTC was not added to the global UTXO database and can never be spent.
- Hardcoded Block: Unlike all subsequent blocks which dynamically reference the previous block's hash, Block 0 had no predecessor (Prev Hash:
0000000000...00).
Inside the raw hex code of the Genesis Block's coinbase parameter, Satoshi permanently inscribed a famous headline from The Times of London:
This was not merely a proof of date; it stood as a powerful indictment of fractional reserve banking, reckless monetary inflation, and endless taxpayer-funded bailouts.
Intriguingly, Block 1 was not mined until January 9 — six days later. Cryptographers believe Satoshi deliberately took six days to reflect the Genesis creation metaphor and thoroughly test network stability before opening mining to the public.
8. Blockchain යනු කුමක්ද?
Blockchain එකක් කියන්නේ Decentralized & Distributed Public Ledger එකකට (පොදු ලෙජරයකට). සරලවම කිව්වොත්, Bitcoin Network එකේ සිදුවෙන සෑම ගනුදෙනුවක්ම (Transactions) නිවැරදිව සටහන් වෙන, වෙනස් කළ නොහැකි Digital පොතක්.
මේ පොතේ පිටු වලට අපි කියන්නේ "Blocks" කියලා. මේ Blocks එකිනෙකට සම්බන්ධ (Link) කරලා තියෙන්නේ Cryptographic Hash Functions හරහායි. ඒ නිසා එක Block එකක් අගට තවත් අලුත් Block එකක් එකතු වෙනවා මිසක් (Append-only database), කලින් ලියපු පරණ Data වෙනස් කරන්න හෝ Delete කරන්න (Immutability) කවදාවත් බැහැ.
8. What is Blockchain?
A Blockchain is an immutable, append-only, decentralized digital ledger distributed across a global network of computers. Every transaction that has ever occurred in Bitcoin is verified and recorded permanently.
The pages of this ledger are called "Blocks". Each block is cryptographically linked to the preceding block using its unique Prev Hash. This creates an unbroken chain of custody extending all the way back to the Genesis Block in 2009.
Because each block includes the hash of the previous block, modifying any past data changes that block's hash (Avalanche Effect). This immediately breaks the cryptographic links to every subsequent block, turning the entire chain invalid in the eyes of all network nodes.
ඔබ යම් Block එකක Data වෙනස් කළොත්, ඒ Block එකේ Hash එක සම්පූර්ණයෙන්ම වෙනස් වෙනවා (Avalanche Effect). එහි ප්රතිඵලයක් ලෙස ඊට පසුව ඇති සියලුම Blocks වල Prev Hash පරස්පර වී Chain එක කැඩෙනවා (Invalid/Red color වෙනවා).
If you modify data in any block, that block's hash changes completely (Avalanche Effect). Consequently, all subsequent blocks' Prev Hash fields conflict and the chain breaks (invalidated in red).
Block 1 (Genesis)
Block 2
9. Proof-of-Work (PoW)
Blockchain එකකට අලුත් Block එකක් Valid කරලා එකතු කරන්නේ කොහොමද? කවුද ඒක කරන්නේ? Decentralized Network එකක සැවොම එකඟතාවයකට එන්න (Consensus) පාවිච්චි කරන ප්රධාන Mechanism එක තමයි Proof of Work (PoW) කියන්නේ.
අලුත් Block එකක් Chain එකට ඇතුළත් කරන්න නම්, Miners ලාගේ Computers (ASIC Rig/Hardware) මගින් සංකීර්ණ Cryptographic Puzzle එකක් විසඳන්න ඕන. මේ Puzzle එක solve කරන්න සැලකිය යුතු Computational Power එකක් සහ විදුලියක් (Electricity) වැය වෙනවා.
- The Target Puzzle: අලුත් Block එකේ Final Hash Value එක Network Difficulty
එකට අදාළව නියමිත
Target Hashඑකට වඩා අඩු අගයක් විය යුතුයි (උදාහරණයක් ලෙස: Hash එක ඉදිරියෙන් '0' අංක 4ක් හෝ ඊට වැඩි ගණනකින් පටන් ගැනීම). - The Nonce (Number Used Once): SHA-256 Output එක Deterministic නිසා Data වෙනස් නොකර Hash එක වෙනස් කරන්න බැහැ. ඒ නිසා Miners ලා කරන්නේ Block Header එකට Nonce කියන Variable integer අගය එකතු කරමින් Zero (0) සිට බිලියන ගණනක් වාර වෙනස් කරමින් (Trial & Error) ගැලපෙන Hash එක හොයාගන්නා තෙක් Try කරන එකයි.
PoW නිසා Network එක Hack කිරීම හෝ 51% Attack එකක් කිරීම ආර්ථිකමය වශයෙන් සහ තාක්ෂණික වශයෙන් Practically Impossible වේ. මන්ද Hacker කෙනෙකුට මුළු Network එකේ ඇති Total Hashrate එකෙන් 51%කට වඩා තනිවම පාලනය කිරීමට සිදු වන බැවිනි.
9. Proof-of-Work (PoW)
How does a decentralized network agree on which transactions are valid without a central coordinator? The foundational mechanism that enables trustless global consensus is Proof-of-Work (PoW).
To add a new block to the blockchain, miners must solve a computationally intensive cryptographic puzzle using specialized hardware. Solving this puzzle requires real-world expenditure of computational power and electricity, providing an unforgeable anchor to physical reality.
- The Target Puzzle: The SHA-256 hash of the candidate block header must be strictly less than the network's current
Target Hash(manifesting as a required number of leading zeros). - The Nonce (Number Used Once): Because cryptographic hashes are deterministic and one-way, miners cannot reverse-engineer the solution. Instead, they increment an arbitrary integer variable called the Nonce billions of times per second (brute-force trial & error) until finding a hash that satisfies the target difficulty.
Because of PoW, reorganizing historical transactions or executing a 51% attack becomes economically and physically Practically Impossible, as an attacker would need to control more computational power than the honest collective majority of the entire global network.
Nonce අගය ස්වයංක්රීයව වෙනස් කරමින් "0000" න් ආරම්භ වන Hash එකක් සොයාගන්නා ආකාරය බලන්න. Find a hash starting with "0000" by guessing the Nonce value automatically.
10. Mining (පතල් කැණීම) කියන්නේ මොකක්ද?
Mining කියන්නේ Bitcoin Network එකේ අලුත් Valid Blocks නිර්මාණය කරමින් Blockchain එකට එකතු කිරීමේ සහ Network එක Secure කිරීමේ ක්රියාවලියයි. මේ සඳහා තමන්ගේ Compute Power එක (ASIC Hardware) කැපකරන පුද්ගලයින් හෝ ආයතන අපි Miners ලෙස හඳුන්වනවා.
Miner කෙනෙකුගේ ප්රධාන කාර්යභාරය පියවරෙන් පියවර:
- Network එකේ Broadcast වෙන Unconfirmed Transactions එකතු කිරීම (Mempool එකෙන්).
- ඒවා Validate කර Candidate Block එකක් (නොතහවුරු කළ Block එකක්) නිර්මාණය කිරීම.
- එම Block එක සඳහා Cryptographic Proof-of-Work (PoW) Puzzle එක විසඳීමට Target Hash එක සොයා Nonce එක වෙනස් කරමින් Mining ආරම්භ කිරීම.
- මුලින්ම නිවැරදි Valid Hash එක හොයාගන්නා Miner විසින් එම Block එක Network එකට Broadcast කර Consensus එක හරහා Blockchain එකට එකතු කිරීම.
මෙලෙස අධික Computations සහ Electricity වැයකරමින් මුලින්ම Valid Block එකක් සොයාගන්නා Miner හට Incentive (දිරිදීමනාවක්) ලෙස Network එකෙන් අලුතින්ම Print වන Bitcoins ලබා දෙනවා (මෙය Block Reward / Block Subsidy ලෙස හඳුන්වයි). ලෝකයට අලුතින් Bitcoins Mint වී එකතු වන එකම ක්රමයද මෙයයි.
මීට අමතරව, එම Block එක ඇතුළත් කරගත් සියලුම ගනුදෙනු වලින් එකතු වන Transaction Fees සමූහයද සම්පූර්ණයෙන්ම අදාළ Miner ට CoinBase Transaction එක හරහා හිමිවේ.
10. Mining & Block Rewards
Mining is the heartbeat of the Bitcoin network. It performs two indispensable functions simultaneously: securing transaction verification and releasing new coins into circulation through a provably fair launch.
Miners are economically incentivized through two reward components:
- Block Subsidy: Newly minted Bitcoin generated in the first transaction of each block (Coinbase Transaction).
- Transaction Fees: Small fees attached by users to prioritize their transactions into the next block.
To ensure blocks arrive reliably every 10 minutes regardless of how much computing power joins or leaves the network, Bitcoin features an automatic Difficulty Adjustment Algorithm. Every 2,016 blocks (roughly every two weeks), the network recalculates hash difficulty. If blocks arrived too quickly, difficulty increases; if too slowly, difficulty decreases.
11. Bitcoin Halving & Economics
Bitcoin වල මුළු සැපයුම (Total Hard Cap) නියත වශයෙන්ම මිලියන 21 කට (21 Million BTC) සීමා කර ඇත. Fiat Currencies මෙන් අසීමිතව මුදල් අච්චු ගැසීමට නොහැකි නිසා Bitcoin වලදී උද්ධමනය (Inflation) පාලනය වන අතර, Gold වල මෙන් සාපේක්ෂ හිඟකමක් (Programmatically Enforced Scarcity) නිර්මාණය වේ.
අලුතින් Bitcoins ලෝකයට එකතු වන්නේ Miners ලාට හිමිවන Block Reward (Block Subsidy) එක හරහා බව අපි ඉගෙන ගත්තෙමු. නමුත් මෙම Block Reward එක කාලයත් සමඟ ක්රමයෙන් අඩු වන සේ Code කර ඇත.
සෑම Blocks 210,000 කට වරක්ම (දළ වශයෙන් අවුරුදු 4 කට වරක්), Miners ලාට හිමිවන Block Reward එක හරියටම 50% කින් (අඩකින්) අඩු වේ. මේ ක්රියාවලිය Bitcoin Halving ලෙස හඳුන්වයි.
- 2009: 50 BTC per block
- 2012: 25 BTC per block
- 2016: 12.5 BTC per block
- 2020: 6.25 BTC per block
- 2024: 3.125 BTC per block
- 2028: 1.5625 BTC per block
- 2032: 0.78125 BTC per block
- 2040: 0.1953125 BTC per block
- 2036: 0.390625 BTC per block
- 2044: 0.09765625 BTC per block
- 2048: 0.048828125 BTC per block
- 2052: 0.0244140625 BTC per block
- 2056: 0.01220703125 BTC per block
- 2060: 0.006103515625 BTC per block
- 2064: 0.0030517578125 BTC per block
- 2068: 0.00152587890625 BTC per block
- 2072: 0.000762939453125 BTC per block
- 2076: 0.0003814697265625 BTC per block
- 2080: 0.00019073486328125 BTC per block
- 2084: 0.000095367431640625 BTC per block
- 2088: 0.0000476837158203125 BTC per block
- 2092: 0.00002384185791015625 BTC per block
- 2096: 0.000011920928955078125 BTC per block
- 2100: 0.0000059604644775390625 BTC per block
මෙම Halving Mechanism එක නිසා Bitcoin කාලයත් සමඟ Issuance Rate එක අඩුවන, Deflationary ස්වභාවයක් ගන්නා සාර්ථක Store of Value (SoV) Assets එකක් බවට පත්වේ. දළ වශයෙන් 2140 වන විට අවසාන 21 Million වෙනි Bitcoin එකත් Mint වී අවසන් වනු ඇත.
11. Bitcoin Halving & Economics
Unlike fiat currencies, which can be printed endlessly by central banks, Bitcoin's issuance schedule is mathematically hardcoded and strictly finite.
Every 210,000 blocks (approximately every 4 years), the block subsidy reward given to miners is cut exactly in half. This monumental event is called the Bitcoin Halving.
- 2009 Launch: 50 BTC per block
- 2012 First Halving: 25 BTC per block
- 2016 Second Halving: 12.5 BTC per block
- 2020 Third Halving: 6.25 BTC per block
- 2024 Fourth Halving: 3.125 BTC per block
Through this halving formula, total Bitcoin issuance asymptotically approaches the definitive limit of 21,000,000 BTC around the year 2140. After that, no new Bitcoins will ever be minted, and miners will be supported entirely by transaction fees.
12. Bitcoin Programming Languages & Script
බොහෝ දෙනෙක් සිතන්නේ Bitcoin යනු තනි Programming Language එකකින් ලියන ලද තනි Software Program එකක් ලෙසයි. නමුත් සැබවින්ම Bitcoin යනු open-source "Protocol" එකකි (නීති මාලාවකි). මෙම Consensus Rules සක්රීයව ක්රියාත්මක කරන (Implement කරන) Software Clients සහ Nodes ගණනාවක් පවතී.
Bitcoin Network එකේ බහුලවම භාවිත වන Reference Software Client එක වන්නේ Bitcoin
Core වේ. මෙය ඉහළ Performance, Memory Control සහ Efficiency එකක් සඳහා
C++ භාෂාවෙන් ලියා ඇත. (උදාහරණයක් ලෙස එහි Source Code එකෙහි
pow.cpp, block.cpp, chainparams.cpp වැනි C++ Source
Files දැකගත හැක).
C++ වලට අමතරව Bitcoin Protocol එක සහ Blockchain එක සමඟ Interact කිරීමට විවිධ Languages වලින් නිර්මාණය වූ Tools, Libraries සහ Node Implementations පවතී:
- Python - Core Functional Testing Scripts, Data Analysis සහ Scripting සඳහා.
- Rust, Go, C, Java, JavaScript/TypeScript, C# - alternative client implementations (උදා: btcd - Go, rust-bitcoin - Rust) සහ Web/Mobile Wallets, APIs නිර්මාණය සඳහා.
Bitcoin වල Transactions Valid කිරීමට සහ Smart Contracts ආකාරයේ Locking/Unlocking කොන්දේසි සැකසීමට භාවිත කරන්නේ Bitcoin Script නම් Stack-based Scripting Language එකයි. මෙය Python හෝ C++ වැනි General-Purpose "Turing Complete" භාෂාවක් නොවේ.
මෙය හිතාමතාම Loops (while, for) නැති, "Turing Incomplete" ලෙස සීමා
කළ Language එකකි. එමඟින් Infinite Loops නිර්මාණය වී Network එක Freeze වීම (Denial of Service
Attacks) වැළැක්වෙන අතර, "Spending Conditions" (කාටද coins වියදම් කළ හැක්කේ, කුමන කොන්දේසි
යටතේද යන්න) ඉතා Secure ලෙස Executable Logic එකක් ලෙස ලියා තැබීමට හැකි වේ.
12. Bitcoin Script & Smart Contracts
Contrary to popular belief, Bitcoin is not a static ledger. Every Bitcoin transaction is governed by a lightweight, stack-based programming language known as Bitcoin Script.
Script is intentionally designed to be Turing-Incomplete. Unlike general-purpose programming languages (like Solidity on Ethereum), Bitcoin Script deliberately excludes complex loops (for, while) and infinite recursion. This guarantees that every transaction can be verified in deterministic time, completely eliminating denial-of-service vulnerabilities and the halting problem.
Bitcoin Script enables sophisticated smart contracts, including Multisig (requiring 2-of-3 signatures to spend), Timelocks (preventing funds from moving until a specific date or block height), and Hash Time-Locked Contracts (HTLCs), which power the lightning-fast, second-layer Lightning Network.
13. The UTXO Model (Unspent Transaction Outputs)
සාමාන්ය බැංකු ගිණුමක (Account Model) සල්ලි තියෙන්නේ එක balance එකක් විදිහටයි (උදා: Account Balance = $500). ඒත් Bitcoin වැඩ කරන්නේ UTXO (Unspent Transaction Outputs) කියන වෙනස්ම ආකාරයේ Architecture එකකටයි.
Bitcoin වල account balances කියලා ජාතියක් නෑ. තියෙන්නේ ඔයාට වෙන අයගෙන් ලැබුණු, තාම වියදම් කරපු නැති "Bitcoin කෑලි" (UTXOs) විතරයි. ඔයාගේ Wallet balance එක ලෙස පෙන්නන්නේ ඔයාට අයිති මේ ඔක්කොම UTXO ටිකේ එකතුවයි.
ඔයාගේ Wallet එකේ 0.5 BTC UTXO එකකුයි, 0.7 BTC UTXO එකකුයි තියෙනවා (Total = 1.2 BTC).
ඔයාට Bob ට 1.0 BTC යවන්න ඕන නම්, Wallet එක මඟින් සිදු කරන්නේ:
- 0.5 සහ 0.7 UTXO දෙකම එකට එකතු කරනවා (Inputs).
- Bob ට 1.0 BTC UTXO එකක් හදලා යවනවා (Output 1).
- ඔයාටම ඉතුරු 0.2 BTC UTXO එක (Change / ඉතිරිය) ආපහු එවනවා (Output 2) - Transaction fee එක අඩු කළාට පසුව.
මේ නිසා Transaction එකක් සිදුවීමේදී පරණ UTXOs විනාශ (Consume) වී අලුත් UTXOs නිර්මාණය වීම සිදු වේ.
13. The UTXO Model
Traditional banks and smart-contract blockchains (like Ethereum) operate on an Account-Based Model, where each user has a single account with an incrementing or decrementing balance.
Bitcoin operates entirely differently using the UTXO Model (Unspent Transaction Outputs). Think of UTXOs like physical cash banknotes:
- If you have a $20 banknote and buy a $5 coffee, you cannot rip the note in pieces. You hand over the $20 bill, the merchant accepts $5, and gives you a $15 bill as change.
- Similarly, a Bitcoin transaction consumes existing UTXOs completely as Inputs and creates brand-new UTXOs as Outputs (one for the recipient, and one returning change to the sender).
- The difference between total Input value and Output value is claimed by the miner as the Transaction Fee.
14. Public & Private Keys (Cryptography)
Bitcoin account එකක හිමිකාරීත්වය (Ownership) ඔප්පු කරන්නේ Bank Username / Password එකකින් නෙවෙයි. ඒ සඳහා භාවිත කරන්නේ Asymmetric Cryptography (Public-Key Cryptography) තාක්ෂණයයි (විශේෂයෙන්ම ECDSA - Elliptic Curve Digital Signature Algorithm).
- Private Key: මෙය ඔයාගේ ATM PIN එක හෝ Password එක වගේ Secret Key එකක්. මේක දන්න කෙනාට තමයි අදාළ Bitcoin ටිකේ සම්පූර්ණ පාලනය හිමිවෙන්නේ. Private Key එකෙන් තමයි Transaction එකක් Broadcast කිරීමට පෙර එකට Digital Signature එක (අත්සන) යොදන්නේ. මෙය කිසිවෙකුටත් Share නොකළ යුතුය.
- Public Key & Address: Private Key එක භාවිතයෙන් One-way Mathematical Calculation එකක් හරහා Public Key එක නිර්මාණය වේ. එම Public Key එක Cryptographic Hashing වලට ලක්කිරීමෙන් ඔයාගේ Bitcoin Address එක නිර්මාණය වේ (Bank Account Number එක වගේ). ඕනෑම අයෙකුගෙන් Funds ලබාගැනීම සඳහා මෙම Address එක බියකින් තොරව ලබාදිය හැක.
ඔයා Binance හෝ KuCoin වගේ Centralized Exchange එකක Bitcoin තියාගෙන ඉන්නවා නම්, ඒ Wallet වල Private Keys පාලනය කරන්නේ ඔයා නෙවෙයි, Exchange එක විසිනි. ඒ කියන්නේ ඇත්තටම ඒ Bitcoin වල Custody එක තියෙන්නේ Exchange එකටයි. Exchange එක වෙනත් පාර්ශවයකට Hack වුවහොත් හෝ Shutdown වුවහොත් ඔයාගේ Funds අහිමි විය හැක.
එම නිසා තමන්ගේම Cold Wallet එකක හෝ Non-Custodial Software Wallet එකක (Self-Custody) Private Keys ආරක්ෂිතව තබා ගැනීම ඉතාමත් වැදගත් වේ.
14. Public & Private Keys
Ownership of Bitcoin is secured not by identities, usernames, or passwords, but through pure mathematics: Asymmetric Cryptography using the Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve.
- Private Key: A randomly generated 256-bit number. This secret key grants absolute spending control over associated funds. Anyone who knows your private key owns your Bitcoin.
- Public Key: Derived from the private key through one-way elliptic curve point multiplication (
P = k * G). It is mathematically impossible to reverse this calculation to find the private key. - Bitcoin Address: Derived by hashing the public key with SHA-256 and RIPEMD-160 (Hash160) followed by checksum encoding (Base58Check for legacy addresses, or Bech32 for modern SegWit addresses).
When spending Bitcoin, your wallet uses your Private Key to generate a unique digital signature. Any node on earth can instantly verify using your Public Key that the signature was created by the legitimate key holder without ever seeing your private key.
15. Wallets (පසුම්බි) ක්රියා කරන ආකාරය
ගොඩක් අය හිතන්නේ "Wallet එක ඇතුලේ තමයි Bitcoins තියෙන්නේ" කියලා. නමුත් එය සම්පූර්ණයෙන්ම වැරදි මතයකි. Bitcoins කවදාවත් ඔයාගේ Phone එකට, Laptop එකට හෝ Wallet App එක ඇතුලට ගබඩා වෙන්නේ නැත. Bitcoins පවතින්නේ Decentralized Blockchain Network එක තුළ පමණි.
එහෙනම් Bitcoin Wallet එකකින් සිදුවන්නේ කුමක්ද?
Bitcoin Wallet එකක් යනු සරලවම ඔයාගේ Private Keys (රහස්ය යතුරු) සුරක්ෂිතව කළමනාකරණය කරන Software එකක් (හෝ Hardware Device එකක්) වේ. Blockchain එකේ පවතින ඔයාගේ UTXOs අයිති කර ගැනීමට සහ ඒවා වෙනත් අයෙකුට Transfer කිරීම සඳහා Transactions වලට Digital Signature එක යෙදීමට මෙම Wallet එක මඟින් Private Keys භාවිතා කරයි.
අලුතෙන් Non-Custodial Wallet එකක් සකස් කිරීමේදී (Set up කිරීමේදී) ඔයාට වචන 12ක හෝ 24ක
ලැයිස්තුවක් ලබාදෙයි (උදා: apple brave tiger...). මෙය Cryptographic standard
එකක් (BIP-39) මත පදනම් වූ ඔයාගේ Master Key (Mnemonic Phrase) එක වේ.
ඔයාගේ Phone එක නැති වුවද හෝ Device එක Damage වුවද, මෙම Secret Seed Phrase එක පවති නම් වෙනත් ඕනෑම Standard Wallet Software එකක් හරහා ඔයාගේ සියලුම Private Keys සහ Bitcoin Funds යථා තත්ත්වයට (Restore) පත්කර ගත හැක. එම නිසා මෙම Seed Phrase එක Offline ලෙස කඩදාසියක සටහන් කර අන් අයට හමු නොවන පරිදි ඉතාමත් සුරක්ෂිතව තබා ගැනීම අනිවාර්ය වේ.
15. Wallets & Seed Phrases (BIP-39)
A common misconception is that crypto wallets store digital coins. In reality, Bitcoins always remain on the distributed blockchain. A wallet is simply a cryptographic key manager that securely stores your Private Keys and signs transactions.
- Hot Wallets: Software applications connected to the internet (desktop, mobile, browser extensions). Highly convenient for daily use, but susceptible to malware and online attacks.
- Cold Wallets (Hardware Wallets): Dedicated physical devices (such as Trezor or Ledger) that store private keys in an isolated secure element chip offline, signing transactions without ever exposing keys to an infected computer.
In 2013, the Bitcoin community adopted BIP-39, which converts complex raw 256-bit private keys into an easy-to-record list of 12 or 24 human-readable English words selected from a standardized 2,048-word dictionary. If your device is damaged, lost, or destroyed, entering this Seed Phrase into any BIP-39 compatible wallet instantly restores all your funds and transaction history.
16. Nodes (ජාලයේ පරිගණක)
Bitcoin කියන්නේ Peer-to-Peer network එකක්. මේ network එකට සම්බන්ධ වෙලා තියෙන හැම පරිගණකයකටම අපි Node එකක් කියලා කියනවා.
විශේෂයෙන් Full Node එකක් කියන්නේ මුළු Blockchain එකම (Genesis Block එකේ ඉඳන් අද වෙනකන් තියෙන හැම ගනුදෙනුවක්ම) Download කරගෙන තියාගෙන ඉන්න පරිගණකයකට වේ.
බොහෝ දෙනෙක්ට මේ දෙක පැටලෙනවා. මේවායේ වෙනස සරලව තේරුම් ගනිමු:
- Miners: මෙයාලා තමයි අර අමාරු Cryptographic Proof-of-Work puzzle එක විසඳලා අලුත් Blocks නිර්මාණය කරන්නේ (මේ සඳහා අධික Computational power එකක් සහ විදුලියක් වැයවේ).
- Full Nodes: මෙයාලා අලුත් Blocks හදන්නේ නැත. හැබැයි Miners ලා හදන අලුත් Blocks සහ Transactions ජාලයේ Consensus rules වලට අනුව නිවැරදිද කියලා Validate කරන්නේ මෙයාලයි. කවුරුහරි Invalid transaction එකක් (උදා: Double-spending හෝ නැති සල්ලි යවන්න) Block එකකට දාලා තිබුණොත්, Full Nodes මඟින් ඒ Block එක Reject කරනු ලබයි.
මේ නිසා Bitcoin Network එකේ ඇත්තම බලය තියෙන්නේ Miners ලට නෙවෙයි, ලෝකය පුරාම Decentralized විදිහට විසිරිලා තියෙන දහස් ගාණක් Full Nodes වලටයි.
16. Nodes vs Miners
Understanding the distinction between Nodes and Miners is crucial to comprehending Bitcoin's decentralized checks and balances:
- Full Nodes: Independent computers that maintain a complete copy of the blockchain and rigorously validate every block and transaction against consensus rules. Anyone with a budget laptop and basic internet can run a Full Node. Full Nodes do not receive rewards, but they grant sovereign verification without trusting third parties.
- Miners: Specialized operators using high-powered ASIC rigs that package valid transactions and race to find valid Proof-of-Work nonces to earn block rewards.
Miners propose new blocks, but Full Nodes hold ultimate sovereignty. Even if 100% of miners colluded to create an invalid block (e.g., granting themselves extra Bitcoin or breaking rules), every independent Full Node on earth would instantly reject the block as invalid. Full Nodes dictate the rules; miners must obey them.
17. Longest Chain Rule (දිගම දාමය)
Blockchain එකක් P2P Network එකක ක්රියාත්මක වන විට, සමහර අවස්ථාවල වෙනස් Miners ලා දෙදෙනෙකු එකම වෙලාවක Valid වෙනස් Blocks දෙකක් සොයා ගැනීමට ඉඩ ඇත. එම අවස්ථාවේදී Blockchain එක ශාඛා දෙකකට බෙදේ (Temporary Fork එකක් ඇති වේ).
මෙවැනි අවස්ථාවක Central Authority එකක් නොමැතිව Network එක එකඟතාවයට පැමිණෙන නිවැරදි Path එක තෝරා ගන්නේ කෙසේද? ඒ සඳහා Satoshi Nakamoto විසින් හඳුන්වා දුන් Consensus Mechanism එක වන්නේ Longest Chain Rule (Nakamoto Consensus) වේ.
ජාලය දෙකට බෙදුණු විට (Branch A සහ Branch B ලෙස), Network එකේ ඇති Nodes තමන්ට මුලින්ම ලැබුණු Block එක තබා ගනී. ඊළඟ Block එක සොයාගන්නා Miner එම Block එක තමන්ට ලැබුණු ශාඛාවට එකතු කරයි.
එවිට එම ශාඛාව අනික් ශාඛාවට වඩා දිගින් වැඩි වේ (Most Cumulative Proof-of-Work එකක් සහිත Chain එක බවට පත්වේ). මෙය දුටු සැණින් Network එකේ සිටින සියලුම Nodes "මෙයයි නිවැරදි Main Chain එක" ලෙස තීරණය කරයි. කෙටි වූ අනෙක් ශාඛාවේ තිබූ Blocks (Orphaned / Stale Blocks) අතහැර දමයි.
මෙම Mechanism එක නිසා කිසිදු Centralized Administrator කෙනෙකු නොමැතිව මුළු ලෝකය පුරාම ඇති Nodes සියල්ල එකම Single True Ledger එකක් ගැන Consensus එකකට පැමිණේ.
17. Forks & Consensus Upgrades
In decentralized open-source systems without central CEOs, software upgrades and rule changes are executed through Forks.
- Soft Fork (Backwards Compatible): A tightening of protocol rules. Older nodes that haven't updated still recognize newly mined blocks as valid (e.g., Segregated Witness in 2017, Taproot in 2021). Soft forks preserve unified network consensus seamlessly.
- Hard Fork (Backwards Incompatible): An expansion or relaxation of protocol rules. Old software cannot validate new blocks. If the entire community does not unanimously agree, the blockchain permanently splits into two separate competing networks and coins (e.g., the Bitcoin vs Bitcoin Cash split in 2017).
When temporary forks occur naturally (such as two miners discovering valid blocks at the exact same second), nodes temporarily track both branches. As soon as the next block is found on one branch, nodes automatically switch to the branch with the greatest cumulative Proof-of-Work (the "heaviest chain"), maintaining global ledger synchronization.
18. 51% Attack කියන්නේ මොකක්ද?
Proof-of-Work මත පදනම් වූ ඕනෑම Blockchain එකක ඇති විය හැකි ප්රධානම Security Threat එකක් වන්නේ 51% Attack ලෙස හඳුන්වන අවස්ථාවයි.
යම්කිසි එක් පුද්ගලයෙකුට, ආයතනයකට හෝ Mining Pool එකකට මුළු Bitcoin Network එකේ පවතින Total Hashrate (Computational Power) එකෙන් 51% කට වඩා (අර්ධයකට වඩා) පාලනය කිරීමට හැකි වුවහොත්, එමඟින් Network Consensus එක තමන්ට අවශ්ය පරිදි manipulate කිරීමට හැකියාව ලැබේ.
- Double-Spending: තමන් සිදු කළ ගනුදෙනු Reverse (ආපසු හරවා) කිරීම. (උදා: Exchange එකකට Bitcoin යවා Fiat Currency වලට Cash Out කරගත් පසු, අදාළ Transaction එක ඇතුළත් නොවූ වෙනත් Longer Secret Chain එකක් Broadcast කර Transaction එක අවලංගු කිරීම).
- Transaction Censorship: වෙනත් පරිශීලකයින්ගේ Transactions Block එකකට එකතු වීම සහ Confirm වීම හිතාමතාම නතර කිරීම (Block confirmation වැළැක්වීම).
What they CANNOT do:
51% Network Hashrate පාලනය කළද, වෙනත් අයගේ Wallets වලින් Cryptographic Private Keys නොමැතිව Coins හොරකම් කිරීමට හෝ Rules වලට පිටින් අලුතින් Bitcoins නිර්මාණය කිරීමට මෙන්ම පරණ Valid Blocks වෙනස් කිරීමට නොහැක (මොකද Digital Signatures සහ Cryptographic Rules වෙනස් කළ නොහැකි බැවිනි).
වර්තමානය වන විට Bitcoin Network එකෙහි Total Hashrate එක අධික ලෙස වර්ධනය වී ඇති නිසා, 51% Attack එකක් කිරීමට අවශ්ය ASIC Hardware සහ Electricity සඳහා ඩොලර් බිලියන ගණනක අතිවිශාල පිරිවැයක් වැය වේ. එම නිසා මෙය Bitcoin වලදී Practically Impossible සහ economically unviable ප්රහාරයකි.
18. 51% Attack & Security
A 51% Attack is a theoretical vulnerability in Proof-of-Work systems where a malicious entity controls more than half of the network's total mining hash power.
CANNOT DO: An attacker cannot steal other users' coins (requires private keys they don't have), cannot forge digital signatures, cannot change the 21M supply cap, and cannot create invalid transactions. Any invalid block will be rejected by Full Nodes.
CAN DO: An attacker could temporarily reorganize recent blocks to double-spend their own transactions or censor and delay certain transactions.
Because Bitcoin's global hashrate is backed by millions of specialized ASIC computers consuming gigawatts of energy, acquiring 51% hash power would cost tens of billions of dollars. Furthermore, economic game theory ensures that any entity with that much power would earn vastly more profit by mining honestly than by attacking an asset they spent billions to conquer.
19. Bitcoin වල පරිණාමය (Timeline)
2009 වසරේ Satoshi Nakamoto විසින් Genesis Block එක නිර්මාණය කළ දවසේ සිට අද දක්වා Bitcoin ආගමනය තාක්ෂණික සහ ආර්ථිකමය වශයෙන් වැදගත් සිදුවීම් ගණනාවකින් සමන්විත වේ.
Bitcoin Pizza Day (2010)
Laszlo Hanyecz නම් Programmer විසින් Papa John's පීසා දෙකක් මිලදී ගැනීමට Bitcoin 10,000 ක් ගෙවන ලදී. මෙය Real-world commercial transaction එකක් සඳහා Bitcoin භාවිතා කළ ප්රථම අවස්ථාව වේ.
Silk Road Period (2011)
Dark web Marketplace එකක් වූ Silk Road හි ගනුදෙනු සඳහා Bitcoin බහුලව භාවිතා වීම ආරම්භ විය. මෙය Bitcoin වලට සෘණාත්මක ප්රචාරයක් ලබා දුන්නද, Network එකෙහි Uncensorable සහ Peer-to-Peer ස්වභාවය ප්රායෝගිකව තහවුරු විය.
Mt. Gox Hack (2013-2014)
එවකට පැවති විශාලතම Crypto Exchange එක වූ Mt. Gox පද්ධතිය Hacking ප්රහාරයකට ලක්වී විශාල Bitcoin ප්රමාණයක් අහිමි විය. මෙමඟින් Custodial Exchanges වල රඳා පැවැත්මේ ඇති අවදානම සහ Self-Custodial Wallets වල වැදගත්කම ලෝකයට පෙන්වා දුන්නේය.
SegWit Soft Fork & Lightning Network (2017)
Scalability ප්රශ්නයට විසඳුමක් ලෙස Block space වඩාත් කාර්යක්ෂමව භාවිතා කිරීමට Segregated Witness (SegWit) upgrade එක සක්රීය කරන ලදී. තවද Micro-transactions instant ලෙස සිදු කිරීමට Layer-2 Scaling solution එකක් වන Lightning Network එක හඳුන්වා දෙන ලදී.
El Salvador Adoption (2021)
එල් සැල්වදෝරය (El Salvador) රාජ්යය විසින් Bitcoin ස්වකීය නිල මුදල් ඒකකයක් (Legal Tender) ලෙස පිළිගත් ලොව පළමු රට බවට පත්විය.
Spot Bitcoin ETFs Approval (2024)
ඇමරිකාවේ SEC මඟින් BlackRock, Fidelity වැනි ලොව විශාලතම Asset Management සමාගම් සඳහා Spot Bitcoin ETFs අනුමත කරන ලදී. මෙමඟින් Institutional Investors ලට සෘජුවම Bitcoin වලට capital ආයෝජනය කිරීමට මඟ පෑදිණි.
19. Bitcoin Evolution Timeline
Bitcoin's journey from an obscure mailing list idea to a global macro-asset is one of the most remarkable stories in financial history:
- 2008: Satoshi Nakamoto publishes the Whitepaper during the Global Financial Crisis.
- 2009: Genesis Block mined (Jan 3); Bitcoin v0.1 released; Hal Finney receives the first transaction from Satoshi.
- 2010 (Pizza Day): Programmer Laszlo Hanyecz buys 2 Papa John's pizzas for 10,000 BTC — the first commercial transaction for physical goods in history.
- 2011: Bitcoin achieves 1:1 parity with the US Dollar ($1.00); Satoshi departs, passing lead development to Gavin Andresen.
- 2013-2017: Massive global adoption; Mt. Gox exchange collapse; the Blocksize War resolved with the successful activation of Segregated Witness (SegWit).
- 2021: El Salvador becomes the first sovereign nation to adopt Bitcoin as legal tender; Taproot upgrade activates for enhanced privacy and smart contract capability.
- 2024: US SEC approves historic Spot Bitcoin ETFs; Bitcoin surpasses all-time highs and completes its 4th Halving (3.125 BTC).
20. නිගමනය (The Future of Bitcoin)
Bitcoin යනු සරල තාක්ෂණික සොයාගැනීමක් පමණක්ම නොවේ. එය මූල්ය ස්වාධීනත්වය (Financial Sovereignty) සහ පාරදෘශ්යභාවය වෙනුවෙන් සිදු වූ අතිවිශාල තාක්ෂණික සහ ආර්ථික විප්ලවයකි.
මධ්යගත රජයකට හෝ මහ බැංකුවකට පාලනය කළ නොහැකි, ඕනෑම අයෙකුට Permissionless ලෙස භාවිත කළ හැකි, Inflation එකෙන් ආරක්ෂා වූ Scarcity එකක් සහිත Monetary System එකක් ලෝකයට අත්යවශ්ය වී තිබුණි. Satoshi Nakamoto ගේ එම අද්විතීය නිර්මාණය අද වන විට ඩොලර් ට්රිලියනයකට වඩා Market Capitalization එකක් හිමි Global Monetary Network එකක් බවට පත්ව තිබේ.
ඔබ දැන් Bitcoin හි මුලික තාක්ෂණික පසුබිම වන Cryptography, Blockchain, Mining, Proof-of-Work, UTXO Model, Keys & Addresses, Nodes සහ Consensus Rules පිළිබඳ ඉතාමත් පැහැදිලි සහ ගැඹුරු අවබෝධයක් ලබාගෙන ඇත.
මෙම තාක්ෂණික පදනම භාවිත කරමින් අනාගත Web3, Decentralized Systems සහ Digital Economics හැඩගැසෙන ආකාරය නිවැරදිව තේරුම් ගැනීමට ඔබට හැකියාව ලැබෙනු ඇත.
"Vires in Numeris" (Strength in Numbers)
20. Summary & The Future of Bitcoin
Bitcoin is much more than a digital currency — it represents the historic separation of Money and State, creating the first provably scarce, decentralized monetary protocol in human history.
Its dual architecture secures its position as the bedrock of future global finance:
- Layer 1 (The Base Chain): Serves as the ultimate global settlement layer and decentralized store of value — Digital Gold with absolute scarcity, unyielding security, and censorship resistance.
- Layer 2 (The Lightning Network): Enables instant, fractional-penny micro-transactions at the speed of light, capable of processing millions of transactions per second globally.
You have mastered the foundational mechanics of cryptography, consensus algorithms, UTXO economics, and network security. You are now fully prepared to take the Final Certification Exam and claim your official credential.
අවසාන විභාගය (Final Exam) Final Exam & Certification
සහතිකය සඳහා ඔබේ නම ඇතුලත් කරන්න Enter Your Name for the Certificate
ඔබේ නිල සහතිකයේ සටහන් විය යුතු සම්පූර්ණ නම මෙහි ඇතුලත් කරන්න. Please enter your name exactly as you want it to appear on your verified certificate.