EXECUTED
Ended Jul 23 at 7:48 PM UTC

[ZIP-16] ZKsync v31 Upgrade

By
Votes
979.30Mfor
0.67Magainst
32.18Mabstain
630MQuorum Reached
Skip to Votes
Proposal TypeZIP
One Sentence SummaryZIP-16 proposes the v31 upgrade for ZKsync.
Proposal AuthorMatter Labs
Proposal SponsorMatter Labs
Date CreatedJuly 2026
Versionv2
Summary of ActionUpgrade ZKsync to v31
Link to Contractsdraft-v31 branch

Abstract

ZIP-16 proposes the ZKsync v31 protocol upgrade. The release includes:

  • Priority Mode for ZKsync OS chains settling directly on L1, providing users with a permissionless withdrawal path if the sequencer stops processing transactions.
  • Protocol-contract compatibility improvements for ZKsync OS.
  • A direct upgrade path for ZKsync Era from protocol version 29 to version 31.

Motivation

Version 31 advances two major protocol priorities.

First, it introduces Priority Mode for ZKsync OS chains that settle directly on Ethereum. If priority transactions remain unprocessed beyond a defined expiration period, anyone may activate a restricted settlement path. This ensures that users retain a way to withdraw their funds when the sequencer is unavailable or censoring transactions.

Second, the release brings ZKsync Era and ZKsync OS closer to a shared protocol codebase. Protocol version 30 was used for ZKsync OS chains but was not deployed to Era mainnet. Era therefore upgrades directly from v29 to v31, incorporating the relevant compatibility work without requiring an intermediate mainnet upgrade.

Specification

The implementation of the new protocol version is available in the draft-v31 branch of matter-labs/era-contracts.

Priority Mode for ZKsync OS L1-settling chains

Priority Mode is introduced as a censorship-resistance mechanism for ZKsync OS chains that settle directly on L1.

  • The feature is optional. ZK Chains are not required to enable it.
  • Users continue submitting L1-to-L2 priority transactions through the existing flow.
  • The current v31 implementation sets PRIORITY_EXPIRATION to four days.
  • If the oldest unprocessed priority transaction exceeds that period, anyone may call activatePriorityMode() on the chain’s L1 contract.
  • While Priority Mode is active, batches may contain only transactions from the priority queue.
  • Anyone may settle an eligible batch through PermissionlessValidator, which commits, proves, and executes it atomically.
  • A chain administrator may permanently permit Priority Mode by calling permanentlyAllowPriorityMode.

ZKsync OS Compatibility

Because protocol version 30 was assigned to ZKsync OS and was not deployed to Era mainnet, v31 incorporates the relevant compatibility work.

The release includes:

  • Restructuring L2 system contracts so they can operate without constructors or immutable variables, with contracts separated into L1, L2, and base variants.
  • Removing custom DA validators in favor of a fixed set of supported commitment options.
  • Removing separate L2 verifier contracts so the same verifier architecture can be used across L1 and L2.

Note on Version Numbering

Protocol version 30 was used for ZKsync OS chains but was not deployed to ZKsync Era mainnet. Era chains therefore upgrade directly from protocol version 29 to protocol version 31.

Rationale

Priority Mode for ZKsync OS L1-settling chains

Priority Mode establishes a deterministic censorship-resistance fallback.

After a queued priority transaction reaches its expiration threshold, anyone can transition an eligible chain into a restricted mode in which only priority transactions are processed and settlement becomes permissionless. This preserves users’ ability to exit even when the sequencer is unavailable.

The mechanism is limited to chains settling directly on L1. Chains settling through Gateway require additional coordination that is outside the scope of this release.

ZKsync OS Compatibility

The ZKsync OS compatibility work removes contract patterns that could prevent the protocol from operating consistently across Era and ZKsync OS.

It also reduces protocol complexity by removing custom DA validators and the legacy separation between L1 and L2 verifier contracts.

Some smaller changes

  • Added support for automatically executing the upgrade through the server.
  • Removed redundant L2 verifier contracts and reused the corresponding L1 verifiers.
  • Continued improving protocol documentation.

Implementation & Backwards Compatibility

The upgrade changes bootloader behavior, L2 system contracts, L1 settlement coordination, and the server-side protocol implementation.

Existing ZKsync Chain operations remain supported, but chains that intend to adopt protocol version 31 must update their software and integrations.

