Thanos Development Story — 6

Infrastructure of Thanos network

Austin O
Tokamak Network
4 min readAug 28, 2024

--

The TOP project is continuously striving to provide the best Layer 2 user experience. To ensure continuous service, we secure high server availability and charge low fees to enhance the user experience. We are constantly configuring, testing, and improving our infrastructure.

In this development story, we will briefly introduce how we are managing, deploying, and testing the infrastructure for the launch of the Thanos mainnet, as well as the issues that have arisen during network operations.

Infrastructure

The Layer 2 ecosystem is evolving and changing at a rapid pace. The TOP project is developing Thanos based on the OP-Stack and actively incorporating its rapidly advancing technology. Additionally, the Thanos network is applying its native token, TON, and developing predeployed smart contracts for on-demand Layer 2.

To apply these rapidly changing technologies and provide users with stable services, it is essential to create an environment that closely resembles the actual operating environment and conduct repeated experimental tests. To achieve this, the TOP project has adopted Terraform, an Infrastructure as Code (IaC) tool, to manage the infrastructure as code, enabling quick and reusable infrastructure setup.

The diagram above summarizes the current infrastructure of the Thanos testnet. As infrastructure becomes more complex, it can be challenging to reuse and maintain. Therefore, the TOP project strives to model and build the infrastructure as intuitively and simply as possible.

All infrastructure components are deployed using Terraform. The nodes that make up the Thanos network reside in a private network, and services provided to users are delivered through a load balancer. Most computing resources are managed as Pods through EKS, centralizing the management points.

A small number of authorized operators can flexibly and quickly respond to emergencies using Kubernetes command-line tools. Tools like GitHub Actions and ArgoCD are used to efficiently track and manage the latest changes.

Additionally, a monitoring system is set up to track network status, batch data submissions, OutputRoot data submissions, and more. If any issues arise, alerts are sent to the operators, allowing for a swift response.

Test of Thanos network

Deposit / Withdrawal Test

The most sensitive aspect of Layer 2 is the movement of assets between the Ethereum Network and Layer 2. Therefore, whenever new features are added, we conduct deposit and withdrawal tests between Layer 1 and Layer 2.

Previously, we tested this by simulating a virtual environment using E2E test codes. To ensure more secure and reliable testing, the TOP project is developing automated scripts to conduct deposit and withdrawal tests in an actual developer network, in addition to the existing virtual simulation.

Performance Test

The TOP project is always striving to guarantee over 99.9% high availability for its users. However, indiscriminately increasing resources to achieve this can lead to increased operational burdens. To find a balance, the project has developed Tokamak-trunks, a tool for conducting performance tests to evaluate and manage node performance. This helps determine how and when to scale computing resources under various conditions.

Currently, the Thanos testnet nodes are operating with specifications capable of handling up to 3000 RPS (Requests Per Second)

Operating Issue

Blob cost

Optimism uses blobs instead of calldata for data availability after the Ecotone upgrade. Using blobs can store data at a fraction of the cost compared to calldata, potentially making rollup costs hundreds of times cheaper.

In the case of the TOP project, we temporarily operated the Thanos testnet by applying the Ecotone upgrade internally before its official release. During this process, we found that while blobs are generally cheaper, there were instances where the cost of blob fees spiked, making data storage significantly more expensive than calldata.

This market situation was also observed on the Ethereum mainnet. The image below captures transactions from the BatchInbox that stores blob transactions on the Optimism mainnet.

There was a situation where the transaction fees exceeded 2 ETH per transaction. During this time, Optimism had to temporarily switch back to calldata until the blob fee market stabilized. High fees for data availability negatively impact both operators and users.

Currently, the Thanos testnet has a low transaction volume and uses Span batch to compress data efficiently, resulting in minimal price differences between blobs and calldata. To prevent abnormal spikes in blob prices, calldata is used.

Reflecting on these circumstances, the TOP project is evaluating whether to use blobs or calldata before the Thanos mainnet launch. The leading approach is to automatically switch between calldata and blobs based on which is cheaper, ensuring the best approach for the ecosystem.

In this story, we briefly reviewed the efforts and issues faced by the TOP project team in operating Thanos.

Next, let’s explore the development story of how the Ecotone upgrade was introduced to Thanos to utilize blob transactions, as part of one of the most important upgrades of the Ethereum network this year, EIP-4844.

--

--