Blockchain Technology

Jul 12, 2024

Lecture Notes: Blockchain Technology

What is a Blockchain?

  • Definition: A blockchain is a chain of blocks containing information.
  • Origin:
    • Described in 1991 by researchers.
    • Initially aimed to timestamp digital documents and prevent backdating or tampering (similar to a notary).
    • Gained prominence in 2009 when Satoshi Nakamoto used it for Bitcoin.

How Does Blockchain Work?

  • Distributed Ledger: Open to anyone and difficult to alter once data is recorded.

Structure of a Block

  • Data: Depends on blockchain type (e.g., Bitcoin stores transaction details: sender, receiver, amount).
  • Hash: Unique identifier like a fingerprint; changes if block data is altered.
  • Previous Block Hash: Links blocks together, forming a chain. This makes the blockchain secure.

Example Chain

  • Chain of 3 blocks:
    • Block 3 -> Block 2 -> Block 1 (Genesis block, no previous block)
  • Tampering with Block 2 changes its hash and invalidates Block 3 and all following blocks.

Security Mechanisms

Hashing

  • Detects changes to blocks.

Proof-of-Work

  • Slows down block creation (e.g., Bitcoin: ~10 minutes per block).
  • Mitigates tampering by making the recalculating process time-consuming.

Distribution

  • Peer-to-peer network without a central entity.
  • Each participant gets a full copy of the blockchain and verifies new blocks.
  • Consensus mechanism: Valid and invalid blocks are agreed upon collectively.
  • Requires control of >50% of the network to tamper successfully, which is highly unlikely.

Advanced Concepts

Smart Contracts

  • Programs stored on the blockchain.
  • Automate coin exchanges based on specific conditions.
  • Will be discussed in depth in a future video.

Applications

  • Beyond cryptocurrencies:
    • Medical records storage
    • Digital notary
    • Tax collection

Conclusion

  • Blockchains provide a secure, decentralized method to store information and verify its integrity.
  • They are constantly evolving with new applications and advancements.
  • For practical implementation, a tutorial on creating a simple blockchain in Javascript is available.