Breaking Changes

  1. Era skips protocol version 30. Tooling that assumes sequential Era protocol-version numbers must support a direct transition from v29 to v31.
  2. Nodes must support v31. Node operators and external-node operators must deploy a v31-compatible version of zksync-era. Older external nodes cannot fully deserialize the new commitment-scheme-based pubdata parameters.
  3. Custom DA validators are removed. Chains using custom L2 DA validators must migrate to the supported commitment-scheme-based DA configurations.
  4. Legacy SystemContext batch methods revert. Off-chain systems must stop using the following legacy methods before the upgrade:
    • getBatchHash
    • getBatchNumberAndTimestamp
    • currentBlockInfo
    • getBlockNumberAndTimestamp
    • blockHash
  5. Separate L2 verifier contracts are removed. Integrations relying on the previous split-verifier architecture must be updated.

Security Considerations

The primary security considerations concern the Priority Mode execution path, the protocol-version transition, and alignment between the server release and the v31 contracts.

  • Permissionless Priority Mode activation is available only after the priority-transaction expiration threshold is reached.
  • Once Priority Mode is active, batches are restricted to transactions from the priority queue.
  • Server-side support must remain synchronized with the v31 contract set because batch metadata and pubdata-validation semantics change at protocol version 31.

Audit

The v31 contracts were audited by OpenZeppelin.

The audit report is available here:

OpenZeppelin v31 audit report

After the audit was completed, additional changes were applied to the contracts during internal testing and to reflect the reduced scope of the final proposal. The full set of post-audit changes is available in the following comparison.

The contract changes were:

  • Updates to L1AssetTracker that allow users to continue finalizing withdrawals after the ecosystem has been upgraded to v31 but before individual chains have completed their own upgrades. This reduces pressure on chains to upgrade immediately and lowers the coordination overhead associated with the ecosystem-wide upgrade.
  • A minor bug fix in L2AssetTracker that affected withdrawals during upgrades.
  • Removal of an unused variable from L2MessageRoot.

Estimated time to reach ZKsync Era

Each chain may upgrade according to its own schedule.

The upgrade activation is expected to be primarily time-based, so the relevant block height may not be known in advance. The actual release date is heavily influenced by the voting process. If the proposal is approved and executed on L1 in 21 days, the expected time to reach ZKsync Era is the 4th of August.

Votes
979.30Mfor
0.67Magainst
32.18Mabstain
630MQuorum Reached

