Blockchain
The blockchain is Bitcoin's shared history of payments: a chain of blocks where each block points to the one before it. Changing an old block would break every link after it.
Short definition
The public ledger: all blocks linked in order since 2009.
Structure
Every Block has an 80-byte header. The header holds the hash of the previous block's header, a Merkle root that commits to all transactions in the block, a timestamp, the difficulty target and a nonce. Because each header contains the previous hash, the blocks form a single chain back to the Genesis block.
Nodes follow the valid chain with the most accumulated Proof of work. When two miners find blocks at almost the same time the chain briefly forks; the next block decides which branch wins, and the other block becomes stale. This is why exchanges wait for several confirmations.
Why it is hard to rewrite
To change a payment in an old block an attacker would have to redo the proof of work of that block and of every block after it, and then outpace the rest of the network. The deeper a transaction is buried, the more work protects it.
See also
- BlockA block is a batch of Bitcoin transactions added to the chain about every ten minutes. The miner who finds it collects the new coins and the fees.
- Proof of workProof of work is how Bitcoin decides who adds the next block: miners spend electricity on guessing, and a correct guess is easy for everyone to check but expensive to produce.
- MiningMining is the work that adds new blocks to Bitcoin. Miners run special computers (ASICs) that guess numbers; the winner of each round earns the block subsidy and the fees.
- Full nodeA full node is a computer running Bitcoin software that checks every block and transaction against the rules by itself. With your own node you don't have to trust anyone about your balance.
- ConfirmationA transaction is confirmed once it is in a block; each new block on top adds one more.
References
- Satoshi Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System (2008) bitcoin.org
- Bitcoin developer reference: block chain developer.bitcoin.org