Sharding, Smart Contracts and Comparable Platforms to Graphene Part 1

Graphene
11 min readJul 9, 2022

In a previous article, several comparisons were made between Graphene and other smart contract platforms such as Ethereum, Tron, and Eos. Here, the focus will be on some of the other blockchain projects and protocols that have incorporated sharding technology in the past as well as up-and-coming Smart Contract-based platforms in the crypto space making recent waves with their developments. Graphene, the latest project from the Phore team, promises much faster transaction speeds through a customized sharding architecture which will allow decentralized applications in a thriving ecosystem. Two of the main features the customized Graphene Blockchain has are Sharding and Turing Complete Smart Contracts.

Sharding

Sharding has been around for decades and one of the first mentions of it was in the paper “Correctness Conditions For Highly Available Replicated Databases” published in 1986. The term SHARD stands for “System for Highly Available Replicated Data”. This technique was designed for Horizontal Database Partitioning. Applied to Blockchain technology, it spreads out the computing and storage workload from a blockchain network so that each node does not have to process the entire network’s transactional node. Each node maintains the info related to its partition or shard. The shards allow the blockchain to remain secure and decentralized. Since the nodes are free from recording and storing all data on every node, an increase in speed of data search and transfer is achieved. The ledger entries and information are still visible to users and fewer nodes are processing transactions which allow an increase in parallel transactions.

The inclusion of this database improvement technology in the Graphene project is important because the data inherent in the blockchains of the top crypto projects have been increasing in size exponentially, with Bitcoin’s going from 1 Gb in February 2012 to 359 Gb present time and Ethereum’s going from 1 Gb in March 2016 to 991 Gb at time of writing. This growth makes it infeasible for every user to run an entire node on their computer, thus, the sharding technology in Graphene will help to alleviate the congestion seen in some of the more popular blockchain projects. In tests carried out on Graphene’s sharding architecture, a bug was discovered which was subsequently fixed that maxed out CPU usage after several minutes. After the issue was resolved, the team was able to run 8 shards with 128 validator nodes on one server at 5% CPU usage, which demonstrates the capabilities of sharding for decreasing data bloat and CPU workload.

There are other blockchain projects and protocols which are based on a sharding architecture. These are in the minority, but they include such protocols as RapidChain, Elastico, and OmniLedger. These protocols implement sharding in their own use cases and are proposed improvements to distributed ledger technology. They apply to the different blockchain classifications from private to public blockchains and beyond. While some of these projects are not as well known as some of the recent movers and shakers, they reflect some of the histories of sharding-based blockchain projects.

A comparison of several sharded blockchains from the paper “RapidChain: Scaling Blockchain via Full Sharding”, published in 2018

Elastico

Elastico was described in the 2016 paper entitled “A Secure Sharding Protocol For Open Blockchains’’ as the first secure sharding protocol with fault-tolerant Byzantine transactions, meaning it can withstand up to 1/4 of faulty nodes in the network which could lie or intentionally mislead other nodes. This is a low resiliency which allows Elastico to have committee (shard) sizes that are practical. The developers aimed to provide a protocol for a blockchain network where the participants have no pre-established identities and where the speed and number of transactions scale. When the network was introduced it had 1,600 nodes with a throughput of 40 tps and a latency of 800 seconds. It is interesting to note that this project was proposed before the integration of Segwit into the bitcoin blockchain in 2017, which helped with some of the scalability issues regarding witness data in the bitcoin blocks but the introduction of sharding as a solution for greatly increased scalability was a novel proposal. One of the flaws in Elastico is that while it allows each party to verify only a portion of the transactions, it has to broadcast all blocks to all parties and each party has to store the entire ledger. Another is that it can only tolerate up to 1/4 faulty nodes whereas other sharded blockchains which came later could tolerate up to 1/3 byzantine nodes. This is important as it reflects vulnerabilities where malicious validators could take control of the network.

OmniLedger

From the presentation “OmniLedger: A Secure, Scale-Out, Decentralized Ledger via Sharding”

