EXECUTED
Ended Oct 19 at 8:16 PM UTC

[ZIP-18] Resubmission of the ZKsync v31 Upgrade

By
Votes
765.89Mfor
0.02Magainst
0.01Mabstain
630MQuorum Reached
Skip to Votes
Proposal TypeZIP
One Sentence SummaryThis ZIP resubmits the ZKsync v31 upgrade approved in ZIP-16, with regenerated upgrade calldata.
Proposal AuthorMatter Labs
Proposal SponsorMatter Labs
Date Created9 October 2026
Versionv1
Summary of ActionThis proposal is a resubmission of ZIP-16. Upgrade ZKsync to v31: ZKsync Era chains to protocol version v0.33.0, ZKsync OS chains to v0.31.2
Link to Contractsmatter-labs/era-contracts at v31-mainnet

Abstract

This proposal resubmits ZIP-16 with updated upgrade calldata. The Token Assembly approved ZIP-16 in July 2026, but the upgrade was not executed. The release delivers:

  • Priority Mode for ZKsync OS L1-settling chains, giving users a permissionless path to withdraw their funds even if the sequencer stops processing.
  • Broad ZKsync OS compatibility work across the protocol's contract layer.
  • An upgrade of ZKsync Era chains from protocol version v0.30.1 to v0.33.0, and of ZKsync OS chains from v0.30.1 to v0.31.2.

Motivation

v31 advances two priorities for ZKsync.

It introduces Priority Mode for L1-settling ZKsync OS chains, a censorship-resistance escape hatch for chains that settle directly to L1. If priority transactions remain unprocessed for too long, anyone can activate a restricted settlement path, so users can withdraw their funds even if the sequencer stops processing.

It also consolidates ZKsync Era and ZKsync OS onto a shared codebase and reduces protocol surface area. This foundational alignment keeps Era and ZKsync OS in a single codebase and streamlines the path for future protocol upgrades.

What changed since ZIP-16

ZIP-16 was approved by the Token Assembly vote in July 2026. Its calldata was never executed, for two reasons:

  • During review, the Security Council was made aware of issues in the ZIP-16 calldata that needed to be fixed before deployment.
  • Since the vote, ZKsync Era chains have moved to protocol version v0.30.1, while the ZIP-16 calldata expected v0.29. It can no longer be executed as approved.