Voters
0xc118...ad2cCyfrinvoted for
102.37M
0xdedd...360dKeatingvoted for
101.46M
0x1b68...eead0x1b68...eeadvoted for
96.61M
0x1f76...5ed60x1f76...5ed6voted for
95.71M
86.12M
0xe452...b835Spearbitvoted for
56.15M
0x3fb1...4c8a0x3fb1...4c8avoted for
55.45M
0xb14d...1f9a0xb14d...1f9avoted for
54.61M
0x0fbb...5881Moonsong Labsvoted for
50.25M
0x2198...6ee60x2198...6ee6voted for
45.34M
0xefd6...20340xefd6...2034voted for
43.7M
0xb455...e167Matter Labsvoted for
41.2M
0xf4b0...d8fa0xf4b0...d8faabstained
32M
0x3ae5...3b3c0x3ae5...3b3cvoted for
27.22M
0xbe97...1b760xbe97...1b76voted for
20.16M
0x09fa...3bb0Demaciavoted for
16.38M
0xc639...915dInes txFusionvoted for
14.16M
0x2596...6fc50x2596...6fc5voted for
3.39M
0xc805...55800xc805...5580voted for
2.33M
0x83cc...0b7c0x83cc...0b7cvoted for
1.23M
0x0542...43e10x0542...43e1voted for
1.06M
0x1729...b8790x1729...b879voted for
873.84K
0xfea3...13090xfea3...1309voted against
618.66K
0x1bc9...33ca0x1bc9...33cavoted for
545.33K
0xfe50...42f40xfe50...42f4voted for
454.4K
0xf62d...66350xf62d...6635voted for
362.96K
0x00df...49e80x00df...49e8voted for
301.87K
0x8a7a...a99f0x8a7a...a99fvoted for
281.27K
0xc2be...2cbc0xc2be...2cbcvoted for
237.03K
0x6609...79c10x6609...79c1voted for
190.37K
0x2f2f...f78a0x2f2f...f78avoted for
171.12K
0x9897...4e690x9897...4e69abstained
162.17K
0xeab8...62d10xeab8...62d1voted for
144.16K
0x00a7...5f480x00a7...5f48voted for
143.94K
0x8c57...a7a10x8c57...a7a1voted for
142.94K
0xc640...c0c30xc640...c0c3voted for
136.8K
0x0991...c26a0x0991...c26avoted for
133.32K
0xed32...6fcd0xed32...6fcdvoted for
123.48K
0xe6f9...87be0xe6f9...87bevoted for
102.43K
0x3062...b7740x3062...b774voted for
97.21K
0x0e29...2bdf0x0e29...2bdfvoted for
89.01K
0xc2a2...9b670xc2a2...9b67voted for
79.11K
0xd04d...5c440xd04d...5c44voted for
73.25K
0xca3d...918b0xca3d...918bvoted for
70.02K
0x92c4...f8e60x92c4...f8e6voted for
67.02K
0x53da...c14b0x53da...c14bvoted for
65.72K
0xef45...1f6a0xef45...1f6avoted for
61.75K
0x1307...b54e0x1307...b54evoted for
59.19K
0x5d08...38f20x5d08...38f2voted for
50.75K
0xca30...15e50xca30...15e5voted for
50.11K
0x01a6...763e0x01a6...763evoted for
50.06K
0xadaf...aa9f0xadaf...aa9fvoted for
46.18K
0xd483...84e50xd483...84e5voted against
40.14K
0x9616...23c80x9616...23c8voted for
39.81K
0x4a02...47840x4a02...4784voted for
35.63K
0xdb57...bc2e0xdb57...bc2evoted for
32.56K
0xf256...a57a0xf256...a57avoted for
31.92K
0xa209...5a1d0xa209...5a1dvoted for
30K
0xd02e...d18b0xd02e...d18bvoted for
29.46K
0x66e1...29a80x66e1...29a8voted for
27.81K
0xa49f...6c070xa49f...6c07voted for
26K
Que vaya todo SUPER bien!
0xe4e0...27670xe4e0...2767voted for
25.48K
0x665f...47ea0x665f...47eavoted for
25.04K
0xf7e8...afb10xf7e8...afb1voted for
24.23K
0x3024...52090x3024...5209voted for
23.54K
0x4166...b7e00x4166...b7e0voted for
22.4K
0x1f82...67e10x1f82...67e1voted for
22.38K
0x9087...47ea0x9087...47eavoted for
21.55K
0x20e1...0aa20x20e1...0aa2voted for
21.06K
0xb208...97870xb208...9787voted for
20.46K
0xf882...f1be0xf882...f1bevoted for
20.4K
0x61df...7c1e0x61df...7c1evoted for
19.12K
0x13a4...21230x13a4...2123voted for
18.74K
0x2b28...e8b40x2b28...e8b4voted for
18.38K
0xe0de...ce160xe0de...ce16voted for
17.93K
0xb068...10a50xb068...10a5voted for
15.4K
0x3037...a9dd0x3037...a9ddvoted for
15.23K
0x9b8f...e7e10x9b8f...e7e1voted for
15.19K
0x97dc...fd9b0x97dc...fd9bvoted for
15.16K
0xfc74...4c7c0xfc74...4c7cvoted for
14.22K
0x7f55...49490x7f55...4949voted for
13.32K
0x4cb7...7cd50x4cb7...7cd5voted for
12.51K
0x0352...c8310x0352...c831voted for
12.29K
0x4f0e...987b0x4f0e...987bvoted for
11.86K
0x7f44...a8d20x7f44...a8d2voted for
11.8K
0xaf91...b93a0xaf91...b93avoted for
11.27K
0x6d98...3bbf0x6d98...3bbfvoted for
11.08K
0x6465...97650x6465...9765voted for
10.89K
0x4039...64d80x4039...64d8voted for
10.01K
0x2169...20110x2169...2011voted for
10K
0xdecc...50210xdecc...5021voted against
8.66K
0x7be9...2b9c0x7be9...2b9cvoted for
7.84K
0xeb22...bc580xeb22...bc58voted for
7.71K
0xbf39...8a190xbf39...8a19voted for
7.58K
0xab1d...06380xab1d...0638voted for
7.31K
0x952c...044e0x952c...044evoted for
7.16K
0x261e...7f930x261e...7f93voted for
6.95K
0x8b3c...43c30x8b3c...43c3voted for
6.9K
0xa0ef...2d560xa0ef...2d56voted for
6.86K
0xafe1...d8720xafe1...d872voted for
6.63K
0xdcc9...04f00xdcc9...04f0voted for
6.39K
0xf9f1...4bab0xf9f1...4babvoted for
6.29K
0xf757...a5070xf757...a507voted for
6.2K
0xe992...d6200xe992...d620voted for
6.14K
0x93ef...bbff0x93ef...bbffvoted for
5.92K
0xf5bb...9f7e0xf5bb...9f7evoted for
5.86K
0xd428...c0340xd428...c034voted for
5.81K
0xbc97...f4ff0xbc97...f4ffvoted for
5.22K
0x0c5e...63dd0x0c5e...63ddvoted for
5.17K
0x5249...17cc0x5249...17ccvoted for
5.16K
0xcd0d...11680xcd0d...1168voted for
5.08K
0xa09e...e8c70xa09e...e8c7voted for
5.06K
0xbb98...8e0c0xbb98...8e0cvoted for
5K