Blockchain

What is Blockchain

January 12, 2009. Satoshi Nakamoto sends 10 BTC to Hal Finney. The first transaction in history where a person owns the money - not a government, not a bank. Nobody can freeze it, reverse it, or print more. Not anarchy - mathematics. SHA-256, known since 1993. Proof-of-work, described in 1993. Hash chains from Stuart Haber in 1991. Satoshi combined three ideas in one 9-page white paper - and created a market worth 1 trillion dollars.

  • **Bitcoin** - 21 million coins, 1 trillion dollar market cap, 10+ years with zero protocol-level breaches
  • **Ethereum** - smart contracts: programs that execute automatically without intermediaries. 500 billion dollars in DeFi protocols
  • **Solana** - 65,000 TPS for NFTs and DeFi; **SWIFT alternatives** for cross-border transfers without 3-5 days of waiting and 25-50 dollar fees

Distributed Ledger

Before 2009, every digital transfer required a trusted intermediary. Not because it was technically impossible - because there was no way to trust. Writing "Ivan paid Maria 100 dollars" in a file on a server means Ivan can edit that file. Someone has to hold the truth. A **bank**. A government. A notary.

A **distributed ledger** flips this: every participant in the network holds a copy of the data. When someone adds a record, everyone else gets the update. Falsifying one copy is pointless - the others will immediately spot the discrepancy. No single server to hack. No bank to freeze the account.

Analogy: the village notice board

How a distributed ledger works in real life

In a small village there is a notice board in the square. But instead of one board - **every resident keeps their own copy**. When Ivan sells Maria a cow, both shout in the square: "Ivan → Maria, 1 cow!" Everyone writes it down. If Ivan later says "I didn't sell" - 100 neighbors have it recorded otherwise.

**Key property:** there is no single center controlling the data. Every participant is an equal keeper of the truth. This is called **decentralization**.

What is the main difference between a distributed ledger and a regular bank database?

Blocks

Records aren't added one by one - they are **grouped into blocks**. A block is a batch of transactions collected over a period of time. Bitcoin: a block every ~10 minutes, up to 2500 transactions. Ethereum: a block every ~12 seconds.

Why? Thousands of transfers happen every second. Synchronizing each transaction individually across thousands of network nodes creates exponential load. A block is batch processing: collect a pile, verify at once, broadcast in a single message.

**Analogy:** a block is a **page** in a notebook. Every purchase doesn't get its own separate sheet. A page is filled, then the next one begins.

Why are transactions grouped into blocks rather than recorded one by one?

Blockchain (Chain of Blocks)

Each block contains the **hash of the previous block**. A hash is a digital fingerprint: SHA-256 turns any data into a 64-character string. Change even one character in a transaction - the fingerprint changes completely. This is how block #5 is anchored to #4, that one to #3 - all the way back to the very first one, the **genesis block**.

That's the protection. If an attacker modifies a transaction in block #3, its hash changes. The `prev` field in block #4 no longer matches - block #4 is invalid. And therefore #5, and #6, and every block that follows. To forge one transaction, the entire chain must be recalculated.

Changing block #2 will trigger a cascade: 1. The hash of block #2 will change 2. The `prev` field of block #3 will no longer match → block #3 is invalid 3. And so on through the entire chain To forge one transaction, **all subsequent blocks** must be recalculated.

What will happen if an attacker modifies a transaction in block #50 when the current chain length is 100 blocks?

Immutability

The combination of "blocks + hash chain + distribution" gives **immutability**. Data that has entered the blockchain is practically impossible to change retroactively. Practically - not theoretically.

To change a block, an attacker must: recalculate the hash of the modified block, recalculate all subsequent blocks, and do all of this faster than the entire rest of the network - which keeps adding new blocks. Then convince more than 50% of participants to accept the new version: the **51% attack**.

On Bitcoin in 2024, a 51% attack requires roughly half of a 500 EH/s hashrate. Equipment cost: about 20 billion dollars. Electricity: 18 million dollars per day. That's immutability - not a technical lock, but economic infeasibility.

Cost of a 51% attack on Bitcoin

How much it costs to forge Bitcoin

Bitcoin network hashrate (2024): ~500 EH/s Equipment cost for 51%: ~$20 billion Electricity: ~$18 million/day For comparison: NASA's annual budget - $25 billion. This is why Bitcoin is considered one of the most secure systems in the world.

