Where There Are Systems, There Are Protocols
Blockchain technology came about as the groundbreaking solution people didn’t know they needed for problems they didn’t know they had. With it came a plethora of terms and concepts that remain unexplained to this day. One such term is blockchain protocol – a term often used interchangeably with blockchain networks, whereas it’s not exactly the same thing.
In this post, we will break down the concept of a blockchain protocol, its differences from blockchain per se, as well as some of its key workings and applications.
What Is a Blockchain Network?
A blockchain is the base layer of all things crypto. It’s a decentralized network that allows for fast, permissionless, anonymous, and secure transactions with a peer-to-peer digital asset across the globe. The network serves as a distributed database: all the transactions ever carried out on the blockchain are open, anonymous, stored in blocks, and can be viewed by anyone.
A blockchain is powered by a distributed network of nodes – computers running to keep the network going across the globe. Nodes usually work as miners (in Proof of Work networks like Bitcoin) or stakers/delegators (like in Proof of Stake networks like Ethereum or Cardano). For their efforts, miners and stakers get a share of the transaction fees that they help to verify.
Miners in Proof-of-Work networks are tasked with deciphering the hash – a unique cryptographic identifier – of the next block of transactions. For that, they use raw computing powers and essentially compete in calculation speed. In Proof-of-Stake networks, this is done not by computing but by holding a large amount of the network’s native currency and thus having a say in what blocks to approve next.
Blockchain per see was pioneered by Bitcoin, as was BTC, the first cryptocurrency in existence. Conceived by the unknown entity going by Satoshi Nakamoto, the Bitcoin blockchain was brought to life rather symbolically by a decentralized group of enthusiasts.
The Bitcoin cryptocurrency serves as the fuel for the network, as users pay a share of their transactions as the transfer fee.
The Ethereum blockchain was built upon Bitcoin and expanded the blockchain arsenal with smart contracts. Smart contracts are pre-coded algorithms that execute themselves when a particular set of conditions is met. For instance, send 200 ETH to the address (X) as soon as the NFT token number (XYZ) is received from the said address.
Smart contracts allow for unparalleled flexibility in deploying blockchain applications and are essentially the fabric of all of today’s DeFi. Pioneered by the Ethereum network, smart contracts caught on and got implemented by most of today’s known blockchain protocols.
Now that we’ve established what a blockchain network is let’s figure out what a blockchain protocol is.
A blockchain protocol is essentially the rules governing how the blockchain network operates. It is NOT the blockchain network per se, but rather a set of rules baked into all of its workings. It defines when, how and to what extent different elements of the network can or cannot do certain things.
The backbone of every blockchain is the set of protocols that govern its every move. These protocols are the pillars that uphold the network’s security, connectivity, and consensus procedures, ensuring that everything runs like clockwork. With no central authority to oversee transactions, these protocols are the key players in maintaining a trusted ledger copy and verifying transactions through a consensus method. Once validated, they’re recorded in unalterable blocks.
Major Protocols Around Us
Where there are systems, there are protocols. A protocol is a foundational layer of code that tells something how to function. Of course, protocols aren’t exclusive to cryptocurrency. They’re fundamental to how the internet works, governing the transmission of data from one computer to another.
Many things we now take for granted have been enabled and governed by network protocols. The most prominent ones include the TCP/IP: Transmission Control Protocol/Internet Protocol, used to connect devices over the Web, and HTTP/HTTPS: Hypertext Transfer Protocol (HTTP), used to transfer data between web servers and clients.
What Makes Blockchain Protocols Different?
However, there’s a difference when it comes to blockchain protocols. It gets more interesting and complex than traditional data transfer. A blockchain network is a distributed framework of decision-making organisms, each one having more to do than just follow the algorithms. This implies that the set of rules has to be agreed upon, observed, and verified by all the nodes making up the network.
Here’s where things get a bit complex. There are actually 3 types of blockchain protocols:
- Networking protocol
- Consensus protocol
- State transition function
Each type is just as important as the other ones, and all three of them have to be followed to the letter for things to run smoothly.
The networking protocol lays down the rules by which the nodes of the network can (and cannot) communicate. This includes how nodes discover and recognize each other, exchange information about blocks, transactions, and other run-of-the-mill things. It contains the syntax defining how the nodes should decipher each other’s messages.
The consensus protocol outlines how nodes agree upon what transactions to deem valid or invalid. As you probably know, each node keeps a complete copy of the entire network on its hard drives. The copy includes every single bit of data ever registered on the network. Each copy is updated in real-time as new blocks get forged and new transactions validated.
Thus, when a node submits a new block to be added to the network, it doesn’t send out just the one block – it actually submits its entire copy of the blockchain to date. And it’s the job of every single node on the network to scan, assess and (in)validate every single copy of the network submitted by all other nodes. In Proof-of-Work networks like Bitcoin, only the longest chain of blocks gets validated, meaning that most nodes agree on its validity. As you can imagine, it’s a heck of a lot of work and takes about as much computing power.
In a proof-of-stake network, validators are selected at random by the networks out of the nodes that hold large amounts of the network’s native coins in their wallets. Some may equate this approach to capitalist monopoly, but the prospect of monopolizing the network has been preemptively tackled. This includes limiting the amount each node is allowed to stake, the number of transactions it’s allowed to verify, the frequency of those verifications, etc. Whatever the case, the limits and restrictions are all laid down in the protocol.
State Transition Function
Here’s where things get really techy.
The state is essentially whatever the network ‘thinks’ is the case at any given time. The current ‘locations,’ relations between, and movements of, all nodes, transactions, and blocks – all constitute the network’s state.
The network’s State shift over time, as does the set and balance of elements within it. State transition needs to be registered in a particular way, and the network protocol sees to that as well. As nodes enter and leave the network, exchange information, and alter the blockchain’s fabric, new possibilities arise, along with new complications.
The state encapsulates everything the network can and cannot do at any given time. If conditions A and B are met, then the network is able to do X and Y no more. If the state is defined by conditions C and D, then the only possible actions are W and Z. This shift in logic is crucial to the network’s operations.
Each part described above serves as a piece of a triune puzzle called the Verified State. As information about transactions enters into the Networking protocol, it gets validated or discarded there. If verified, it then moves on to the Consensus protocols, which serve as the gatekeeper. It allows data to enter the network’s state if the data agrees with that of other nodes.
If accepted, data is then passed down into the State Transition function, where it then becomes the network’s new Verified State. The Verified State is the practical frontier that defines what actually ‘happens’ after the block is added to the chain. This may include changing a certain wallet’s balance or launching a smart contract.
Can a Node Stray From the Protocol?
Can a node disobey the protocol, and if yes, what happens? As said before, validating blocks requires all nodes to check all data submitted by all other nodes online. To do that, the blockchain protocol has to be followed to the letter. If one node doesn’t obey – then it just won’t be able to cooperate with other nodes and, therefore – won’t be able to reap the rewards. This means there is no room for disagreement in a blockchain, making its state essentially totalitarian.
However, sometimes a blockchain is forcibly or deliberately split into two parts, which is called a fork. Forking happens precisely because some nodes submit data conflicting with that of the rest of the distributed ledger.
Under normal working conditions, the network won’t bother figuring out the reasons why the data is faulty – it will just cut off the node from the rest of the network, leaving it high and dry. Thus, potentially malicious nodes are disabled from impacting the network. It’s possible that the majority of all the ‘wrong’ copies of each blockchain are still kept somewhere as we speak.
However, forks can also be a good thing. A blockchain network can’t just ‘update’ its current state. Each new verified state is a full-on new copy of the network.
You may have heard that each major blockchain update is called a Fork. Thus, when blockchains need to be updated, they are deliberately forked into a new copy by their developers. The pre-update version is kept as legacy, while the newly-forked one becomes the real deal.
Understanding the Bitcoin Protocol
Let’s dig a little deeper into what things a blockchain protocol governs. As an example, let’s take the Bitcoin network.
Bitcoins are not handed around like lumps of gold. Whenever you’re sending and receiving BTC, you’re not actually ‘getting’ or ‘giving’ bitcoins. What really happens is each new transaction registers a digital signature. The signature contains a hash – the unique cryptographic ID of the previous transaction – and the recipient’s public key. Thus, each transaction is secured by cryptographic proof, which cannot be altered or falsified.
The main concern among buyers and sellers online is that, at some point, they might be taken advantage of and fall prey to financial fraud. This may come in the form of phishing or outright fake transactions. There’s also the double spending problem, as well as the mere tampering with the system in search of unfair profits. As a blockchain is not governed by a central entity, all transaction safety concerns fall entirely unto the protocol’s shoulders.
Bitcoin developers addressed those concerns and introduced mechanisms like digital signatures and cryptographic proof to mitigate them. Thus, the Bitcoin protocol only allows to validate blocks that have a cryptographic proof that matches that present in other nodes.
Timestamp Server and Proof-of-Work System
Double spending is a massive issue in blockchain. It’s a scenario in which a user tries to spend the same digital currency twice. This can occur due to the digital nature of the currency, potentially making it easier to replicate or copy the currency without detection.
Suppose a user has 1 BTC and tries to spend it twice by sending it to two different addresses. In a traditional payment system, the system would detect the double spending attempt and reject the transaction. However, in a decentralized blockchain network, this is prevented by the proof-of-work system and consensus algorithm, which ensures that each transaction is valid and not already spent.
To ensure this, the Bitcoin protocol implemented a timestamp server that sticks a unique time label to each transaction’s hash. The proof-of-work system takes note of each timestamp and rejects any transactions with a hash matching those already registered in the system.
Each new block forged in a Bitcoin network has a proof-of-work attached to it. The proof is also called Nonce or Number Only Generated Once. It serves as cryptographic proof that a miner has spent some computing powers to verify the block and was successful.
However, there are bad blocks that contain data contradicting what was mined by other nodes. In case a bad block is detected, it gets pulled and further assessed for any inconsistencies. If found valid, the block will be added to the network as usual. If not – it gets discarded.
Protocol Biggies So Far
That said, each major network follows its own protocol, crafted specifically for its consensus mechanism. The Bitcoin network operates on the Bitcoin protocol, Ethereum – on the Ethereum protocol, etc.
Below are the most prominent blockchain protocols to date:
Polkadot is a trailblazing blockchain protocol that has revolutionized interoperability between different blockchains, enabling seamless communication and data sharing with the help of smart contracts. Its unique Nominated Proof of Stake (NPoS) consensus mechanism offers a highly secure and scalable platform with an ultra-fast average block time of just 6 seconds and low-weight transaction fees averaging $0.10-0.20.
Notable projects: Kusama, ChainX, Moonbeam, Chainlink, Reef Finance
Avalanche is an open-source platform that has emerged as a beacon of hope for decentralized finance (DeFi) enthusiasts and blockchain developers worldwide. Its cutting-edge Avalanche consensus mechanism permits high throughput and rapid finality, making it one of the most scalable and fastest blockchains on the market. Avalanche boasts an average block time of 2 seconds and transaction fees averaging below $1.
Notable projects: Pangolin, Trader Joe, Benqi, Lydian Lion, SushiSwap
Polygon is a next-generation Layer-2 scaling solution that is transforming Ethereum’s scalability and transaction fee issues. Its Proof-of-Stake (PoS) consensus mechanism validates financial transactions quickly, with an average block time of 2-3 seconds, far faster than Ethereum. With an average transaction fee of $0.002, Polygon is an ideal choice for developers looking to build cost-effective decentralized applications.
Notable projects: Aave, Quickswap, Curve Finance, Polymarket, Zapper
Solana is a high-performance blockchain platform that has taken the blockchain industry by storm thanks to its Proof-of-History (PoH) consensus mechanism. Solana’s high throughput and fast finality, with an average block time of 0.4-0.8 seconds and an average transaction fee of $0.00025, make it an incredibly rapid and affordable blockchain platform.
Notable projects: Raydium, Serum, Mango Markets, Audius, Bonfida
Binance Smart Chain (BSC)
Binance Smart Chain is a blockchain platform that has changed the game with its compatibility with Ethereum Virtual Machine (EVM) and its ability to run decentralized applications. Its compatibility also makes it an attractive option for developers looking to migrate their applications from Ethereum to a more efficient and cost-effective platform.
Notable projects: PancakeSwap, Venus, Spartan Protocol, BakerySwap, Autofarm
Where To Look For Blockchain Development Solutions
At ICODA, we have years-long expertise in blockchain development services and developing blockchain products that work. If you have a blockchain software development project, we’re here to help. Whether you need a token or a DApp, a DEX or an NFT marketplace launched, or just trying to figure out how blockchain development solutions can benefit your business – you’ve come to the right place. Contact us now to get a brief plan and start working soon.