Turbine – Solana’s Block Propagation Protocol Solves the Scalability Trilemma
Understand 1 of 8 key technologies that make Solana the most performant blockchain in the world
Solana is the most performant permissionless blockchain in the world. On current iterations of the Solana Testnet, a network of 200 physically distinct nodes supports a sustained throughput of more than 50,000 transactions per second when running with GPUs. Achieving this requires the implementation of several optimizations and new technologies, and the result is a breakthrough in network capacity that signals a new phase in blockchain development.
There are 8 key innovations that make the Solana network possible:
- Proof of History (POH)— a clock before consensus;
- Tower BFT — a PoH-optimized version of PBFT;
- Turbine — a block propagation protocol;
- Gulf Stream — Mempool-less transaction forwarding protocol;
- Sealevel — Parallel smart contracts run-time;
- Pipelining — a Transaction Processing Unit for validation optimization
- Cloudbreak — Horizontally-Scaled Accounts Database; and
- Archivers — Distributed ledger store
In this post, we’ll explore Turbine, Solana’s block propagation protocol — inspired by BitTorrent — that solves the blockchain scalability trilemma.
The Scalability Trilemma
The scalability trilemma in blockchain technology is all about bandwidth. In most blockchain networks today, given a fixed amount of bandwidth per node, increasing the node count will increase the amount of time necessary to propagate all the data to all nodes. That’s a big problem.
However, there are myriad opportunities to optimize how data is propagated. There are many novel data propagation techniques, each of which is optimized for specific applications. For example, BitTorrent is optimized for serving large files to large groups of people using TCP, while MediaFLO is a protocol optimized for data propagation at the physical layer to improve the efficiency of multicast over wireless networks.
With that context, let’s jump into Turbine, Solana’s block propagation protocol, to explain how the Solana network propagates data to solve the blockchain scalability trilemma.
One of the challenges to high-performance blockchains is how the network propagates large amounts of data to a large number of peers. Let’s consider, for example, a network of 20,000 validators. The leader needs to transmit a 128 MB block (about 500,000 transactions @ 250 bytes / transaction) to all 20,000 validators. The naive implementation would require the leader to have a unique connection to each validator and transmit the full 128 MB 20,000 times. There simply isn’t enough bandwidth to accommodate that many connections.
Our solution to this problem, Turbine, borrows heavily from BitTorrent — although a few major technical details differentiate the two. Turbine is optimized for streaming, and transmits data using UDP only, implements a random path per packet through the network as leaders (block producers) stream their data. The leader breaks the block into packets up to 64KB in size. For a 128MB block, the leader produces 2,000 64KB packets, and transmits each packet to a different validator.
In turn, each validator retransmits the packet to a group of peers that we call a neighborhood. You can visualize the network as a tree of neighborhoods, allowing the network to grow well beyond 1,000 validators:
Each neighborhood is responsible for transmitting a portion of its data to each neighborhood below it.
If each neighborhood is comprised of 200 nodes, a 3-level network, starting with a single leader at the root, can reach 40,000 validators in 2 hops — or roughly 200 milliseconds assuming each network link is 100ms on average.
The challenge we face with this technique is security. For example: adversarial nodes can choose not to rebroadcast data, or to rebroadcast incorrect data. To handle adversarial nodes, the leader generates Reed-Solomon erasure codes. Erasure codes allow each validator to reconstruct the entire block without receiving all the packets.
If the leader transmits 33% of the block’s packets as erasure codes, then the network can drop any 33% of the packets without losing the block. Leaders can even adjust this number dynamically based on network conditions. These determinations are made by the leaders’ observed packet drop rate from the previous blocks.
Not all validators are created equal. A stake-weighted selection algorithm constructs the tree such that the higher staked validators are at neighborhoods closer to the leader. Each validator independently computes the same tree. While erasure codes can repair failures, it’s possible for adversarial nodes to position themselves in the tree such that they can induce a failure higher than their combined stake size, especially when combined with a denial of service attacks.
How do we deal with this kind of eclipse attack? Our fanout algorithm generates a stake-weighted tree for every packet using a random source based on the digital signature of the packet. Since each packet takes a different path, and the path is not known in advance, a neighborhood-level eclipse attack would require nearly full control of the network.
Learn more about Tour de SOL — Solana’s incentivized testnet event.
With one level, this technique scales somewhere between 200 and 1,000 nodes. Network cards that support 1 Gbps can transmit one million packets per second. A single validator can send packets of up to 64 KB to 1,000 machines within one second if the network connection allows it.
Solana’s utilization of both Turbine propagation, alongside breakthroughs like Proof of History, Pipeline VM, Proof of Replication, and Gulf Stream combine to create the most performant blockchain in the entire ecosystem. Solana’s testnet is live today. You can see it at https://explorer.solana.com/. For cost purposes, we are only running a handful of nodes. However, we have spun it up on many instances to over 200 physically distinct nodes (not on shared hardware) across 23 data centers on AWS, GCE, and Azure for benchmarking.
Solana will soon launch a public beta incentivizing validators to run nodes via Tour de SOL — analogous to Cosmos’s Game of Stakes — that challenges the public at large to test the limits of the Solana network while earning tokens for doing so.