The heart of Bitcoin is the blockchain. This distributed ledger system is a dynamic and decentralized database that contains a list of all the Bitcoin transactions that have ever taken place.
The list is continually updated with every new transaction that occurs and groups of transactions are built into small, chronological bundles called blocks. A transaction can’t be changed once it’s added to the list and it’s shared and stored on a massive network of devices called nodes.
Node Diggity, Node Doubt
Nodes maintain the database and validate transactions. When a transaction occurs, it’s broadcast from one node to another using a gossip protocol. If you remember playing a game called telephone as a kid, it works kind of like that.
When a node receives a transaction, it goes through a list of consensus rules to make sure the transaction is allowed. This process also ensures that the Bitcoin token being used within the transaction is real and hasn’t already been spent. If the transaction passes all the checks, it’s sent on down the line to the next node. This is how data propagates throughout the system.
Miners are a special type of node that do a little bit more work by building transactions into the chronological blocks that form the blockchain. They also perform tasks like deciding which transactions to include in each block, determining when a transaction occurred and applying a timestamp to it.
Think of all the transactions as puzzle pieces. The miners try rearranging the puzzle pieces over and over again at a really fast rate to try and fit them all into a neat little square.
Once a block is built, the miners perform a series of hashing functions referred to as proof of work (POW). Satoshi Nakamoto, the mysterious persona behind the development of Bitcoin, implemented this system as a requirement in building a valid block to address the Byzantine General’s Problem, one of the core issues found within distributed data processing systems. Since POW requires miners to contribute significant computational power to complete a tricky math problem, it helps deter spamming and distributed denial of service attacks on the blockchain. The immutability of data within the blockchain is also further ensured by the SHA-254 encryption algorithm used within this hashing function.
This One’s Mine
It’s important to note that the miners don’t work together. Each of them independently receives transactions and competes with the others to be the first to finish building the next new block. The winning miner is then rewarded with a certain amount of Bitcoin and then the race to build a new block starts all over again. This system provides an incentive for miners to play by the rules since the reward vastly outweighs the risk of trying to game the system.
Currently, the reward is 12.5 BTC, however, this amount is programmed to be cut in half every 210,00 blocks. This phenomenon is referred to as halving but it’s generally referred to as an event called The Halvening and will occur until the total number of Bitcoin created reaches 21 million, after which new Bitcoin won’t ever be made again.
A 21 million Bitcoin limit might leave you wondering why all these bad boys haven’t been scooped up by Chinese mining farms yet and the answer lies in the protocol itself which was designed to ensure transactions are processed at a steady rate.
Bitcoin has a global block difficulty that is evaluated after every 2016 blocks to ensure that new blocks are built every 10 minutes and no sooner or later. By comparing the timestamps between subsequent blocks, the network hashrate can be determined to set a new target, which is a 256-bit number. If mining difficulty is high, this target number is lower and vice-versa.
The hash rate is the sum of the total amount of hashing power provided by all the miners in the network and represents the speed at which Bitcoin protocols are being completed. Since the number of miners within the blockchain can vary, the target needs to be continually reassessed. The SHA-256 hash within each block needs to be equal to or less than the current target in order to be considered valid by the network.
When more miners join the network, the hash rate rises, which means blocks are going to be created faster in a shorter amount of time, so the difficulty rises to keep that amount of time at the 10 minute mark.
One Vote To Rule Them All
The original idea for the Bitcoin protocol was one-CPU- one- vote, with a majority decision represented by the longest chain. This concept was a great idea at first, but technology has advanced at such a rapid pace since then that CPU mining was left in the dust by the modern GPU, and even that has been quickly usurped by ASIC mining appliances that provide unparalleled hashing power. Each time a new mining technology is introduced, the difficulty level skyrockets.
While difficulty adjustments ensure we won’t run out of Bitcoin anytime soon, it’s becoming more and more difficult for the cryptocurrency enthusiast to profitably mine. As huge mining operations continue to pop up all around the world and ASIC technology advances, scalability will becoming an increasingly worrisome issue that the Bitcoin community is already struggling to solve. At this rate, earnings will keep declining until the hashing power of the entire network is centralized within these mining operations, killing the spirit of Bitcoin.
Some people have tried to address the scaling issue with hard forks based on the Bitcoin core which results in the formation of entirely new altcoins like Bitcoin Cash. Others have implemented soft forks like Segregated Witness which provides larger blocksizes by counting signature data separately from other parts of a transaction. A lot of these concepts have caused a great civil war within the Bitcoin community. I don’t know what the solution is, but I know that it’s up to us to decide together. Isn’t that what Bitcoin is all about?