A blockchain is a shared digital record that stores data in linked blocks across many computers. It matters because it lets people agree on a history of transactions without needing one central owner of the database. Each block contains data, a timestamp, its own hash, and the previous block's hash.
This structure makes the record difficult to change without being detected.
Key Facts
- Block hash = hash(block data + timestamp + previous hash + nonce)
- Changing one block changes its hash, which breaks the link to the next block.
- A blockchain is distributed because many nodes store and check copies of the ledger.
- Proof of work requires miners to find a nonce so the block hash satisfies a difficulty rule.
- In Bitcoin, a valid hash must be below a target value set by the network difficulty.
- Digital signatures prove ownership by using a private key to sign and a public key to verify.
Vocabulary
- Block
- A block is a package of recorded data plus metadata such as a timestamp, a hash, and the previous block's hash.
- Hash
- A hash is a fixed-length digital fingerprint produced from input data by a one-way algorithm.
- Node
- A node is a computer on the blockchain network that stores, shares, and checks blockchain data.
- Consensus
- Consensus is the process nodes use to agree on which version of the blockchain is valid.
- Private Key
- A private key is a secret number used to create digital signatures that authorize blockchain transactions.
Common Mistakes to Avoid
- Thinking blockchain data cannot ever be changed. It can be changed in a copy, but the tampering is exposed because hashes and consensus checks no longer match the network history.
- Confusing encryption with hashing. Encryption is meant to be reversible with a key, while hashing is designed to be one-way and used for fingerprints and integrity checks.
- Assuming every blockchain uses mining. Mining is part of proof of work systems, but other blockchains may use proof of stake or different consensus methods.
- Believing a wallet stores coins directly. A wallet stores keys, while the blockchain stores the transaction history that defines which addresses control value.
Practice Questions
- 1 A block header contains 80 bytes and a network miner tests 5,000,000 nonces per second. If it takes 30 seconds on average to find a valid nonce, how many nonce attempts were tested?
- 2 A simple blockchain has blocks A, B, C, and D. If each block stores the previous block's 64-character hash, how many previous-hash characters are stored in total across blocks B, C, and D?
- 3 Explain why changing a transaction in block B would require changing later blocks and convincing the network to accept the altered chain.