The calldata in this proposal was regenerated against the current state of Ethereum mainnet. The scope of the upgrade is the same as in ZIP-16. The differences are:

  • Fixes from the review. The issues raised during review are fixed in the regenerated calldata. The upgrade contracts it references are deployed on Ethereum and verified on Etherscan. OpenZeppelin reviewed the regenerated calldata; the only change since that review is the Era version label (v0.32.2 → v0.33.0).
  • Protocol Upgrade Handler. As in ZIP-16, the upgrade points the Protocol Upgrade Handler at new Security Council, Guardians and Emergency Upgrade Board contracts, the same contracts as in ZIP-16. This now happens in the same call that upgrades the handler, instead of in three separate calls. Stage 0 therefore has 12 calls instead of 15. Stages 1 and 2 contain the same calls as in ZIP-16.
  • Compiler. The ZKsync Era bootloader and system contracts are compiled with zksolc 1.5.17 (release notes), with the bootloader adjusted for the newer optimizer (era-contracts #2522).
  • Version numbers. See Note on Version Numbering below.

Specification

The implementation can be viewed at tag v31-mainnet of matter-labs/era-contracts.

Priority Mode for ZKsync OS L1-settling chains

Priority Mode is introduced in era-contracts #1943 as a censorship-resistance mechanism for ZKsync OS chains that settle directly to L1. It guarantees that users can withdraw their funds even if the sequencer stops processing.

  • This is an opt-in feature, and we do not force ZK Chains to use it in any way.
  • Users can submit L1-to-L2 priority transactions the same way they did before.
  • The code sets PRIORITY_EXPIRATION = 4 days. If the first unprocessed priority transaction remains outstanding for at least that long, anyone can call activatePriorityMode() on the chain's L1 contract.
  • Once activated, batches may contain only priority-queue transactions, and anyone can settle a batch through PermissionlessValidator, which atomically commits, proves, and executes the batch.
  • A chain admin can permanently enable Priority Mode for a chain by calling permanentlyAllowPriorityMode.

ZKsync OS Compatibility

The release includes:

  • L2 contract restructuring, adapting L2 system contracts to work without constructors or immutables and splitting contracts into L1, L2, and Base variants.
  • Custom DA validator removal, moving DA validation to a fixed set of supported commitment options.
  • L2 Verifier removal, so the same verifiers are used on both L1 and L2.

Note on Version Numbering

ZKsync Era chains currently run protocol version v0.30.1 and upgrade directly to v0.33.0. ZKsync OS chains upgrade from v0.30.1 to v0.31.2.

Versions v0.31 and v0.32 were used while v31 rolled out on testnet and staging. The Era target is labeled v0.33.0 because our staging environment already runs the same bootloader and system contracts, compiled with zksolc 1.5.17, as v0.33.0, so one version number maps to one bootloader build everywhere.

Rationale

Priority Mode for ZKsync OS L1-settling chains

Priority Mode creates a deterministic censorship fallback for eligible chains. Once the timeout for a queued priority transaction is reached, anyone can move the chain into a mode where only priority transactions are processed and settlement is permissionless, so users retain the ability to exit even if the sequencer is unavailable.

Limiting this mechanism to L1-settling chains reflects the fact that Gateway-settling chains require additional coordination that is not part of the current design.

ZKsync OS Compatibility

The ZKsync OS work removes contract patterns that might make the codebase incompatible with ZKsync OS, effectively keeping Era and ZKsync OS support in the same codebase. Removing custom DA validators and separate L2 verifiers also reduces protocol surface area and eliminates legacy distinctions that are no longer required.

Some smaller changes

  • Added the ability for the server to execute the upgrade automatically.
  • Removed L2 Verifiers to reuse L1 Verifiers, since they are now the same.
  • Continuous improvement of documentation.

Implementation & Backwards Compatibility

The upgrade modifies bootloader logic, L2 system contracts, L1 settlement coordination, and the server-side protocol implementation. While backwards compatibility is maintained for existing ZKsync Chain operations, chains that wish to support the new version must update.

Breaking Changes

  1. Era jumps from v0.30.1 to v0.33.0. Tooling that assumes sequential Era mainnet protocol numbers must handle the jump.
  2. Node software and external nodes must upgrade to a zksync-era release that supports protocol version v0.33. Batches after the upgrade use commitment-scheme-based pubdata parameters that older external nodes cannot fully deserialize. The minimum zksync-era release is v32.0.0 (zksync-era releases are numbered independently of protocol versions; v32.0.0 is the first that runs protocol v0.33). External node operators must run matterlabs/external-node:v32.0.0-alpha or later before the upgrade executes.
  3. Custom DA validators are removed from L2. Chains must migrate to the supported commitment-scheme-based DA options.
  4. Legacy SystemContext batch methods now revert. Off-chain systems that still call getBatchHash, getBatchNumberAndTimestamp, currentBlockInfo, getBlockNumberAndTimestamp, or blockHash must be updated before the upgrade.
  5. Separate L2 Verifier contracts are removed. Integrations that referenced the old split verifier layout must update.

Security Considerations

The v31 upgrade's trust surface centers on the Priority Mode path, the protocol-version boundary, and the server-side release.

  • The Priority Mode path introduces a permissionless activation and settlement mechanism for L1-settling ZKsync OS chains, as specified above. Activation is gated by the priority-transaction expiration window, and once active, batches are restricted to priority-queue transactions.
  • Server-side support must remain aligned with the v31 contract set, because batch metadata and pubdata validation semantics change with this upgrade.
  • The upgrade calldata was checked against Ethereum mainnet before submission: verification of the calldata against the deployed contracts reports no errors, and the full governance sequence was executed in simulation on a fork of Ethereum mainnet.

Audit

The v31 contracts were audited by OpenZeppelin. The audit report is publicly accessible here.

OpenZeppelin also reviewed the regenerated upgrade calldata in September 2026, at commit 66ad9d57; the only change since is the Era version label (v0.32.2 → v0.33.0). The report leaves one check for after deployment: that the contracts landed at the expected addresses on mainnet. It passed after the contracts were deployed on 6 October 2026.

Changes since the ZIP-16 vote are listed in What changed since ZIP-16 above.

Onchain Actions and Verification

  • The onchain proposal is a single proposal on the ZKsync Protocol Governor with three actions, one per upgrade stage (stage 0, 1 and 2). Each action sends an L2→L1 message that carries an upgrade proposal for the Protocol Upgrade Handler on Ethereum.
  • Stage 0 has 12 calls, stage 1 has 23 and stage 2 has 7.
  • The contracts these calls reference are already deployed on Ethereum and verified on Etherscan.
  • The upgrade calldata and its verification tooling are public in matter-labs/era-contracts, in l1-contracts/upgrade-envs/v0.31.0-interopB/output/mainnet. Anyone can check the calldata against the deployed contracts with protocol-ops (protocol_ops ecosystem verify-upgrade); see docs/ecosystem-upgrade-deploy.md.

Estimated time to reach ZKsync Era

Each chain can upgrade at its own pace. As usual, the upgrade start will be primarily time-based and the block height is not known in advance.

Pending a successful governance vote, the tentative time to reach ZKsync Era is the week of October 26th, 2026.

Votes
765.89Mfor
0.02Magainst
0.01Mabstain
630MQuorum Reached

Voters
0xc118...ad2cCyfrinvoted for
104.89M
0xdedd...360dKeatingvoted for
97.64M
88.72M
0x1b68...eead0x1b68...eeadvoted for
86.2M
0x3fb1...4c8a0x3fb1...4c8avoted for
55.01M
0x0fbb...5881Moonsong Labsvoted for
49.93M
0xb455...e167Matter Labsvoted for
41.13M
0xb14d...1f9a0xb14d...1f9avoted for
38.8M
0xf4b0...d8fa0xf4b0...d8favoted for
31.33M
0x3ae5...3b3c0x3ae5...3b3cvoted for
26.26M
0xbe1d...c9530xbe1d...c953voted for
24.42M
0x2198...6ee60x2198...6ee6voted for
22.55M
0xefd6...20340xefd6...2034voted for
16.36M
0xc639...915dInes txFusionvoted for
14.16M
0x7b0b...dec00x7b0b...dec0voted for
2.5M
0xc805...55800xc805...5580voted for
2.16M
0xf62d...66350xf62d...6635voted for
1.36M
0xadec...a0910xadec...a091voted for
478.95K
0x00df...49e80x00df...49e8voted for
301.87K
0x7e03...20270x7e03...2027voted for
213.27K
0xc2be...2cbc0xc2be...2cbcvoted for
200.02K
0xa832...40030xa832...4003voted for
198.24K
0x6609...79c10x6609...79c1voted for
190.37K
0x2f2f...f78a0x2f2f...f78avoted for
155.53K
0xeab8...62d10xeab8...62d1voted for
146.16K
0x8c57...a7a10x8c57...a7a1voted for
142.94K
0xc640...c0c30xc640...c0c3voted for
135.58K
0x0187...e2100x0187...e210voted for
126.75K
0xed32...6fcd0xed32...6fcdvoted for
123.48K
0x9fb8...a7d60x9fb8...a7d6voted for
110.77K
0xe6f9...87be0xe6f9...87bevoted for
102.43K
0xdb57...bc2e0xdb57...bc2evoted for
82.37K
0xc2a2...9b670xc2a2...9b67voted for
79.11K
0xd04d...5c440xd04d...5c44voted for
73.25K
0xc418...88970xc418...8897voted for
69.21K
0x8153...63e80x8153...63e8voted for
68.33K
0x92c4...f8e60x92c4...f8e6voted for
67.02K
0x3dc4...e80d0x3dc4...e80dvoted for
61.85K
0xef45...1f6a0xef45...1f6avoted for
61.75K
0x1005...32a20x1005...32a2voted for
50.24K
0x14b8...7b480x14b8...7b48voted for
40.83K
0x9616...23c80x9616...23c8voted for
39.81K
0x4d32...bbfa0x4d32...bbfavoted for
38.74K
0x9b8f...e7e10x9b8f...e7e1voted for
30.23K
0xa209...5a1d0xa209...5a1dvoted for
30K
0x54f7...016d0x54f7...016dvoted for
27.55K
0xa49f...6c070xa49f...6c07voted for
26.47K
Estoy de acuerdo.
0x665f...47ea0x665f...47eavoted for
25.22K
0xf7e8...afb10xf7e8...afb1voted for
24.23K
0x3024...52090x3024...5209voted for
23.54K
0x4166...b7e00x4166...b7e0voted for
22.4K
0x9087...47ea0x9087...47eavoted for
21.55K
0x20e1...0aa20x20e1...0aa2voted for
21.06K
0x6f0d...321b0x6f0d...321bvoted for
21K
0x4f0e...987b0x4f0e...987bvoted for
19.88K
0x7f44...a8d20x7f44...a8d2voted for
19.81K
0x4fbe...a8770x4fbe...a877voted for
19.09K
0x2b28...e8b40x2b28...e8b4voted for
18.38K
0xe0de...ce160xe0de...ce16voted for
17.93K
0x4cb7...7cd50x4cb7...7cd5voted for
17.52K
0xbbd5...12c30xbbd5...12c3voted for
16.67K
0xb068...10a50xb068...10a5voted for
15.4K
0x7f55...49490x7f55...4949voted for
15.23K
0xfc74...4c7c0xfc74...4c7cvoted for
14.22K
0x8fe9...d2a10x8fe9...d2a1voted for
13.95K
0x01a6...763e0x01a6...763evoted for
13.22K
0x4db5...61cc0x4db5...61ccvoted for
13.08K
0x9ea8...0d930x9ea8...0d93voted for
12.91K
0x0352...c8310x0352...c831voted for
12.29K
0x113c...54650x113c...5465voted for
11.76K
0xaf91...b93a0xaf91...b93avoted for
11.27K
0x6465...97650x6465...9765voted for
11.12K
0x6d98...3bbf0x6d98...3bbfvoted for
11.08K
0xf47d...3dde0xf47d...3ddevoted for
10.56K
0xc907...95060xc907...9506voted for
10.37K
0x0692...52380x0692...5238voted for
10.23K
0x8720...b0ff0x8720...b0ffvoted for
10.06K
0xe42d...72090xe42d...7209voted for
10.05K
0x13c5...d15c0x13c5...d15cvoted for
10.04K
0x4039...64d80x4039...64d8voted for
10.01K
0x2169...20110x2169...2011voted for
10K
0x17d1...50820x17d1...5082voted against
9.56K
0xb804...70f40xb804...70f4voted for
8.91K
0xdecc...50210xdecc...5021voted against
8.66K
0x5c4b...c90b0x5c4b...c90bvoted for
8.29K
0xab1d...06380xab1d...0638voted for
8.01K
0x7be9...2b9c0x7be9...2b9cvoted for
7.84K
0x2623...86890x2623...8689voted for
7.83K
0xeb22...bc580xeb22...bc58voted for
7.71K
0x274d...73f40x274d...73f4voted for
7.7K
0xdcc9...04f00xdcc9...04f0voted for
7.39K
0x952c...044e0x952c...044evoted for
7.16K
0xd0a4...648e0xd0a4...648evoted for
7.04K
0x261e...7f930x261e...7f93voted for
6.95K
0xa0ef...2d560xa0ef...2d56voted for
6.86K
0xafe1...d8720xafe1...d872voted for
6.63K
0xf9f1...4bab0xf9f1...4babvoted for
6.29K
0xf757...a5070xf757...a507voted for
6.2K
0x58b1...06240x58b1...0624voted for
6.14K
0xe992...d6200xe992...d620voted for
6.14K
0xb7ee...97720xb7ee...9772voted for
6.08K
0x24e5...cac60x24e5...cac6voted for
5.95K
0xf5bb...9f7e0xf5bb...9f7evoted for
5.86K
0xc398...c4ac0xc398...c4acvoted for
5.55K
0x7b16...d7630x7b16...d763voted for
5.39K
0xd91a...a6ff0xd91a...a6ffvoted for
5.31K
0xbc97...f4ff0xbc97...f4ffvoted for
5.22K
0x0c5e...63dd0x0c5e...63ddvoted for
5.17K
0x5249...17cc0x5249...17ccvoted for
5.16K