Bitcoin might be undoubtedly the first thing you heard about blockchain. That’s fine, no trouble. Although there is actually a lot more than just Bitcoin. Blockchain today has become an empire. The idea is so formidable that it would be difficult to talk about a future without the blockchain from where we have reached presently.
Since an anonymous person or a group of persons published the Bitcoin whitepaper around 8 years ago, under the pseudonym Satoshi Nakamoto, blockchain technology has spread into almost every area of human endeavor.
If predicted trends hold true, the blockchain would actually surpass technology, as we know it today. The climax of this development would be the same to what we already see in driverless cars and Artificial intelligence. Computers would control themselves with near zero possibility of the problems we face from having humans control them.
There are a lot of ways you can understand what the blockchain is and the way it works. One simple one is that a blockchain is a distributed ledger of transactions. The unique feature of the blockchain is that unlike the ordinary ledger where records are kept for future reference, the blockchain ledger is shared. This sharing of information makes the blockchain a network. In the blockchain network, everyone knows who owns what and anyone in the network can write on this unique ledger to reflect in everyone else’s copy of the same ledger.
Let’s go a little further. Think of a webpage, we would like Wikipedia for example. A lot of persons write articles that are published on Wikipedia pages. For this reason, we cannot say Wikipedia is controlled by any one person. The blockchain works in the same way. The difference is—the Wikipedia page is built into the World Wide Web with a client-server model. The ability to edit pages is controlled by the administrators and user clients are given permission to edit the content on the central server. The edited content is what is visible to other users when they access Wikipedia pages from their web browsers. This administrator control is why we can best describe Wikipedia as centralized.
The blockchain comes with an innovation in every way you would think about it. Information is shared without the need for a trusted third party to grant access or verify this information.
The blockchain works without any need to trust anyone. Cryptographic algorithms make use of a unique private key which fulfills everything a third party would have been needed to verify.
Anyone who has the private key to an asset has access to the assets attached to it. Owning the key means ownership of what it gives access. With this, the blockchain eliminates the possibility that a central authority would influence information. Participants in the network would not have to worry about the security of assets, information, and privacy. They share nothing more than records of transactions and change of ownership within the network.
In a peer-to-peer network controlled by the blockchain technology, a user who wants to perform a transaction sends information about that transaction to the entire network and every node on the network and every node on the network starts to updates their ledger with the new information. If you are wondering how every node on the network gets to know that the message was sent by the actual owner and not someone else. Here is how that happens. To perform a transaction a digital signature needs to be created from a user’s private key, or simply a password. Digital currencies sent to users go to their public key. With this digital signature, other nodes in the network can verify that the private key corresponds to the public key. Cryptography makes this possible without giving the other nodes access to the private key. This signature is unique for every transaction and any alteration in the makes it invalid. This way, the security of transactions is guaranteed.
Transactions in a blockchain network can be looked at as a system of inputs and outputs. There are no records of balances on the blockchain network. Instead, what happens is that transactions executed based proofs of credible inputs from previous transactions. The system is designed in such a way that inputs are sent in one transaction. The blockchain system is designed to send inputs or account balance in one transaction. To send an amount less than the total of inputs, you would have to send what is left as a change back to yourself. This may be one reason why the chain of transactions is used to describe this system. Transactions are verified for validity up to the first block in the network. Every used transaction is marked as spent so that no transaction is used twice by being referenced more than once.
The blockchain is Bitcoins innovation to solve the problem of time. A user can send funds twice since it would be difficult for nodes to verify which transaction comes first. To solve the problem, transactions are ordered in a unique group of accepted transactions called blocks. These blocks are linked together in a blockchain. Each block is a reference to previous blocks placing one block directly after another in time. There are also transactions not in a block and these are unordered transactions.
Nodes can create new blocks by providing answers to specific cryptographic puzzles. Blockchain networks, like Bitcoin, use a specific Hash function SHA-256. A hash function is a powerful cryptographic function. It works by allowing attempts to predict a specific input using an output. The only way such input can be predicted is by trying all possible outputs. In the case of the Bitcoin blockchain, for example, I would take years for a computer to solve the puzzle required to create a new block. With the entire computers at a time is about 10 minutes on average. Any node that finally solves the puzzle brings unordered transactions together and announce a new block. The randomness in the process makes it unlikely that two blocks would be solved at a time. Although if it happens contrary, nodes build on the first block they receive. This process ends with the creation of a new block. The simple idea is that the puzzle makes it difficult for more than one block to be created at any time. With this, everyone in the network agrees on the same order of transactions and as a rule, the longest chain becomes the most valid chain.
Another thing you might be thinking of is what if transactions come near the end of a block and are not considered in the particular chain. If you have followed closely, you will understand that there is a loophole here that can be used to create the same double spending problem. Since such transactions are not verified immediately, an attempt can be made to send the same amount to different persons. This would be forestalled by the cryptographic hash function discussed earlier. A new block is impossible in the middle of the chain since it would not match the records of previous transactions. If an attacker decides to create a new chain of blocks, the chance of success only exists if he could control 50% of the entire network of honest nodes. If it was possible to do this, it would be expedient to go by the rule since an attack of that magnitude would make the network invalid.
You may not need to know everything here to use the blockchain, but an idea at least is necessary. You can also think of the block as pages of a physical ledger. When a page is a page is exhausted, you need a new one. Unlike a physical ledger, however, everything in the blockchain is connected.