Immutability is not an absolute property, but an **economic** one. Technically it is possible to change data, but the cost of the attack makes it unprofitable. The more participants in the network, the more expensive the attack.

Why is data in a blockchain considered immutable?

Trustless: a system without trust

Ordinary systems require **trust** in an intermediary: a bank, a notary, a government registry. If the intermediary makes a mistake, goes bankrupt, or decides to freeze an account - there's nothing to be done. Lehman Brothers 2008, Cyprus banking crisis 2013, Russian asset freeze 2022 - same pattern everywhere: the money exists, but access doesn't.

Blockchain is a **trustless** system. Not "unreliable" - "requiring no trust". No need to trust any specific participant. Trust is replaced by mathematics: SHA-256 doesn't make mistakes, consensus doesn't take bribes, the protocol doesn't know what sanctions are.

Traditional systemBlockchain
TrustCentral authority (bank, notary)Mathematics and protocol
Single point of failureYes (bank server)None (distributed network)
TransparencyClosed (bank sees everything, clients don't)Open (everyone sees all transactions)
CensorshipBank can freeze an accountImpossible without control of >50% of the network
SpeedSeconds (within the bank)Minutes-seconds (depends on the blockchain)

International transfer: bank vs blockchain

A real international transfer scenario

Bank wire transfer Moscow → Buenos Aires: • Time: 3-5 business days • Fee: $25-50 + conversion • Participants: sender's bank → correspondent bank → SWIFT → correspondent bank → recipient's bank • Each can delay or reject the transfer Bitcoin transfer: • Time: ~10 minutes (1 confirmation) • Fee: $1-5 • Participants: sender → Bitcoin network → recipient • No one can block the transaction

**Key insight:** blockchain solves the **double spending problem** without an intermediary. In the digital world, copying a file is easy. But blockchain makes it impossible to "spend" the same coin twice, because the network tracks all transactions.

Blockchain is the same thing as Bitcoin

Bitcoin is one application of blockchain technology. The same technology underlies Ethereum (smart contracts), Solana (DeFi), enterprise blockchains (Hyperledger), and NFT platforms.

Bitcoin was the first successful application of blockchain - which is why the terms get mixed up. But blockchain is the technology (like TCP/IP), and Bitcoin is the application (like email). Email is not the entire internet

What does "trustless" mean in the context of blockchain?

Key ideas

  • **Distributed ledger** - every participant holds a copy, no single center of control. Changing data means deceiving >50% of the network
  • **Blocks** - transactions are batched for efficiency. Bitcoin: one block every 10 minutes, up to 2500 transactions
  • **Hash chain** - each block contains the hash of the previous one. Changing one block breaks all subsequent ones - cascading protection
  • **Immutability** - not a technical lock but an economic property: a 51% attack on Bitcoin costs ~20 billion dollars in hardware
  • **Trustless** - no intermediaries needed: rules are enforced by SHA-256, proof-of-work, and consensus. That's exactly how Satoshi sent 10 BTC without a bank in 2009

Related topics

Blockchain relies on several fundamental ideas from CS:

  • Hash functions — The foundation of block integrity - SHA-256 creates a "digital fingerprint" of data
  • Merkle Trees — Efficient verification of transactions inside a block
  • Distributed systems — Consensus among network nodes - CAP theorem and Byzantine Fault Tolerance

Вопросы для размышления

  • SHA-256 existed since 1993, proof-of-work since 1993, hash chains since 1991. Why did Bitcoin only appear in 2009? What was the missing piece?
  • If blockchain is so reliable, why do banks still exist? What can blockchain fundamentally not do?
  • Blockchain's public visibility - is it a feature or a bug? Describe scenarios where full transaction transparency creates serious problems.

Связанные уроки

  • crypto-01-intro — Hash functions (SHA-256) are the cryptographic primitive that makes block linking possible
  • ds-01-intro — Distributed systems concepts (consensus, Byzantine faults, CAP theorem) underlie blockchain networks
  • net-01-intro — P2P networking is the transport layer that connects blockchain nodes
  • alg-01-big-o — Understanding algorithmic complexity helps reason about why 51% attacks are economically infeasible
  • bc-02-hashing — The next lesson deepens SHA-256 and Merkle tree mechanics introduced here
  • dist-07-transactions
What is Blockchain

0

1

Sign In