Blockchain Fundamentals

Blockchain is a distributed data storage solution secured by cryptography. It consists of blocks linked together in a chain, where each block contains data, a timestamp, and a hash of the previous block.

Structure and Security

  • Block Structure:

    • Contains data, a timestamp, and the hash of the previous block.
    • Hash is computed based on all data in the block, ensuring integrity.
  • Cryptographic Security:

    • Any alteration to data in a block changes its hash.
    • Chaining blocks via hashes makes tampering detectable across the chain.

Mining and Consensus

  • Mining Process:

    • Miners compete to find a hash with specific properties (e.g., leading zeros).
    • Involves adjusting a nonce in the block’s data until the desired hash is found.
  • Hash Properties:

    • Hash functions ensure that small changes in input data produce significantly different hashes.
    • A valid block (“mined”) is one that meets the criteria (e.g., starts with zeros).

Bitcoin Example

  • Bitcoin Mining:
    • Difficulty adjusts periodically to maintain an average block mining time (~10 minutes).
    • Miners aim to meet the current difficulty by adjusting their nonce.

Conclusion

Blockchain’s security and reliability stem from its cryptographic hashing and decentralized consensus mechanisms. It ensures data integrity and trust in distributed systems.

Bitcoin: A Peer-to-Peer Electronic Cash System

Peer-to-Peer Network

  • Bitcoin operates on a decentralized peer-to-peer network without a central authority or server.
  • Each participant (node) maintains a complete record of account balances and transaction history.

Blockchain Technology

  • Blockchain consists of a series of data blocks cryptographically linked together.
  • Each block contains transaction data and the hash of the previous block, forming an immutable chain.
  • New blocks are added through Proof-of-Work, ensuring difficulty in creation but ease of verification.

Proof-of-Work

  • Mining relies on computationally intensive Proof-of-Work algorithms (SHA-256 hash function).
  • Miners compete to find a nonce that produces a hash value meeting specified criteria to add a new block.

Transaction Verification and Confirmation

  • Transactions are broadcasted to the network, verified, and added to the mempool.
  • Miners select transactions from the mempool, validate them, and include them in new blocks added to the blockchain.

Currency Issuance and Distribution

  • New bitcoins are issued through mining rewards, decreasing over time as mining difficulty increases.
  • Total supply is capped at 21 million bitcoins, establishing scarcity and value.

Anonymity and Security

  • Bitcoin transactions use public-key cryptography for security and privacy.
  • Users transact with anonymous addresses, protecting their identities.

Decentralization Advantages and Challenges

  • Decentralization enhances resistance to censorship and security against single points of failure.
  • Challenges include scalability, energy consumption, and transaction speed.

Reference(Bitcoin): EN Edition file pdf

Reference(Bitcoin): CN Edition file pdf