Minimum Viable Protocol

This is a follow on from my first post “Minimum Viable Blockchain”.

We left the post with a basic blockchain running within an organisation, enabling them to keep an almost tamper-proof audit trail of data that is very sensitive to risks associated with data integrity, such as financial transactions.

However, remember that the blockchain goal is to be 100% tamper-proof.

If a blockchain database is running on servers controlled by the same organisation, it cannot achieve this goal. No matter what security measures you put in place (physical, digital or legal controls) there will always be a risk that an individual or group of individuals could purposely act (or be manipulated) to tamper with data.

Building a trustless database is no mean feat in terms of technology innovation, business model innovation, social, political and economic acceptance & participation.

You need a protocol that magically brings all these concepts together.

To have a 100% tamper-proof database, Satoshi (inventor of Bitcoin) came to the ultimate conclusion that the only solution is to remove ownership completely and make the database trustless.

Trustlessness in the blockchain industry simply means you do not need to place your sole trust in any one stranger, institution, or other third party in order for a network or payment system to function.

via gemini.com

The core to building a trustless database is adopting a decentralised model of ownership.

Wikipedia — Decentralised system

For a blockchain database, decentralisation means having machines (nodes) add blocks of transactions to the blockchain database independent of each other. This means they are running their own instance of the blockchain database on their own node. They are [mostly] running autonomously, and have access the same source data, which is known as a Mempool, which has all the new transactions to be added to the next block.

They get busy adding blocks….

Node A in Norwich, GB

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ←…

Node B in Windhoek, NA

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ← block 6← block 7←…

Node C in Broome, AU

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ←…

See that the blockchains are not exactly the same length? It looks like Node B is much faster than Node A and C.

This is by design. Whilst it appears they are all out-of-sync, they are also listening to each other via Peer to Peer network (no centralised server or node). They are continuously running consensus algorithms, which are a very complicated set of rules that decide which version of the blockchain to sync to. When this agreement is made, the losing nodes will discard their own data, reset their blockchain and carry on adding blocks (rinse and repeat).

Node A in Norwich-> reset to Node B state

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ← block 6← block 7←…

Node B in Windhoek -> winning node

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ← block 6← block 7←…

Node C in Broome-> reset to Node B state

TIME — — — — — — — — — — — — — — — →
block 1 ← block 2 ← block 3 ← block 4 ← block 5 ← block 6← block 7←…

Without nodes, a blockchain is just a database secured with cryptographic hashing. With nodes, you will get your 100% tamper-proof database.

With this model, it’s very hard to orchestrate a centralized attack on the network to manipulate the truth. It’s also a great way to have very robust resiliency.

Since this is about Minimum Viable Protocol, I looked up what is the minimum number of nodes you need to run.

We recommend a minimum bound of seven validator nodes with stake distributed amongst the various actors within the network (depending on what the application is trying to achieve). This will allow a tolerance of two nodes to be either malicious or offline at any one time.

Casey Kuhlman, Stackexchange

Currently, the Ethereum network has 5700 running nodes from all over the world. These are the different environments nodes are running within.

from https://ethernodes.org/

As you can see, quite a big chunk of nodes run in people's homes. This is super important to ensure that the blockchain cannot be tampered with. It must be possible for anybody to participate in the network, that includes someone running a node on a small laptop, as well as big companies with mainframes. The more diversity in the network, the less risk of centralised power and tampering.

Enabling this level of accessibility is a massive challenge for blockchain engineers. The nodes have to run on a small footprint in terms of storage and CPU. Don’t, blockchain databases don’t delete data, they just keep growing and growing, so efficient storage/compression of data is a must (google merkle trees/ merkle patricia trie).

Next question. How do you get all these nodes to participate in creating this very secure database? After all, it’s decentralised, they are not connected in a commercial or legal sense.

This is where cryptocurrencies come into play. It's currently the only way (that I know of) that nodes get rewarded for adding blocks of data to the blockchain. They get paid in crypto. Currently, the Ethereum network pays 4 ETH (£2,647)and Bitcoin pays 6.5 bitcoins (£35,500). They also get rewarded for adding transactions to the blockchain. this is like a visa charge, except it's called a “gas fee”.

This is why they are called miners, as it's like they are mining for gold.

Insane Luck: Another Small Miner Pockets $270K BTC Block Reward Against All Odds

from cryptopotatoe.com

Now that there is money involved, you need to prove that your node has done the work to receive the reward. You need to prove you are following the rules of the network and that you have actually done the work to add data to the blockchain. This is called Proof of Work.

Remember this sentence from my previous article.

The magic is the input to the hash function is all the data within the block (e.g. transaction events in the last 10mins) AND the hash of the previous block.

from Minimum Viable Blockchain

Well, this part is very hard to do. It's not quite a lottery jackpot odds, but it is a one in 10,000 chance of finding a Bitcoin block per day. It's made like this by design. The miners have to repeatedly run their hash function on all their data until they achieve a target hash value set by the blockchain network. They do this by changing an input value to the hashing function (SHA-256 hash algorithm) called a nonce. The nonce can be as high as 4 billion, so it can take a while until you hit jackpot!

When you hit the jackpot, you can prove your work with the input data (all your transactions that you added to the blockchain) along with the correct nonce value you discovered from data crunching. This will show you have done your work.

This difficulty level is also created for a reason, in that the more nodes you have in the network the harder it is to create consensus. If it was easy, then it would be out of control, you would have 1000s of nodes adding data to the blockchain, and you would not know the truth, so making it hard enables you to slow down your decentralised network of nodes, along with making it only possible for a select few nodes to be able to crack the code so that it gets permission to add its block to the blockchain. You will get more than one node cracking the code at the same time. Unfortunately in Bitcoin, it's tough luck, but in Ethereum, you will get 2nd prize.

I babbled. I hope it's clear now that all of these factors (decentralisation, diversity and inclusion, miners, proof of work) make up what is referred to as a Web3 Protocol. I heard the term protocol many times in the web3 community, always self-conscious to ask what it exactly meant. Now I think I do, it seems to just be a term used for a business model and operations in Web3. Like with all businesses, you need a value proposition, target audience, partners, activities to run your business and a means to sustain your business (revenue).

If you want to build your own Web3 protocol, historically the barriers to entry were high from a technology point of view, you would have to roll your own blockchain for a start. But that has all changed with Ethereum. Ethereum enables you to program your own blockchain, it enables you to deploy your own custom code (known as “Smart Contracts”). It enables you to be decentralised running within the World Computer. It could be considered an AWS for Web3. The topic for the next blog.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store