In the 2018 paper entitled “OmniLedger: A Secure Scale-Out, Decentralized Ledger via Sharding”, a permissionless blockchain is proposed. The developers claimed that their network could perform at the same transaction speed as networks such as Visa’s. It is important to note that they compared their tps to Visa’s average speeds and not their speeds during peak times. This sharded blockchain’s solution was designed to fix some of the shortcomings of Elastico, one of which was an issue with decreased security as scalability increased. To defend against an attack, the protocol runs a global reconfiguration once a day so new participants can join the network. Some of the goals that the team from OmniLedger set out to achieve are low latency for confirmations, low storage so that users do not need to store the entire transaction data, shard integrity, total decentralization, secure atomic transactions within and across shards, and scalable performance which increases linearly with the number of participating validators. The team utilizes several solutions such as Atomix (a Byzantine Shard Atomic Commit protocol) which helps to process transactions across shards and RandHound, a bias-resistant public randomness protocol that assigns random validators to shards to avoid adversarial control of the network as it scales, to name just two.

RapidChain

This sharded blockchain project boasts a speed of 7,300 tps with a latency of 8.7 seconds. The project had 4,000 nodes when reports about it were written around 2018–2019. It takes around 50 seconds for a 2MB message to get to 90% of the 4,000 nodes in something like Bitcoin’s network. With sharding-based consensus, a random committee of nodes is elected and runs consensus on behalf of the other nodes. This increases the data transfer rate linearly with the number of nodes in the network. RapidChain utilizes full sharding, which focuses on the communication, storage, and computation of transactions. Previous blockchain works before this one had focused their sharding in two out of three directions, namely storage and computation or communications and computation. The team proposed their work as the first sharded public blockchain in keeping a focus on all three areas. Some of the developments in RapidChain include fast cross-shard verification, decentralized bootstrapping, slow reconfiguration (which protects against slow-adaptive Byzantine adversaries) which is a feature missing in some sharding based protocols such as OmniLedger and Elastico, High resiliency (able to tolerate less than 1/3 of faulty nodes as opposed to 1/4 like in some previous protocols) and reduced consensus P2P time on large blocks by 3–10 times compared to Elastico and OmniLedger.

Smart Contracts

While the theory of smart contracts dates back to the 1950s, It was Nick Szabo who thought the idea up in 1994. He was also the inventor of Bit Gold in 1998 which was a precursor of Bitcoin which would come a decade after. Nick Szabo published an article on Extropy magazine in 1996 where he described his new invention:

“I call these new contracts “smart”, because they are far more functional than their inanimate paper-based ancestors. No use of artificial intelligence is implied. A smart contract is a set of promises, specified in digital form, including protocols within which the parties perform on these promises.”

These smart contracts have applications in modern society from vote tracking, record keeping, mortgages, insurance, medical research, property ownership, and many more. An example of one such use case is Wyoming-based company BeefChain which utilizes its blockchain to enhance traceability via RFID tags on livestock to allow both ranchers and consumers to get the most out of their money and resources via adequate quality analysis. Smart contracts allow for many benefits over traditional contracts such as faster speeds of completion, cost savings as the process is automated, inherent trust due to distributed ledgers in the form of blockchains, increased security via utilization of encryption for transactions, and more. The smart contract space has been booming in the last several years. The following are just a few of the smart contract platforms in this ever-expanding subfield of the blockchain universe.

Cardano

Cardano was envisioned in 2015 to resolve some of the issues with the blockchain technology of the times such as sustainability, interoperability, and scalability. It is a fully open-source, decentralized proof of stake blockchain platform aimed at becoming an evolving ecosystem. When Cardano was first tested in 2017, it had speeds of 257 tps (where Bitcoin has 4.6 TPS and Ethereum 1.0 has 15–20 TPS). Cardano is a fully open-source, decentralized proof of stake blockchain platform which has 5 phases of development that were named according to important historical figures. After the first version of Cardano was finished in 2017, the team set out to work on improving decentralization, developing smart contracts, increasing scalability, and decentralized governance. Cardano runs on Oroborous Praos consensus protocol (enables a block creation cycle for epochs lasting 5 days) which is said to be the first academically and mathematically researched proof of stake protocol. One of their developments of last year includes an upgrade from the centralized Byron network to the decentralized Shelley network. The team includes computer scientists such as the accomplished A.I researcher Dr. Ben Goertzel and mathematicians such as the blockchain veteran Charles Hoskinson. They describe themselves as having evolved from a scientific and research-focused approach that aims to provide advanced crypto banking systems to countries where many are unbanked and do not have access to such services. Some of these countries include Ethiopia, South Africa, Nigeria, Kenya, Tanzania, and others.

Stellar

