TL;DR: In the spirit of “show, don’t tell”, we are proud to present a demonstration of Tezos’ ability to process one million TPS, using Smart Rollups and a data-availability solution built for Tezos.
With Smart Rollups live on Mainnet since March, it’s time to demonstrate the power of this technology to the world!
Smart Rollups represent a groundbreaking design philosophy in that they enable custom rollup solutions to be built using any programming language that compiles to WASM. See this page for a quick introduction, or the Tezos documentation for a more technical walk-through.
But Smart Rollups also play another crucial role: scaling the Tezos network to serve billions of users engaging in high-throughput activities, enabling gas intensive computation, and keeping fees low.
This is done with a combination of horizontal and vertical scaling, as described in our blog post on how to scale Tezos from early 2022. Now we are happy to be able to show the outlined approach in action, with a public demo showcasing a throughput of 1 million transactions per second (TPS).
Watch each transaction happen
To show the throughput achieved in the demo as more than a few metrics on a dashboard, the setup includes a visual representation of the transactions as they happen.
The visualization consists of a series of 5-megapixel images being displayed one by one on a webpage.
Each transaction in the demo contains information about one RGB color component in one pixel, meaning that three transactions are required to update a pixel. Hence, the display of each 5-megapixel image represents 15 million transactions.
As the transactions are executed, the image changes progressively, showing a full change of image for each 15-second block. 15 million transactions executed in each 15-second block: one million transactions per second.
The demo runs for two minutes, and a total of eight images are displayed. We should perhaps emphasize that displaying these images serves purely to create a more tangible experience of the throughput achieved. The transactions can represent any type of blockchain operation.
The visualization setup was created by Elevated Labs, and the technical details were presented at the recent TezDev developer conference in Paris. Here, Trilitech’s Emma Turner and Nomadic Labs’ Thomas Letan also gave the audience an exclusive preview of the demo. Watch their presentation and the demo preview here.
A realistic demonstration
The demo is designed to be as realistic and publicly verifiable as possible. In particular, we are not cutting corners when it comes to defining a transaction.
- Transactions in this demo consist of the transfer of a Tezos ticket between two rollup accounts.
- Transaction size is similar to that of transactions typically processed on Mainnet1.
- Every transaction is individually signed and checked. It’s an important factor when comparing TPS claims across different blockchains, because these are the costly aspects of the computation done for each transfer.
- Rollups are working exactly as they would in a real-world setting (publishing commitments, etc.).
- The procedure and code will be made public, so that any third-party may reproduce it.
The demo is carried out on the public testnet Mondaynet with 1,000 Smart Rollup nodes (horizontal scaling) each processing 1000 TPS (vertical scaling).
All nodes are deployed in Google Cloud on 600 ‘c2-standard-16’ instances. The transactions themselves could be executed with half the computing power, but the extra CPU is required for the visualization.
Avoiding data bottlenecks with DACs
In total, transactions equivalent to about 16 gigabytes of data are carried out over the two minutes, requiring a bandwidth of about 133 megabytes/second.
This is far above Tezos’ current block capacity. A protocol-level solution to this bandwidth challenge, the Data-Availability Layer, is currently under development and is expected to launch in early 2024.
In the meantime, to avoid making Layer 1 a bottleneck in this demo, we use Data Availability Committees (DACs), with each rollup having its own DAC, i.e. 1000 instances. For a deeper dive into DACs, see this article.
The principle is this: Instead of posting newly received rollup messages directly to Layer 1 in their raw form, the messages are given to a DAC, which stores the data off-chain, creates a Merkle tree with hashes of all the messages, and returns a root hash signed by the DAC. Together, the root hash and signature(s) are called a DAC certificate.
The DAC certificate is then posted to the rollup inbox on Layer 1. Anyone running a Smart Rollup node can verify the contents covered by the root hash by requesting the input data from the DAC using the reveal data channel.
The use of DACs makes the setup very efficient in terms of bandwidth, as it allows us to represent the full 16 gigabytes of data in just 8000 Layer 1 messages (~1.2 megabytes in total), with each of the 1,000 DAC instances posting one message in each of the eight blocks that are produced during the 2-minute demo. This is far from the 120 million messages it would require to post all transactions directly to Layer 1.
We’re not stopping at one million
Reaching a million TPS is just a first milestone, as the work to scale Tezos continues.
In a keynote presentation at TezDev 2023 entitled ‘Tezos 2.0: The Next Era of Rollups - Ultra High Throughput’, Tezos co-founder Arthur Breitman outlined a way to scale Tezos even further with a rollup-centric approach. Other talks and highlights from the TezDev conference are available here.
We take pride in making this demo realistic and reproducible. Should you wish to check our work and perhaps set up your own test, we are happy to assist.
And similarly, don’t hesitate to reach out if you are looking for a blockchain solution that is future-proof, flexible, highly scalable, and not least, fully decentralized. Because that is exactly what Smart Rollups are all about.
Notes
-
About 160 bytes. The payload includes sender and receiver addresses, an amount, the RGB component identifier (which can be seen as a token), and the transaction signature. ↩