Article by: Nilotpal Mukherjee, CBO at Marlin Protocol
Unless you’re hiding under a rock, I am sure you’d have heard of Blockchain and the associated technicalities jarring it. Keywords like Decentralization, Bitcoin, Mining, Ledgers, seems to be finding new owners every day, with more romanticism being built around “Satoshi”. While the enthusiasm amongst you and me is burgeoning, the need for a secure and scalable infrastructure is becoming all the more imminent.
Scalability the big buzzword of town has been the strongest point of debate for over a year now by Crypto critics, experts and Enterprises alike, thwarting mainstream adoption of the technology. Interestingly so, if Blockchain in its current shape were to support FB, it would just be able to support 15 likes/second, against the millions which otherwise flow through FB network. Couple those millions with the amount of activity happening at Snapchat, Instagram and Youtube, and one can visualize the instant need of scalability for Blockchains
Now that we have talked about Scalability challenges, let’s actually break down the core principles of Blockchain and try and understand how the whole scalability thing works and wherein the P2P network exists the real bottleneck. For simplicity of discussion, we will consider Bitcoin as the base blockchain, but the problem is identical for all blockchains alike.
Deconstructing a Block:
Blocks are the founding pillars of Blockchain, which stores a set of information and links to one another to form a chain of information. The way Bitcoin works, is that every time a transaction is executed, it needs to be stored in a so called “digital container” called block, and preserved immutably forever. In every 10 minutes one such new block is created by a process called mining (‘something similar to one digging rocks to extract gold”). As the new block is mined, it is being propagated to the entire Bitcoin network using a “P2P Propagation Mechanism”, which is a fancy way of expressing an “information diffusion process” where one miner sends the block to its 8–10 peers, who further sends it to their peers, etc., until the block reaches the entire network trustlessly.
The 3 major planes of a Crypto network:
The above process can be fitted into a simpler architecture easier to visualize. Let’s imagine a pyramid with 3 planes — Network plane, Consensus plane and Ledger plane.
The network plane is where the “P2P propagation runs”, the consensus plane is the functionality that mines blocks for a distributed consensus to be reached, while the Ledger plane is where the blocks finally gets stored once they are mined. As a general abstraction, the consensus plane ingests messages from the Network Plane and outputs transactions for insertion into the system ledger for integration into the blockchain
Over the last 1 year, several projects have worked on scaling blockchains with primary emphasis on the Consensus plane, but network plane, which is the foundation of these systems has mostly been assumed to be a black box which just works.
Block Propagation on Network Plane:
Bitcoin’s P2P network is formed of miner nodes where the nodes randomly connect with each other. Transactions and blocks are transmitted over this network by these nodes, until each has received the message. For a message to be diffused through the network, the transaction travel in hops. With each iteration a set of 2 nodes are sent the message, and the network diffusion grows by a factor of 2^n. The diffusion increases exponentially as the hops increase, and after 12–15 hops, the entire network receives the message.
Blockchain throughput is measured by the number of transactions per second that it can support and is measured as
· Throughput = Transactions/Block * Blocks/second (Inverse of Block interval),
where Transactions/Block is a factor of Bitcoin’s current block capacity and average transaction size
· Transactions/Block = Bitcoin capacity /average Transaction size
The current Block capacity for Bitcoin is 1MB for a Block interval of 10 minutes and given the average transaction size of nearly 540 bytes, the Bitcoin network currently processes ~1950 transactions per Block, which translates to ~3 transactions per second (TPS).
To increase the throughput one can either increase the Transactions/Block or Blocks/second.
A lot of work has already gone into increasing the number of transactions per block using both on-chain and off-chain methods. To increase the capacity by a factor of 10x, teams have tried increasing the block size by x10. An increased block-size generally keeps the number of hops intact — 12–15 hops for the whole network, but requires sending a larger block (1 * 10MB) over the Bitcoin link. Although the transaction/block here increases, but it leads to the issue of network throttle, increasing the propagation time by a factor of 10x, further opening up an even more critical debate of Bitcoin forks. The hard-fork of Bitcoin into Bitcoin Cash stands testimony to one such attempt.
Blocks/second on the other hand is another significant area of consideration for network scaling, but till date has been oft-neglected due to several throttling factors. The current system of gossip that determines travel time in Network plane, is certainly inefficient for its lack of features like latency optimization, pipelining, redundancy, message losses, congestion, and others, which hinders Bitcoin’s network stack from reaching the per-node link bandwidth.
On keen observation, one can now easily sense a stage being perfectly set, for a further exploration in this area, which can decrease the propagation time by a factor of the scale a new efficient system can bring in, without affecting the fork rates. If any project can make the network layer more efficient and reduce the block propagation time significantly, enhancing transaction finality, it would open doors for the next wave of Blockchain adoption.
Videos of a block propagating across the network
Bitcoin Network Monitor - DSN Research Group, KASTEL @ KIT
Bitcoin Network Monitoring and Research at KIT, DSN Resarch Group
Major focus on Consensus so far, but time for Network layer to drive the next wave:
After analyzing the various aspects of a Block journey, let’s circle back to where we had started the discussion from. The last 1 year has seen projects primarily emphasizing on the consensus plane. Both on-chain and off chain scaling solutions have been explored widely with on-chain projects like Zilliqa, Wanchain, Dfinity, EOS trying to modify the overall consensus to achieve faster throughput, while side-chain and off-chain projects like Plasma, Lightning Network, Raiden Network etc, creating ways to achieve scale by computing off the chain, and storing the final output on-chain. But most of these have either failed to meet the other specific needs of security and/or decentralization, or have fragmented the network enough causing concerns of adoption.
You can clearly sense a revolution much needed now at a fundamental layer — “Network layer”, which can have bigger scaling reach on the whole Blockchain ecosystem. A solution which can have a multiplicative effect on all Decentralized applications alike, and would tie the network up more fundamentally stopping further fragmentation.
Some amount of good work has already started in this space, with projects trying to increase the speed of block propagation. These projects focus on roughly two main issues: block compression to limit the amount of data that needs to be propagated over the network, and relay speed to cut the time it takes for blocks to propagate.
-Marlin, the startup I work at (and will describe further below)
· BloXRoute, a startup founded by a subset of Falcon Project team members is aiming to commercialize cut-through routing technique to increase speed
· Marconi, a networking startup working on creating secure communication pipes designed down to the ethernet level to bring in security and upgradability to the communication network.
· Orchid is creating an open source network with modifications to Gossip.
· Other projects like Fast Relay Network, Fibre and Falcon are trying to optimize for speed, package losses, and smart routing, but have mostly failed to gain mass adoption due to their individualistic approach.
We at Marlin Protocol are trying to solve the above problem with a much more holistic reach.
Marlin aims to be a disruptor for the decentralized ecosystem. Its efficient P2P overlay, aims to improvise on performance, higher resiliency, improved quality of service, stronger anonymity guarantees, efficient routing, and promises to aid peer-to-peer communication to achieve 100ms latency and 500x higher throughput over and above the existing Blockchain solutions. Projects run on Marlin can have their individual scaling components, and add the multiplying scale factor of Marlin below at the network level, to further speed up their systems.