All rights reserved. Use by permission.
The idea of Bitcoin is not that complex. You only need to know 3 simple concepts:
- Hash function: A hash function is a one-way encryption function. For example: I want to use hash function to encrypt Einstein’s paper on relativity.
- Input: Now we have the input of the hash function: A bunch of words, and they are stored on the computer in binary form like 010101001010… All information in classic computers is stored in binary form. So anything in a computer can be hashed.The function: What does hash function do with its input? It just scrambles the 0s and 1s. For example, move the last 2 digits to the beginning, delete the 127th and 364th digits, flip the first 10% of all the digits from 0 to 1 or 1 to 0, and so on.Output(digest): The output of the hash function is just a bunch of numbers and its length depends the hash function you use. For example, the output of the SHA-256 function with input “bitcoin” is: 0x6b88c087247aa2f07ee1c5956b8e1a9f4c7f892a70e324f1bb3d161e05ca107b
- Peer-to-peer(P2P) network: P2P network is a decentralized network. The network is composed of many nodes, and only these nodes. These nodes are of equal importance to the network, so there is no such thing like a central node. If some nodes are disconnected from the network, the network will continue to exist without a problem. New nodes can easily join the network.
- Block-chain: Block-chain is a chain of information blocks. Inside each block there is all the transaction history for past a few minutes (around 10 minutes on average). There is also other stuff like a pointer to previous block in the chain.
- Purpose: Block-chain serves as the public ledger of Bitcoin. It contains every single transaction that happened since the birth of Bitcoin, Jan 3rd, 2009. Based on the information in this block-chain, the Bitcoin network can prevent the problem of double-spending.
- Controlled supply: On average, every 10 minutes a new block will be added to the block chain. It is done by some nodes in Bitcoin network who contribute their own computers to complete this job, and we call them “miners”. People rush to be the node who adds new block to the block-chain because of the reward of “controlled supply”. The node who successfully adds the new block to the chain will be rewarded a certain number of Bitcoins. As of Sept. 2017, the reward is 12.5 Bitcoins. The reward is cut by half approximatelyevery 3.75 years. By year 2140, the Bitcoin in circulation will reach its upper limit of 21,000,000, if there is no upgrade to its source code.
- The key question: How can we trust the node who adds the new block to the chain? Will he/she/they add incorrect information to the block for his/her/their own benefit? For example, a person spends 1 Bitcoin 5 minutes ago, he/she wants to remove this transaction history from the block-chain.
- The very reasonable assumption: We assume that the majority of the nodes who want to find the new block are not malicious. They just want the reward.
- The absolute brilliance: The Bitcoin requires each miner to hash the transaction history together with an arbitrary nonce (number used once) set by the miner. And for the network to accept this block, the output(digest) of the hash function needs to start with several 0s, for example: 0x00000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f.
Leave a Reply