On the Road to StarkNet: A Permissionless STARK-Powered L2 ZK-Rollup

StarkWare
StarkWare
Jan 26 · 6 min read

Enjoy the security and feel of Ethereum with the scale of a ZK-Rollup

TL;DR

Image for post
Image for post

We’re building StarkNet in four steps:

  • Step 0 — Foundations (completed*)
  • Step I — Planets: Single-App Rollups
  • Step II — Constellations: Multi-App Rollups
  • Step III — Universe: A Decentralized Rollup

We expect to have Step I deployed in a few short months, and be well on our way to Steps II & III by the end of 2021.

Introduction

Developers, users and StarkNet nodes will be able to do everything one would expect from a permissionless L2 Rollup: Developers may build applications implementing their own business logic and deploy them on StarkNet. Users may send transactions to StarkNet to be executed, just like they interact with Ethereum today. StarkNet nodes and participants will be crypto-economically incentivized to ensure the network operates efficiently and fairly.

All StarkNet transactions will be periodically batched, and their validity will be proven in a STARK proof, to be verified on Ethereum. As the computational effort required to verify STARK proofs is exponentially small compared to the computation proven, StarkNet will scale Ethereum by orders of magnitude.

Since all StarkNet state transitions will be STARK-proven, only valid ones will be accepted on Ethereum. All data required to reconstruct the full StarkNet state will be published on-chain. Anyone will be able to run their own StarkNet node. These properties will make StarkNet as secure and permissionless as Ethereum.

We’ve been at it for three years, and have already achieved some remarkable milestones in turning “Moon Math” into production-grade and efficient software running on Ethereum. The way StarkWare does things is tackle the hard problems first, build the core technology, and then release it to production in piecemeal fashion. We will continue to build in this manner as we bring StarkNet to completion.

Image for post
Image for post

Step 0 — Foundations

Cairo

In a couple of weeks we will launch on a public Ethereum testnet an Alpha version of Cairo’s Generic Proof Service (GPS). This will allow developers to build their own applications using Cairo, implementing whatever business logic they wish. They will send their Cairo code to the GPS to be proven, and then verified on-chain.

GPS enables a single proof to assert the integrity of execution of altogether separate and independent applications, thereby giving those applications the ability to amortize the gas expense of proof verification amongst them.

Cairo and GPS are the basis of StarkNet — our decision to externalize both to developers provides them with early exposure to this technology, not only so they can start building on top of it, but also so they may influence StarkNet’s evolution.

We shall continue developing Cairo based on the needs and feedback of the developer community. We shall enhance this language with new features, syntax, and builtins that improve its usability, and we shall continue to develop and improve Cairo tooling: compilers, tracer/debugger, and integrations to common IDEs.

StarkNet will have Cairo running under the hood.

The STARK Software Stack

Our scaling measurements — not extrapolations, nor promises — include the processing of 300K transactions in a single proof on Mainnet, achieving the world record in Rollup throughput: 3K tps. In the process, we’ve achieved the world record for Rollup gas efficiency: 315 gas/tx, orders of magnitude cheaper than transactions on Ethereum L1.

This technology will be the cornerstone of the decentralized Proving Layer of StarkNet, and hence we shall release additional and enhanced provers as part of StarkNet’s development (more on that in an upcoming blog post).

StarkEx

Developing StarkEx was our way of dogfooding our toolchain and testing it against real-world needs. There’s nothing like the demands of actual applications and live users to help tools mature and evolve. It also helps us understand which elements need to be addressed to better serve the ecosystem — for example, integrations with wallets and block explorers.

StarkEx is a live example of the ability to scale applications using a STARK-based ZK-Rollup, and is the first application in production on Mainnet written in Cairo. As such, it will also be one of the applications running on StarkNet.

Image for post
Image for post

The Road Ahead

Step I — Planets: Single-App Rollups

At this point, each StarkNet instance will be able to run a single application. Different instances may run different applications.
The StarkNet framework will include the following:

  • Mechanisms needed to generate STARK proofs for arbitrary Cairo logic, and then submit and verify them on Ethereum.
  • Interactions with L1 Ethereum: deposits and withdrawals of L1 tokens, publishing of the on-chain data, Escape Mechanisms protecting StarkNet users from malicious StarkNet operators, etc.
  • Management of the L2 user balances, and of the application’s storage and memory.

Developers will be able to focus solely on building their application’s business logic, and then move into production: deploy and run it at scale on StarkNet.

What enables us to build a general-computation scalable ZK-Rollup is the combination of:

  • Cairo, which is a general-purpose Turing-complete programming language
  • Our strong STARK stack (prover and verifier), that enables bundling enormous computations into a single proof

Step II — Constellations: Multi-App Rollups

Cairo, the powerful STARK stack, and GPS amplify StarkNet’ competitive advantage in supporting a multi-app Rollup.

At this stage, StarkNet will be a fully functional framework for running multiple applications with any arbitrary business logic on top of Ethereum, with each instance run by a single operator.

An operator may now spin up a StarkNet node, and application developers may deploy their contracts on it. From the users’ perspective, StarkNet now looks and feels like Ethereum, with a higher scale.

Step III — Universe: Decentralized Rollup

Intriguing R&D questions we’re now tackling that affect this stage include (i) using ZK-Rollups to improve consensus-reaching mechanisms, and (ii) designing crypto-economic mechanisms to incentivize the decentralized StarkNet contributors and operators (transaction sequencers, provers, etc.) to function efficiently, fairly and securely.

Conclusion

StarkNet will enable applications to scale without compromising security, users to pay reasonable transaction fees, and the entire ecosystem to grow substantially and fulfill its promise.

We gladly invite the developer community to join us on this journey.

StarkWare

Developing the Full Proof Stack for STARK

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store