The blockchain is the public transaction ledger at the heart of Bitcoin and other cryptocurrencies. By establishing a “chain of trust,” it prevents tampering and keeps transactions secure.
Blockchain – What is it?
A blockchain is a complete, public list of all transactions in a given cryptocurrency. Because this ledger is distributed to everyone, falsified copies can be easily rejected.
To make a Bitcoin transaction, you must first download an up-to-date copy of the entire chain. After the initial setup, your Bitcoin client will continue to update its local ledger as transactions occur.
Since this chain is simply a ledger of transactions, it’s necessary to process its entirety to know anyone’s account balance. This happens during the initial setup of the Bitcoin client.
What’s in a transaction?
When someone wants to send currency, they create a message that contains three pieces of information:
Input, which lists the transaction(s) where the sender got the Bitcoins they are about to transfer.
The number of coins to send. This is stored as a decimal value.
Output, the recipient’s Bitcoin address.
Transaction messages are signed with the sender’s private key and then sent out to be processed by miners.
Miners receive new transactions, turn them into blocks, and permanently add them to the blockchain. They typically receive a small fee for performing this service.
Each block is stored with a hash that is generated from its data and the hash of the previous block. This makes it possible to prove by induction that the entire chain is free of tampering.
A Typical Transaction
Alice received 3.6 Bitcoins from Chris last week, and she wants to send 1.5 of them to Bob.
After Alice enters the amount to transfer and the recipient’s address, her Bitcoin client constructs a message with the following information:
Input: The hash of the transaction in which she received 3.6 Bitcoins from Chris. This will be used to verify that Alice has a high enough balance to complete the transfer.
Amount: 1.5 Bitcoin
Output: Bob’s Bitcoin address.
This message is sent out to the Bitcoin network, where miners verify and hash it. Every Bitcoin user receives the new block containing Alice’s transaction.
Blockchains create public, unbreakable chains of trust. Tampering is rendered impossible by inductive hashing and public distribution of the entire chain.