Equilibrium's Infra Bulletin #6: Running Linux on a Rollup, Fully Homomorphic Encryption 101 and Espresso's HotShot & Tiramisu
Equilibrium Labs builds the state-of-the-art of decentralised infrastructure. We are a global team of ~35 people who tackle challenges around security, privacy and scaling.
This newsletter allows us to share more about what we read, what excites us and what we think is relevant to the space. In addition, you will get a glimpse into the organisation and our culture.
Research, Articles and Industry News:
📚Cartesi - Application-specific rollups with a Linux runtime - Recommended by Teemu:
Cartesi is a layer-2 solution that’s designed for the development and deployment of scalable decentralized applications. It works similarly to other optimistic rollups, except that Cartesi offers a virtual machine (VM) that enables running a Linux OS and combining it with a blockchain infrastructure. This allows developers to move beyond the EVM and gain access to the full suite of code libraries, programming languages, and open-source tooling they're accustomed to.
Each application is its own rollup (app chain), which means that applications don't compete with each other for processing power. Cartesi is mainly targeted at applications and operations that require a lot of computational resources (e.g. web3 gaming) but still want the benefits of blockchains (verifiability, transfer of value, asset ownership etc). A proof-of-concept DOOM game can be found here.
Applications built on the Cartesi-architecture consist of the following components:
Front-end - the user-facing interface, such as a web app. Collects user input and submits it to the dApp, as well as queries and shows the application state.
Cartesi Rollups - a set of on-chain and off-chain components that implement an Optimistic Rollup solution and provide the general framework for building DApps.
Cartesi Machine - a virtual machine (VM) with a RISC-V architecture, which makes it possible to boot Linux or other mature operating systems. Designed to bring scalability to DApps and productivity to DApp developers by allowing them to use familiar libraries and tools.
Back-end - Stores and updates the application state as user input is received and produces corresponding outputs to the application’s smart contract. The back end is executed inside the Cartesi Machine.
Key Takeaway: Cartesi is an optimistic Layer 2 solution, which allows running a Linux OS on a Cartesi app chain with the state transitions verified on Ethereum. This opens up the possibility of having more complex computation with a familiar developer experience, while still getting the benefits of a blockchain.
📚A Soft Introduction to Fully Homomorphic Encryption - Recommended by Joakim, Olli and Hannes:
Fully Homomorphic Encryption (FHE) is a technology that enables computation over encrypted data. This is in contrast to the current paradigm, where an application first has to decrypt the data before performing the desired task, and then encrypt the end result again. While this might work well in a trusted environment, FHE lets multiple parties work collaboratively without having to trust each other - a key requirement for many blockchain-related use cases.
FHE is not a new concept - it has been around since the 70s and the first functional scheme was introduced in 2009. However, we’ve recently started to see more interest around FHE and more funding going into the space, most likely following advancements in other forms of cryptography - zero-knowledge proofs (ZKPs) and multi-party computation (MPC). Combining FHE with these enables new use cases and more secure applications.
Recent advancements in both FHE-specific technology and hardware acceleration have made FHE faster and more feasible to use, but another key friction is poor developer experience. Two teams trying to solve this problem are:
Sunscreen is building an FHE compiler to abstract away the complexity. Even though the performance of FHE is improving, it's still very hard to write FHE programs unless you're a cryptography expert (and even then it's pretty hard).
Zama recently launched an alpha version of their homomorphic encryption smart contract protocol - the fhEVM. This enables developers to write private smart contracts in Solidity using Homomorphic Encryption. Zama also hosted a hackathon during EthCC with submissions including a dark pool and a private predictions platform.
Key takeaway: FHE enables computation over encrypted data and lets multiple parties work collaboratively without having to trust each other. FHE in combination with ZKP and MPC opens up new possibilities in the blockchain space, such as fully programmable, private blockchains. While recent advancements have made FHE faster and more feasible to use, the developer experience is poor and it’s still very difficult to write programs leveraging FHE.
📚Designing the Espresso Sequencer: Combining HotShot Consensus with Tiramisu DA - Recommended by Hannes:
While single sequencer networks benefit from low latency and can avoid toxic MEV (front running), sharing the task of ordering transactions can improve both liveness (network continues to run even if one sequencer fails) and censorship resistance (a single sequencer can’t censor a transaction).
One way to decentralise the sequencer is through a shared sequencer network - a network of sequencers that can serve multiple different rollups. Besides helping with the two issues above (liveness and censorship resistance), shared sequencing can also improve cross-chain composability. However, the benefits don’t come for free - leader election, consensus and data broadcasting across the network adds latency compared to a single sequencer setup.
To combat these issues, Espresso’s Shared Sequencer separates data availability (DA) and consensus to enable better throughput and latency:
HotShot is a PoS-consensus protocol that’s based on the HotStuff protocol. It has been optimised for ordering consensus between a large number of parties. HotShot relies on Ethereum validators for security (restaking through EigenLayer) with the goal of scaling to tens of thousands of nodes. Some of its features that aim to improve performance include optimistic linear communication, optimistic responsiveness and using a CDN at the network layer.
Tiramisu is the DA layer that’s fully integrated with HotShot consensus and run by the HotShot nodes. Tiramisu is made up of three separate tiers of data availability, which provide different tradeoffs between security and performance. This enables web2-level data availability in the optimistic case with strong Ethereum-level guarantees in any pessimistic case (during network outages or attacks). All three tiers run in parallel.
Key Takeaway: Shared sequencer networks can increase liveness and reduce censorship resistance for rollups, but having to coordinate between multiple parties affects performance and introduces latency to the network. HotShot by Espresso is an attempt of solving this problem by separating DA and consensus to enable better throughput and latency.
News from our partners:
🔥Avail introduces OpEVM - an EVM-compatible, Sovereign Optimistic Rollup:
OpEVM is uniquely designed to provide a fully functional optimistic rollup solution without the need for a base layer that supports execution. The work is open-source and you can find more information on GitHub.
The development of OpEVM is a collaboration between Avail and Equilibrium Group (Eiger and Equilibrium Labs). It’s been more than a year in the making, so we are very excited to finally share it and get feedback from the wider community!
Personal recommendations from our team:
📚Reading: Charles Bukowski - Factotum: While it might not lead to spiritual or intellectual elevation, the story is surprisingly captivating even though it’s mostly detailed descriptions of how the protagonist gets hired, drunk, and fired over and over and over again.
🎧Listening: Nuclear Power Trio - Nyetflix and Chill: Donny, Vladi P and Supreme Drummer Kimmy are back with a new album featuring 9 new songs. The music video is entertaining in itself - but what do you think about their musical abilities?
💡Other: Lattice analysed all 780 publicly available crypto pre-seed & seed rounds from 2021. Despite a very different fundraising environment, the report makes for an interesting read and hopefully allows us to learn something from the past…
7$ hit 18 august