Connect with us

News

HarmonyOne: Sharding, and Fast Byzantine Fault Tolerant protocol

Published

on

Every blockchain is designed to achieve a particular goal that might be related to what other chains are built for but with a little tweak to suit the resources and ultimate vision of the founder, team, and community. Harmony blockchain as discussed is a unique ecosystem with a huge community involvement making it sustainable and ever innovative. Some designs are introduced into the network to solve the market needs faced by users as well as developers – from sharding to the cross-chain ability to FBFT protocols. The list is endless as more changes are made on the go.

For this post, our attention will be on understanding how the sharding process functions, how the algorithm works, and how it can take care of the blockchain trilemma with a good addition of privacy tactics. This introduction makes the foundation of blockchain ecosystems four – security, scalability, decentralization, and privacy. Harmony blockchain started in 2018 and rose to $18m in April 2019 which drew the attention of investors. Although, it’s not surprising as the attention of the community, especially devs, is on creating a system that will ensure usefulness and more advanced utilities are built on it which will affect human daily living. So, what is the functionality of this blockchain? How does it work? What are the underlying principles and structures that make it stand out?

How Sharding Works

Sharding generally helps to solve the problem of speed by increasing the transaction rate of any system it is introduced into. Jake Frankenfield defines it as “‘a database partitioning technique used by blockchain companies with the purpose of scalability, enabling them to process more transactions per second. Sharding splits a blockchain company’s entire network into smaller partitions, known as “shards.” Each shard is comprised of its data, making it distinctive and independent when compared to other shards.”‘

Zilliqa blockchain is a perfect example of the application of sharding which has helped the ecosystem to validate more transactions per second. And this is what has been implemented in the Harmony blockchain. However, because the pattern in the Zilliqa system does not include the division of the blockchain data storage, there was a need to make adjustments. Why? If there is no division of the data storage, nodes with lesser resources will not easily have access to participate in the validation of transactions, thereby bringing the risk of single-shard takeover attacks.

So what’s the adjustment?

Creation of deep shard

A deep sharding process affects the transaction as well as consensus layers of the network so that each node can detect other nodes that can partake in the transaction process and do so with the detected nodes in the consensus-building process. Then, there is also an easy entrance for small nodes to participate in the network process as the need for nodes to store the entire blockchain is taken off.

For the security aspect of the sharding process, another system called the Distributed Randomness Generation was also introduced to protect the sharding process. Alexander Skidanov explained that in the process of designing a distributed randomness algorithm, three properties must be integrated: it must not be biased so that no participant in the network can in any way control the outcome of the random generator; it must not be predictable, preventing any participant from predicting what number will be generated before it is generated, and the protocol must have a degree of tolerance in situations when a percentage of actors are offline or try to act maliciously. In retrospect, developers of the Harmony blockchain observed the deficiencies of OmniLedger and Rapid chain and then built this sustainable system for Harmony.

They combined the advantages of the Verifiable Random Function (VRF), used in Algorand, and the Verifiable Delay Function (VDF) suggested for the Ethereum 2.0. so that random numbers are created by validator nodes and sent to leader nodes which come up with the final random number from that given by validators nodes. As this is happening, for the sake of security, the process of disclosing this final number is postponed using the VDF. These features make Harmony faster than the RandHiund DRG protocol by OmniLedger.

What is the FBFT Consensus?

The presence of the “randomness system” in the Harmony blockchain brought about the introduction of the Fast Byzantine Fault Tolerant protocol for its finality. FBFT is an improvement of the PBFT (Practical Byzantine Fault Tolerant) algorithm making it faster and more scalable than PBFT due to the addition of BLS (Boneh–Lynn–Shacham) aggregate that effectively reduces the communication cost. In FBFT, at least 250 validators are allowed to reach consensus within 2 seconds and for each round of consensus, a single validator acts as the leader with three phases that must pull through before a block is formed. Those phases are the announce phase, the prepare phase, and the commit phase.

As seen on the Harmony website, here’s what the entire process looks like:

The leader constructs the new block and broadcasts the block hash to all validators. This is called the “announce” phase.

The validators check the validity of the message, sign the block hash with a BLS signature, and send the signature back to the leader.

The leader waits for valid signatures with more than 2/3 voting power from validators (including the leader itself) and aggregates them into a BLS aggregate signature. Then the leader broadcasts the new block and the aggregated signature along with a bitmap indicating which validators have signed. Together with Step 2, this concludes the “prepare” phase.

The validators check that the aggregate signature has at least 2/3 of total voting power, verify the new block, sign the received block from Step 3, and send it back to the leader.

The leader waits for valid signatures with more than 2/3 voting power (can be different signers from Step 3), aggregates them together into a BLS aggregate signature, and creates a bitmap for all the signers. Finally, the leader commits the new block with the aggregate signatures and bitmaps into local DB and broadcasts the aggregate signature and bitmap for all validators to confidently commit the block too. Together with Step 4, this concludes the “commit” phase.

At this stage, the block is formed. And then other transactions through the same process while the system can be decentralized, secured, scalable, and preserving privacy at the same time.

Finally, it’s important to mention that implementation of ‘sharding’ in the system brought about the need for Kademlia, which is a routing system that aids communication among shards especially with the presence of a randomness generation algorithm. All these features tied together, with further research done to improve the network have given Harmony blockchain a distinctive mark to be used as a tool for designing decentralized, safe, scalable, and privacy-based ecosystems.

What do you think of this article? Share your comments.

 

0 0 votes
Article Rating
Continue Reading
Advertisement Earnathon.com
3 Comments
0 0 votes
Article Rating
Subscribe
Notify of
guest

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Crypto News Update

Latest Episode on Inside Blockchain

Crypto Street

Advertisement



Trending

ALL Sections

Recent Posts

3
0
Would love your thoughts, please comment.x
()
x