Upgrade Every EVM Chain to ZK: Introducing the Type 1 Prover
Polygon Labs, in collaboration with Toposware, has developed a highly performant Type 1 upgrade for the zkEVM, allowing any EVM chain to become a ZK L2 and join the AggLayer
tl;dr
- The Polygon zkEVM prover now supports a Type 1 mode, allowing any existing EVM chain to become a ZK Layer 2 (L2) and connect to the AggLayer. This is an important milestone for Polygon PoS’s upgrade to a ZK secured chain.
- With the Type 1 upgrade, proofs created by the Polygon zkEVM prover in Type 1 mode are already being generated for mainnet Ethereum blocks at an average cost of $0.002 to $0.003 per transaction (>36x faster than any other Type 1 prover). With Plonky3 and zkEVM improvements, expect a 30 to 50X reduction in cost over the next year.
- This breakthrough performance upgrade will lead to lower cost, lower latency, and a better user experience for all Polygon CDK chains, both Type 1 and Type 2.
- The Type 1 upgrade to the Polygon zkEVM prover was developed by Polygon Labs and external contributor Toposware, and is being released today under a permissive open-source license.
Today, developers at Polygon Labs are releasing the next generation of the Polygon zkEVM prover, the Type 1. The Type 1 prover allows any existing EVM chain to become a ZK L2 and connect to the entire Polygon ecosystem via the Aggregation Layer.
The underlying technology for this breakthrough Type 1 prover will eventually power the proving tech used across Polygon protocols, bringing lower costs, lower latency, and a better user experience to all chains built with Polygon CDK.
The development of the Type 1 zkEVM prover was a community effort led by Polygon Labs and Toposware, one of the top ZK teams in the space. Working together, they have achieved an incredible milestone: the ability to generate ZK proofs for actual mainnet Ethereum blocks, at an average cost of $0.002 to $0.003 per transaction.
Proving mainnet Ethereum blocks was seen as impossible or cost-prohibitive. Now, anyone can prove entire Ethereum blocks, containing hundreds of transactions, for $0.20-$0.50 per block. Continued development and optimizations are coming, with the expectation that the cost will decrease an additional 30 to 50X.
The Type 1 prover is open source, dual licensed under MIT and Apache 2.0, and available on GitHub. The development of this would not have been possible without the contributions of the Toposware team. For a deeper technical look, read a post on their blog.
For the past two years, Polygon Labs has led the industry in the development of ZK technology, from the release of Plonky2/Starky, still the fastest proving system available, to the development of Polygon zkEVM, including its prover.
This is a huge step for ZK tech and for Ethereum: a ZK-EVM so performant that it can prove L1 Ethereum blocks for less than a cent per transaction.
What is a Type 1 ZK-EVM Prover?
The framework for ZK-EVM types was proposed by Ethereum co-founder Vitalik Buterin. These types range from 1 to 4 and rank ZK-EVMs based on their level of compatibility with Ethereum and the EVM.
Type 1 is the highest level of compatibility with Ethereum, making it possible to generate proofs for existing EVM chains without any modifications or migrations. Everything that is native to the EVM is preserved, including storage structure and hash functions.
Because a Type 1 ZK-EVM preserves all of Ethereum’s execution logic, a chain using the Polygon zkEVM prover in Type 1 mode can use existing EVM clients as-is—it can even generate proofs for Ethereum blocks. In fact, the performance benchmarks below were generated for real Ethereum blocks.
With an open source license, the Type 1 zkEVM prover made available today is a public good for the benefit—and scalability—of Ethereum.
Type 1 + AggLayer
Last month, Polygon Labs released its vision for a new kind of scaling paradigm: aggregation. The aggregated approach solves the challenges facing the two prevailing approaches to blockchain scaling—monolithic and modular—by scaling access to shared state and liquidity across a multi-chain ecosystem.
Aggregation solves the problem of fragmentation. In the future, the entire Polygon ecosystem will be unified via the AggLayer, a decentralized protocol that will enable seamless, cross-chain activity and provide a UX that, from the end-user’s perspective, feels like a single chain.
Taken together with the AggLayer, the Type 1 upgrade to the Polygon zkEVM prover enables something unique: It allows you to take an existing EVM chain, without modifications, and then connect that chain—along with all of its users and TVL—directly to the AggLayer, and then to all of the liquidity and value on Ethereum itself.
There are multiple projects building with Polygon CDK—including Immutable zkEVM, Manta Network, and Canto—that plan to do exactly that.
Polygon CDK: The modular toolkit is growing
This breakthrough is not just a technical feat, it will also power Polygon CDK, the modular, open-source toolkit for spinning up ZK-powered Layer 2s.
Protocol devs building with Polygon CDK will be able to choose from:
- the Polygon zkEVM prover in Type 1 or Type 2 mode;
- multiple execution clients, with the zkNode or cdk-erigon;
- rollup or validium modes; and
- multiple data availability solutions, with custom DACs or Celestia.
Who is it for?
Existing L1 chains and Optimistic Rollups
For existing EVM chains, it makes migration simpler. No need to reprove the entire chain from the first block; in Type 1 mode, the prover can immediately start generating proofs from a checkpoint.
Anyone who wants a best-in-class zkEVM
This proving technology can also run in Type 2 mode for even lower cost, meaning that chain developers get lower cost and lower latency, but maintain full compatibility with existing Ethereum applications and tooling.
Performance Benchmarks
In Type 1 mode, the prover is built to easily scale across multiple physical computers. By doubling the amount of physical computers, the time to generate proofs can be reduced by half, while still incurring the same total runtime. This means that via horizontal scaling on commodity hardware, prover operators can reduce latency while keeping the same low costs.
Keeping that in mind, the following performance benchmarks were reached by generating proofs for existing Ethereum blocks 17095624, 17106222, and 17735424, using a single GCP server of t2d-standard-60 instance type running with 5 worker processes. At the time of writing, the spot pricing for this instance type is currently $0.31872/hr in the europe-southwest1 region. This configuration gives us the following example block proof costs.
When considering block 17735424, we see an average per-transaction cost of $0.0029 and a total cost of $0.534. During this block, the price of ETH was $1,891.68 and the block generated $222.51 in rewards, with fees totaling $62. The total proving cost was, therefore, 0.24% of this block’s reward.
In an apple-to-apples comparison to RISC Zero’s Zeth, which quotes their proof costs in terms of 3-year reserved instances, proofs generated by the Polygon Type 1 prover are 10X more cost efficient. But RISC Zero uses GPUs to generate their proofs, whereas the Polygon Type 1 prover is able to leverage cheap, widely-available CPU instances and take advantage of lower spot pricing.
When comparing the most cost-efficient setups for RISC Zero and the Type 1 released today, the Polygon prover is 36X more cost-efficient.
Looking Ahead
The Polygon Zero and Toposware teams have only just begun optimizing the Type 1 prover. The teams expect that, in the coming weeks, its performance will improve by ~35%, so that it’s ~50X cheaper than RISC Zero, while the average per-transaction cost for some blocks will fall below $0.001.
Later this year, the Polygon Zero team will be releasing Plonky3, the successor to the highly-performant Plonky2. Plonky3 is expected to bring an additional 10X improvement. Combine this with further improvements to the Type 1, and a 50X improvement from the current benchmarks is within reach.
This Type 1 will allow more chains to connect to the AggLayer and, by extension, the Ethereum ecosystem, including the Polygon PoS chain, with $3B in bridged assets and 700,000 daily active addresses.
Polygon Labs will continue to lead the development of ZK technology in 2024, and there’s more to come this year. Onward.
***
Read the docs on the Polygon Knowledge Layer to learn how to test the Type 1 prover today, and tune into the blog and our social channels to keep up with updates about the Polygon ecosystem.
Together, we can build an equitable future for all through the mass adoption of Web3.
Website | Twitter | Developer Twitter | Polygon Knowledge Layer | Forum | Telegram | Discord | LinkedIn