To some, the blockchain architecture is a breakthrough because it constitutes the first large-scale fusion of a database with a network.

The Networked Database

Frst we had isolated databases, then we created the internet to connect databases to the network, and with the blockchain we are essentially merging both concepts in a completely secured and reliable way.

So at the basis of everything we have a peer-to-peer network of nodes who all run a special piece of software that can store data, run some transactions to update the data, and connect with its peers to download and spread new data.

One of the breakthroughs of Bitcoin was the ability for the database and the consensus to stay consistent, even as nodes join and leave the network, without requiring those nodes to authenticate in any way.

All you need to do to join the network is to install the wallet client on your machine, let it synchronize its local database copy and start creating transactions and downloading new blocks as they are created.

Getting into the net

Now to run a fully secure node, you actually need to download a full copy of the database first, which can take days, and is a major barrier to entry for most people.

That’s why it is also possible – although way less robust and secure – to create an account on a website running a remote node storing your wallet in a remote database, and creating transactions on your behalf.

That’s what most exchange marketplaces like Coinbase or Kraken allow you to do. But they are mostly proxies for currency transactions. They don’t deal with smart contracts and more sophisticated business transactions.

There are also browser plug-ins that allow you to link your browser with a remote wallet, like Metamask for Chrome.

On the other end of the security spectrum, you also have the possibility to use hardware wallets like the ones offered by LedgerWallet, or pure cold storage by printing your wallet information on paper and storing it in a physical safe.

The wallet is the key

The main point to remember here is that, contrary to a centralized system, in a blockchain your wallet is your only key to joining the network. So if you lose your wallet or you store it online and somebody steals it there, you essentially lose access to your balance and your transactions.

Once you join the network the next vital element is the distributed ledger. And again, the only way to make fully secured transactions is to first download a full verified copy of the entire ledger.

With this, you can trace all transactions and all blocks, all the way to the genesis block, and make sure that transactions you create are going to be based on the right version of the truth.

Truth is consistency

This truth is essentially a series of blocks, chained with one another and containing lists of ordered transactions. The integrity and validity of those blocks of transactions is guaranteed by a series of cryptographic mechanisms.

But the one thing to know is that, once those proofs are established, it becomes extremely costly to go back in history and change one transaction in the past.

If you want to do that, then you have to compute again the block in which the transaction is stored, along with all the subsequent blocks to catch up with the rest of the network, the cost of which increases exponentially with each added block.

We call this property transaction finality. In the case of an open blockchain, it is never absolute, but breaking it requires what is called a 51% attack.

In other words, one mining node, or one organization controlling a set of mining nodes, would need to have more than half of the entire network’s power to be faster than the rest of the network in creating fraudulent transactions and blocks.

The consensus algorithm

Which brings us to another key element of the blockchain: the consensus algorithm. Simple user nodes don’t need to participate in the consensus algorithm. This mechanism, which is implemented by the mining process, can be disabled in most software clients, but if you do enable that feature and start participating in the mining process, then you take part in the consensus algorithm.

The most widespread form of consensus algorithm right now is of type proof-of-work (PoW). That’s what both Bitcoin and Ethereum blockchain implementations are using for now, and that involves contributing power in the form of computing capacity, measured as hash rate.

Most proof-of-work algorithms actually work, but the more processing power you can contribute, the higher the probability of your machine solving the consensus puzzle, and finding the next block to be appended to the blockchain ledger.

In other words, you can see this consensus algorithm as a game process to choose who is going to be the next node to decide how the network history is going to evolve.

It is a very clever mechanism as it doesn’t require any central point to choose a winner, and it mitigates potential race conditions, which means several nodes finding puzzle solutions almost simultaneously and spreading them across the network competitively.

This consensus algorithm also uses a combination of cryptographic mechanisms to do its work in an indisputable and immutable fashion. This adds a built-in trust mechanism to the blockchain that is incredibly valuable when you’re dealing with valuable transactions such as currency transfers or any kind of smart-contract-worthy business transactions.

Put differently, this consensus algorithm, once proven and accepted, essentially has the potential to replace a multiplicity of human processes to check and verify the validity of business transactions, which gives it all its disintermediation power.

Scalability as a weakness

One last important point about consensus algorithms is that, although Bitcoin and Ethereum chose to use some variant of a proof-of-work algorithm, those are starting to show their limits in terms of scalability and energy efficiency.

Indeed, they tend to get slower and slower as networks grow, and they consume more and more useless electricity and computing hardware, which is regarded more and more negatively in this world of climate change. That’s precisely why alternatives are being researched, the most promising of which is probably proof-of-stake.

The mathematic specifics are complex but in its most generic definition, you can see it as a way to come up to a consensus based on betting money instead of hardware and electricity to increase your chances to win the mining competition.

Ethereum is currently working on a future switch to a proof-of-stake consensus algorithm to replace is current proof-of-work one. this work-in-progress is codenamed Casper, and it should be deployed sometime in the future.