The Etrog Upgrade Is on Testnet, Effectively Making Polygon zkEVM Type 2

The 10-day timelock for upgrading the network has been triggered. The Etrog upgrade is available now for testing on Cardona, a new Sepolia-anchored testnet. Here’s how to connect and verify.

Polygon Labs
January 27, 2024
Polygon Solutions
Image source: Dribbble

The Etrog upgrade for Polygon zkEVM is coming to mainnet next month, bringing with it support for the pre-compiled smart contracts that will make the network close to a Type 2 ZK-EVM, i.e., an EVM-equivalent ZK rollup.

Devs can test and verify the Etrog upgrade on Cardona, a new Sepolia-anchored testnet.

Here’s what you need to know about the Etrog upgrade, how to verify it, what steps devs will need to take once it’s live, and how to connect to Cardona. 

A note for devs: What does it mean now that Polygon zkEVM has, in effect, met Vitalik's criteria for a Type 2? It means that you can deploy your code on Polygon zkEVM exactly as it is on Ethereum—just copy-paste and go, no additional auditing or modifications necessary. 

A note for end users: Once the Etrog upgrade is live on mainnet, you don’t need to take any action to continue using Polygon zkEVM.

Etrog Upgrade 

With support for five additional pre-compiled smart contracts, the Etrog upgrade will make Polygon zkEVM a de facto Type 2 ZK-EVM. But there are also other improvements, including a new way for processing transaction batches. 

Here’s a high-level overview of the Etrog upgrade—for more detail, check out the changelogs for Etrog on GitHub. 

Five pre-compiles for Type 2 & EVM-equivalence 

The taxonomy of ZK-EVM types describes a ZK rollup’s compatibility with Ethereum’s native way for executing transactions. The ELI5 version is that the design of any given ZK rollup makes a tradeoff between prover performance and making it easy for devs to use existing Ethereum smart contracts and tooling without modification. (For more, see: Is Polygon zkEVM EVM-equivalent?)

A Type 2 ZK-EVM offers the optimal balance between making it easy for devs to deploy, while still being fast and cheap. 

The Etrog upgrade adds support for five precompiled smart contracts, including: ecAdd, ecMul, ecPairing, Sha256, and modexp. Existing dApps that make use of these pre-compiles can now deploy on the network without modification. 

The EVM has nine pre-compiled smart contracts. Though ripemd-160 and blake2f are not supported on Polygon zkEVM, these precompiles are rarely used—ripemd-160, for example, has been called a total of ~1,600 times since the inception of Ethereum. This makes Polygon zkEVM, effectively, a Type 2 ZK-EVM. 

Multiple transactions per block, and multiples blocks per batch

In the original design of Polygon zkEVM, each batch contained many transactions, but each transaction was an L2 block. While this approach simplified the process of locating user transactions, in the event of a liveness issue, there were efficiency penalties. 

Following the Etrog upgrade, L2 blocks can contain many transactions, and each batch can contain many blocks. As a result, it’s expected that network efficiency—and overall throughput—will improve. From the end user’s perspective, Polygon zkEVM will behave more smoothly.   

How to verify Etrog

Because the Etrog upgrade touches the PolygonZkEVM.sol consensus contract, implementing the upgrade must follow the protocol’s governance model, which includes a 10-day timelock period to allow users to verify the upgrade and withdraw funds, if they so choose. 

The timelock has been triggered—it concludes on Feb 06.

Here’s how you can independently verify that the source code available on GitHub matches the code deployed on the network: Verify deployment of proof verifier smart contract

You can view the transactions containing the upgrade here:

The Cardona Testnet

Until now, the testnet for Polygon zkEVM has been using Ethereum’s Goerli testnet as the root (Layer 1) chain. This is where devs go to safely test their dApps. But Ethereum is deprecating Goerli in favor of the Sepolia testnet—and as goes Ethereum, there follows Polygon.  

Cardona is Polygon zkEVM’s Sepolia-anchored testnet, and it’s the only testnet where devs can test the Etrog upgrade. 

In order to allow a smooth transition for devs and users, both the older Polygon zkEVM testnet and the Cardona testnet will operate in tandem for an indefinite period. At some point, however, the Goerli-anchored testnet will be deprecated, and Cardona will be the only testnet for Polygon zkEVM.

Here’s how to connect to Cardona:

For infrastructure partners that maintain infrastructure and want to run a Cardona node, you can follow these instructions: How to run a permissionless node.

Once Etrog is live on mainnet 

Once the upgrade is live on mainnet, the network participants that maintain infrastructure will need to update to the latest versions of the node, prover, and bridge service. 

You can find those GitHub repos here.

What’s next for the network? EIP-4844 and Erigon.

***

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 | Polygon Knowledge Layer | Twitter | Developer Twitter | Forum | Telegram | Discord | Instagram | LinkedIn

More from blogs