UK GOV & BLOCKCHAIN

Why Even Bother With Blockchain?

John Doherty
Sep 3, 2018 · 8 min read

There are many people currently out there in the IT industry preaching about the benefits Blockchain technology can bring to a project but Blockchain is not appropriate in all scenarios and shouldn’t be regarded as a replacement to typical databases such as MySQL, Postgres etc. Determining whether Blockchain is appropriate or not can be tricky and it is important to evaluate it against other database technologies out there. Blockchain does have its own issues such as electricity usage with proof of work, it being slower than a normal database due to mining/consensus process and it has issues with scalability. Taking these negative factors into account it is understandable why some businesses don’t explore the technology deeper or bother training there staff about it. However HyperLedger Fabric has now addressed these issues.

So whats HyperLedger Fabric?

HyperLedger Fabric is basically a melting pot of different technologies which includes a combination of couchDB and levelDB, Apache Kafka and Docker. In HyperLedger Fabric (HLF) there are two databases one which is referred to as the “World State” and another referred to as the “Ledger” or the “Blockchain”. The world state db stores current values of entities and the ledger records a transaction log of all changes made to the world state db. This means that if the world state db is lost it can be recreated using the ledger db. The world state is a mutable database and can be a levelDB or couchDB docker instance depending on the config option selected. However the ledger db is immutable which means it contents can not be edited after being written to the database.

There are different types of Blockchains available, in the case of the UK government it would be using a combination of both private and public blockchains as not all information would be safe to publicly expose. This hybrid of private and public blockchains can be achieved in hyper ledger fabric using what are referred to as channels which can be treated as independent chains. So a channel would be created for private sensitive information and another for public information. All peers on a channel need to be authenticated through a membership service provider (MSP), the certificate authority for hyper ledger fabric can integrate with services such as LDAP for example.

For a typical public Blockchain anyone has the ability to mine on the network provided they have the correct hardware and because they do this the get rewarded with the “currency” that exists on that network. So in the case of Bitcoin if I mine the bitcoin blockchain I will get rewarded with Bitcoins which I can then exchange for a “real” currency or a physical asset. The purpose of this is to incentivise individuals to continue mining on the network since they will be rewarded for there work. For organisations trying to integrate with each other using Blockchain technology this incentive of virtual currency to maintain the blockchain is not necessary most of the time as there is an already existing incentive. HLF does not have an internal network currency for incentivising miners. This removes the overhead of maintaining a conversion rate of your internal currency to the real world.

Mining on HLF is different to the mining process on Blockchains such as Ethereum which currently uses “Proof of Work” and this requires increased resources such as GPUs as the blockchain grows. For a well detailed explantation on how a transaction is processed on HLF please refer to here.

HLF has been designed to allow network starters to choose a consensus mechanism that best represents the relationships that exists between participants.

Since the ordering node does not have to perform a complex calculations (Proof of Work) in order to commit transactions, mining should be a lot quicker and doesn’t require as much hardware resources. This also means the HLF will be able to scale better compared to other Blockchains as the size of the ledger grows.

A typical strategy to scale a HLF blockchain would be to increase the amount of endorser nodes on the network which will allow the orderer node to commit to the ledger quicker. The database technology behind HLF which includes levelDB and couchDB as previously mentioned are also well suited for operating on a large scale since they are NoSQL and often used for “Big Data” projects.


Lets take a side step for a second and think about the law

Now we have learned the word state is mutable and the ledger is immutable lets think of the advantages of that for a second. Most of us are familiar with CRUD (Create, read, update and delete) operations on a database because blockchains being immutable there is no “update” or “delete”. Blockchains use CRAB operations (Create, read, append, burn) however with GDPR individuals have the right to be forgotten. The process of burning in blockchain literally just involves deleting or “forgetting” encryption keys that allows you to access information, the information still exists on the chain so it is technically not deleted and rather just behind a locked door. It is difficult to prove that encryption keys have been deleted or “forgotten” so burning is not legally prohibited. There is a way round that issue though.

With HLF there is now a feature available referred to as “private data”, so if personal information is being stored it will be stored in a private local state db and as for the ledger it will not contain the personal information but just the hashes of its key and value. The separation between the state and ledger in HLF is ideal in this scenario. The same can be achieved with other blockchain technologies but it is not available “out the box” and will require some further development.


What are the advantages here? You’ve told me what it is but I can do the same stuff with a normal database

The end user doesn’t know or appreciate often what is going on in the backend of a system, there main concern is that it works. Selling the concept of blockchain can be difficult to a customer as it requires a certain technical understanding in order to appreciate its advantages however it is important to remember it is not appropriate in all scenarios.

We can take the UK government for example which is responsible for maintaining the records of a large amount of citizens, imports, exports, land records etc. As you can imagine this would be a large amount of data which needs to be shared with other organisations and it is vital that the data is as accurate as possible. Its often that the same information about a citizen would be duplicated across multiple organisations within a government which can lead to inconsistency and increase processing time.

With HLF a new government organisation can be added to a channel (chain) for the sharing and duplication of records reliably. HLF can also allow the UK government to customise how consensus of records is achieved between the different organisations within a government. For example the Police’s vote on the network can be valued more than the vote of another government body. Also since there also has to be a consensus algorithm in place the data stored in the chain can be regarded as more reliable than a typical database which doesn’t require consensus for a record to be added, edited etc.

Even if a user went and modified the world state database the change would be detected as it would not match with the ledger and the node would then be voted out of the network. This is an important security feature especially when certain individuals are given direct access to a data store.

“Trust No One”

The typical way to interact with a database is through the use of a RESTful API and it can be a time consuming process to integrate third parties on already existing custom APIs. There is also the issue of trust as well where you are making the assumption that the API is working and doesn’t contain malicious code. With HLF it sets a common standard for the sharing of information reliably and helps remove trust from the equation due to the consensus algorithms, allowing new integrations to be performed more easily to a data store.

The UK government is already expressing an interest in Blockchain technology and is starting to understand the benefits that it can bring to its citizens. If the UK government implemented Blockchain for storing of land registry records and deeds to houses that would allows websites such as PropertyPal to help automate the house buying process since they could integrate more easily with the data store. This reduces the need for solicitors which are expensive and often slow at processing the purchases of houses. This also reduces barriers to entry on the property ladder which is in the interests of UK citizens. The future would be to click a single button to purchase a property and the transfer of deeds and mortgages would be handled automatically, this can be achieved better using Blockchain technology such as HLF in my opinion.

I have already made a prototype for this Land Registry blockchain idea which can be found here on my GitHub. The prototype doesn’t use HLF but Ethereum Smart Contracts for automating the house purchasing process, truffle framework was also used in development along with Web3.JS

System Architecture Overview

Continuing on with the example for Land Registry you can see both the UK Gov and PropertyPal have direct access to the data store and you probably thinking, “What about validation??”. So with HLF the UK Gov can implement validation through the use of chaincode at the datastore level and grant PropertyPal only certain permissions if they wish to do so as well. PropertyPal will have there own copy of the records they are allowed to and the same for UK Gov. Both organisations will be kept in sync with each other using HLF, the advantage of data redundancy as well is that if one organisation goes down the others can still operate successfully and when the organisations comes back online it can resync. Blockchain is also helpful when conducting audits as the auditor can see clearly what is being directly stored and accessed.

The UK Gov has already began investigating into this issue of making land purchases easier as found here. Hopefully the £750,000 budget is used wisely and we may see Blockchain making our lives easier buying houses etc soon.

John Doherty

Written by

Full Stack Developer. Startup Founder. Huge fan of all things innovative in the tech space.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade