Module 0 – Learning Blockchain as an Engineer

Module 0 – Learning Blockchain as an Engineer

Mindset, sources of truth, minimal metrics, and a reproducible method.

45-70 min
blockchain-for-engineers

1) Technical Objective

Understand the base architecture. Before looking at data, we must understand what we are looking at.
Objective: Build the mental model of a distributed, immutable, and open state machine.

2) Fundamental Concepts (Philosophy & History)

2.1 The Byzantine Generals Problem (BFT)

Imagine several generals surrounding an enemy city.
Mission: They must ALL attack at dawn. If one attacks and another doesn’t, they lose.
Problem: They communicate via messengers (the network). Messengers can be captured, or worse, a General might be a Traitor sending false messages.
Blockchain Solution: Bitcoin solved this for the first time in history. Using economic incentives (PoW/PoS), we allow thousands of generals (nodes) to coordinate without trusting each other and without a central commander (Byzantine Fault Tolerance).

2.2 Money is a Ledger (The Rai Stones)

Common Misconception: “Money has intrinsic value”.
Reality: Money is a social accounting system.
Yap Island: They used giant limestone discs (Rai Stones) weighing tons. They never moved them.
The Mental Ledger: When Alice paid Bob, the village simply agreed: “That stone is now Bob’s”.
The Sunken Stone: One stone fell into the sea. Nobody saw it. But the village kept using it as currency because the “Mental Excel” (consensus) said it existed.
Conclusion: Bitcoin is the digital Rai Stone. It has no physical backing, only the Ledger’s immutability matters.

2.3 The Double Spend Problem

In the digital world, everything is copyable (Ctrl+C, Ctrl+V).
– If I send you a PDF, I keep the original.
– If I send you “digital money” (pre-Bitcoin), I could copy the file and send it to someone else. Infinite Inflation.
Solution: The Miner/Validator only accepts the first transaction that spends a balance (UTXO). If you try to spend it again, the network rejects it. We created Digital Scarcity.

2.4 Centralized vs Distributed vs Decentralized

  • Centralized: A Bank. A single point of failure. If they shut down, you lose everything.
  • Distributed: Google Cloud. Thousands of servers, but one company (owner). If Google wants, they turn you off.
  • Decentralized: No owner. No single point of failure. If Satoshi Nakamoto wanted to turn off Bitcoin today, he couldn’t.

2.5 The Blockchain Structure

Imagine a shared accounting ledger (Excel).
1. Block: It is a page of the ledger. It contains a list of new transactions.
2. Hash (The Fingerprint): Each block has a unique identifier generated mathematically from its content. If you change a single comma of the block, the Hash changes completely.
3. The Link (Chain): Each new block includes the Hash of the previous block.
– Block 100 has the Hash of 99.
– Block 101 has the Hash of 100.
Consequence: If you try to modify a transaction in Block 50, its Hash changes. That breaks the link with Block 51, which breaks 52… You would have to rewrite the entire history up to today. That is immutability.

2.3 Who writes the pages? (Nodes and Consensus)

There is no central computer. There are thousands of Nodes (computers) running the same software and keeping a copy of the entire history.
Propagation: When you send a transaction, it doesn’t go to “a server”. It propagates to all nodes like a rumor (Gossip Protocol).
Consensus: Who decides which transactions enter the next block? A random election mechanism (Proof of Stake in Ethereum, Proof of Work in Bitcoin). The chosen one proposes the block and everyone else verifies it. If valid, they add it to their copy.

2.4 The State Machine (EVM)

Ethereum is more than a ledger. It is a computer.
Global State: The current state of all accounts and programs (contracts).
Transition: A transaction is an instruction to change the state (e.g., “subtract 5 from A, add 5 to B”).
Smart Contract: It is a program that lives on the blockchain. It cannot be deleted or turned off. If you send money to its address, its code executes automatically.

3) Observation Tools

To see what happens inside these nodes without installing one, we use “Block Explorers”. They are websites that read the blockchain and show it nicely.
Etherscan: The standard for Ethereum.
Blockscout: Open-source alternative.

Warning: The explorer is a “photo” of reality. Reality is the raw data in the node. Sometimes the explorer tags things (“This is token X”) that could be fake identity thefts. Trust the code (contract address), not the name.

4) LAB 0 — Forensic Dissection of a Block

Objective: Ignore the graphical interface and understand the real data structure that makes this work.

Procedure

  1. Open an explorer (e.g., Etherscan) and go to the last mined block (Latest Blocks).
  2. Identify the Chain (Parent Hash):
    – Look for the Parent Hash field. That is the link to the previous block.
    – Click it. It takes you to the previous block. That builds the chain.
  3. The Miner/Proposer:
    – It is the address that “won” the right to write this block.
    – Observe that they collected a Block Reward + Fees. That is their incentive to protect the network.
  4. Hunt a Simple Transaction (ETH Transfer):
    – Go to see transactions (“See more…”).
    – Find one where Input Data is empty (0x) or says “Transfer”.
    From: Who signs. To: Who receives. Value: How much native money (ETH) moves.
  5. Hunt an Code Interaction (Smart Contract):
    – Find a tx that goes to a contract (sheet or puzzle icon).
    – Look at Input Data. If you see strange hex codes (e.g., 0xa9059cbb...), that is a function call. It is telling the program what to do.
    Key Concept: Moving ETH is simple. Moving Tokens or doing Swaps is executing software.

Mental Deliverable (Feedback for yourself)

  • Do you understand why you cannot “delete” a transaction? (Because it would break the hash of all subsequent blocks).
  • Do you understand that your balance is not “in your wallet” but written in the public ledger? Your wallet only holds the key (private key) to authorize moving it.

5) Reasoning Quiz

  1. If Etherscan is turned off tomorrow, is your money lost? (No, Etherscan is just a viewer. The network is alive in the nodes).
  2. If I modify a block from 3 years ago on my computer, what happens? (My node will be “banned” by the rest of the network because my hash doesn’t match the consensus).
  3. Where is “your USDT balance” really stored? (In a variable inside the USDT contract code, assigned to your address).

6) CTA

Blockchain is a slow and expensive database, but it is the only one no one can turn off. Use it only when you need that.

Scroll to Top