The key difference between blockchain and traditional databases is the level of trust needed in those running the service. With blockchain, you trust the protocol, not those running it.
What does a blockchain do?
A blockchain records transactions without needing to trust any individual, organisation or computer, in a tamper-proof way (or pretty close). This serves the same purpose as the record of transactions for your bank account, without needing to trust a bank.
What is a blockchain
A blockchain is a chain of transactions. This chain records which transactions occurred and in what order. The order matters when trying to prevent double spend (spending the same money twice) The servers running a blockchain agree on this order in rounds which can be sub-second, up to minutes. Bitcoin, for example, has a round every 10 minutes.
If the blockchain could only agree on one transaction every ten minutes, this would be impractically slow. Instead, they agree on a block of transactions, which is like a page of thousands of transactions. By agreeing on blocks at a time, they can process many transactions per second on average.
A blockchain is a chain of blocks of transactions.
How does it differ from a database?
A traditional database can also record transactions. Traditional databases require trust between servers, which isn’t usually a problem within an organisation. Traditional databases are designed to recover from accidental failure, but cannot protect against deliberate attack by one of the servers. Banks use databases as they provide every server involved and ensure they are secure enough not to be compromised.
From my experience, many blockchain projects could have used a database as there is an assumption of trust between servers running the database. One reason blockchain might have been used as it is a more desirable technology to have experience and expertise in.
Characteristics of a blockchain
How nodes running a blockchain come to consensus is important to;
- how much power they consume.
- how much trust is required between nodes.
- how fast it can process transactions
Ideally, you want is; low power consumption, low level of trust and a high throughput. Newer blockchain solutions are looking to achieve these three in combination.
Power consume is a concern in some cases as blockchains like Bitcoin can use more power than a modest sized country like Ireland.
The level of trust required is important as the low the level required the easier it adds the blockchain and join it.
The transaction rate is key to keeping up with demand and a low transaction rate limits what it can be used for.
Private blockchains can have a lower overhead, and not publically expose your data, however, they generally assume that each of the servers is trusted to a high degree and don’t look to protect against actively fraudulent behaviour.
This doesn’t mean you shouldn’t have private blockchains, rather that they could have just used a traditional database.
Public blockchains are ones which could be run by anyone with appropriate hardware (and possibly money for Proof of Stake) trusting the protocol, without needing to trust individuals however they are not completely safe and can be changed.
The 50% + 1 attack
If you control 50% + 1 of the nodes of a blockchain, you can override the behaviour of the blockchain just through the majority, however, you don’t need that many to stop one running.
It is possible that a nation-state could have the resources to control a public blockchain.
The 1/3 attack
If you have a Byzantine Fault i.e. nodes actively trying to prevent the running of a service, controlling just 1/3 of the nodes can prevent operation of the service.
Some care needs to be taken to prevent 1/3 of the nodes actively trying to stop operation.
Blockchain doesn’t have to be complicated
The ecosystem around blockchain is complex and rapidly evolving, however, the core of the solution needs to be simple to be easy to verify that it’s trustworthy.
In the future, like databases, we will see a variety of solutions to suit different use cases, and many more solution built on top of them to provide services and fill customer needs.