Blockchain Technology Overview
On its most basic level, the blockchain can be understood as a new kind of database, at least this is its original design. What is different about this database is that it is distributed. Digital databases have been around for awhile now but until recently they have been designed to centralize information on one computer or within one organization. The blockchain though uses a distributed network of computers to maintain a shared database.
The blockchain is then a set of protocols and cryptographic methods that enable a network of computers to work together to securely record data within a shared open database. This database consists of a series of encrypted blocks that contain the data. The blockchain is a continuously growing list of these blocks of data which are linked and secured using cryptography, this makes it a trusted database with this trust being maintained by open source computer code and encryption instead of any institution. The database stores information in blocks that are linked together through hash values, with entries to this database being made by computers that all have a copy of the database and must all come to a consensus about its state before they can update it. So there are three central concepts to understand the system workings, that of blocks and hashing, mining and proof of work and distributed consensus, we will go over each of these separately.
Structurally speaking, a blockchain may be considered as a series of blocks of data that are securely chained together. New blocks are formed whenever participants create a piece of new data or wish to update existing data. These blocks are encrypted and given a hash value that is a unique identifier of their content. This hashing works by a standard algorithm being run over the block’s data to compress it into a code, called the hash, that is unique to that document. No matter how large the file or what information it contains it is compressed into a 64-character secure hash. The hash can be recalculated from the underlying file, confirming that the original contents have not changed but the reverse is not possible, given just the hash value you cannot recreate the block’s data content which is encrypted.
All blocks newly formed after the first block are securely chained to the previous one, meaning that the hash value of the next block in the chain is dependent upon the previous one. Thus once recorded, the data in any given block cannot be altered afterward without the alteration of all subsequent blocks. As well as this hash pointer linking to the previous block each block typically contains as well a timestamp so that we know what happened and when it happened. This hashing and linking of blocks makes them inherently resistant to modification of their data, making them immutable, you can only write data to the database and once it is there it is very hard to change, almost impossible. Data stored on the blockchain is generally considered incorruptible.
Blockchain security methods include the use of public-key cryptography. A public key which is a long, random-looking string of numbers, is an address on the blockchain. Value tokens sent across the network are recorded as belonging to that address. A private key is like a password that gives its owner access to their digital assets or the means to otherwise interact with that data. A public key is associated with the private key so that anyone can make an encrypted transaction to the public key address but that encrypted message can only be decrypted with the receiver’s private key. In such a way effective security only requires keeping the private key private; the public key can be openly distributed without compromising security. For example on the bitcoin blockchain to receive funds from another person you use a piece of software called a wallet which creates a public key that you give to someone else for them to send bitcoins to that address, with your private key you can then access that address with those bitcoins on it.
The blockchain is a distributed system, meaning there is no centralized organization to maintain and verify the entries on the database. This database is instead maintained by a large number of computers that are incentivized to provide computing resources by earning some form of tokens in exchange but these nodes themselves cannot be trusted individually. Thus it is required that the system provide a mechanism for creating consensus between scattered or distributed parties that do not need to trust each other but just need to trust the mechanism by which their consensus has arrived.
Any computer connected to the blockchain network using a client can perform the task of validating and relaying transactions. Each of these miner computers gets a copy of the blockchain, which gets downloaded automatically upon joining the network. When new entries into the database are made these changes are automatically broadcast across the network.
Proof of Work
Mining nodes validate transactions, add them to the block they are building, and then broadcast the completed block to other nodes on the network. In order to randomize the processing of blocks across the nodes and deter certain service abuses, blockchains use various time-stamping schemes, such as proof-of-work. Proof of work describes a system that requires a not-insignificant but feasible amount of effort usually by requiring computer processing time.
As in the case of the bitcoin blockchain, this is realized on some form of challenge such that no one actor on the network is able to solve this challenge consistently more than everyone else on the network. Miners compete to add the next block in the chain by racing to solve a very difficult cryptographic puzzle. The first to solve the puzzle, wins the lottery. As a reward for his or her efforts, the miner receives a small amount of newly created bitcoins and a small transaction fee. A consensus algorithm, like bitcoin’s proof of work, works to ensure that the next block in a blockchain is the one and only version of the truth, and it keeps powerful adversaries from derailing the system.
Blockchains are trying to create a secured, trusted, shared database and they do this through encryption and hashing, proof of work and network consensus. The hashing and linking of blocks makes it difficult to go back and change a previous block once entered, but this alone would not be sufficed to ensured that it is tamper proof so the proof of work system intentionally makes it computationally more difficult to alter the database, thus making it extremely difficult to alter all the blocks. On top of this it places a distributed consensus mechanism so that even if someone did manage to do this, their database would not match that of others and thus would not be accepted as the valid record.
So to successfully tamper with a blockchain you would need to alter all the blocks on the chain, redo the proof of work for each block and take control of more than 50% of the peer-to-peer network, only then will your altered block become accepted by everyone else. On a blockchain of almost any size, this would be almost impossible to do. Indeed the bitcoin blockchain is a very good proof of this given that it now secure hundreds of billions of dollars using this method without the network having been hacked.
At the end of the day what this technology enables is a database that is secure with automatic trust that is enabled by open source code and encryption. It is tamper proof, once information is put into the database it can not be altered. It is a shared database as many people across a network have a copy which is continuously being updated so that all have a single source of truth. Likewise, it is transparent, meaning everyone can see all the transactions and alterations made to the database if needed. Data quality and the resilience of the network is maintained by massive database replication across many different nodes on the network, no centralized “official” copy exists and no user is “trusted” more than any other.
Having started out life as simply a mechanism to enable bitcoin it has become increasingly recognized that this system is secure enough to work as a ledger for the recording and exchange of any value what we now call a distributed ledger.