Stellar (XLM) was made to help the unbanked but it was modified to help financial institutions have connections with each other through the technology inherent in the blockchain. It is decentralized and open source. Stellar was originally forked from the now infamous Ripple around 2014. The transaction fees for Stellar are very small, something that some projects like the Ethereum network and the DeFi space are suffering from at present. Stellar has its own types of smart contracts called Stellar Smart Contracts which utilize several conditions such as multisignatures, sequencing, time bounds, and batching/Atomicity. With these SSC’s, contracts can be deployed and executed by multiple parties (multisignature), procedures can be set to proceed or not in a contract (batching/atomicity), transaction orders can be set (sequence), and the time that a transaction is to be processed can be set (time bounds). In January of this year, Ukraine’s Ministry of Digital Transformation announced that they would be utilizing Stellar’s platform to engineer their Central Bank Digital Currency or CBDC. It is a testament to the impact that Blockchain technology has had on the world when governments are starting to utilize it for keeping track of their most prized asset, money.

Amp

Amp was previously known as Flexacoin which was an ERC-20 token that was built to facilitate payments as collateral on the Flexa network. This network is being utilized by thousands of retail locations in North America where customers can use their fiat or crypto to pay for a product via the Amp token. The Amp token utilizes collateral managers as smart contracts which can control the function of transactions in collateral partitions which in turn are the vehicles for the transactions. Recently, Visa and Mastercard both stated they are planning to raise the fees for swiping with their cards in April. As such, there are other payment options such as cryptocurrencies which can be more attractive to the consumer due to their less expensive fees. With the Federal Reserve’s Jerome Powell recently highlighting the focus of the development of a digital dollar 2021 as well as different countries like Ukraine mentioned earlier considering the rollout of their own Central Bank Currencies (CBDC’s), cash may be a thing of the past and digital tokens and dollars will reign in the new era of blockchain finance.

Graphene

Graphene will combine smart contract technology with sharding for an ecosystem that has many uses in today’s exponentially growing data-driven industries. Graphene aims to tackle some of the challenges in the blockchain space, one of which is interoperability between smart contract platforms so that processes can bridge between said platforms. The language which will be utilized for smart contracts is Ethereum WebAssembly which will allow the development of smart contracts in several traditional programming languages such as Rust, C++, and C. Another issue found in some of the more popular platforms is that the algorithms used by such cryptocurrencies as BTC and Ethereum are very CPU cycle intensive. Each node also records all the data on the blockchain due to the consensus protocol but the increasing customers and growth of the blockchain slow down the system due to more cycles needed and this slows the network down. Some transactions per second speeds of the top payment systems are:

Visanet — 1700 TPS

BTC — 7 TPS

Ethereum — 30 TPS

Binance Smart Chain — 300 TPS

Graphene Blockchain — 100K+ TPS

With Graphene’s custom-built blockchain, the sharding capabilities give it a data transfer rate of 100K tps (with a theoretical 29 Million tps). This is unparalleled and will be a vital factor in enabling greater scalability as the demand for DApps and shard-based blockchain services increases. Graphene has several key components in its blockchain architecture which include Shard Modules, a Beacon Chain, Validator Modules, Relay Modules, and Cross-Links. The beacon chain is the main chain of the network which is the link between the different Graphene shards and it deals with validator and PoS transactions. The Validator Modules produce blocks for the beacon chain. They deal with user-side PoS operations and will have features such as payment rewards for securing the system. The Shard Module processes functions for the side-chains and keeps it properly synchronized with the main chain, as well as acting as administrator for all side-chains. The Relayer Module aids in faster sync times with balance and transaction data due to its data management methods which allow validators to perform transactions without syncing the whole state of the shard’s history. The Cross-Links are consensus checkpoints that help in cross-shard transactions.

Graphene will utilize the Casper protocol which will help the ecosystem be more secure against byzantine nodes and malicious actors. The way it does this is by eliminating the staked rewards of validators if they deploy tactics such as the “nothing at stake” problem. The Graphene project will place the Phore Blockchain team in the next evolutionary step of development that sees the integration of sharding technology and smart contracts as another improvement in its blockchain’s journey of development and improvement in the constantly changing landscape that is the blockchain industry.

--

--

Graphene

Scalable sharding Blockchain written in Go. Smart Contracts, Dapps, DeFi. Interoperable. Customized shards optimized for different use cases. Do it all.