ZKsync Era Overview

ZKsync Era overview

The general rollup workflow is as follows:

  • Users can receive, deposit, and transfer assets to each other.
  • Users can withdraw assets under their control to an L1 address.

Rollup operation requires the assistance of an operator, who rolls transactions together, computes a zero-knowledge proof of the correct state transition, and affects the state transition by interacting with the rollup contract. To understand the design, we need to look into how ZKsync rollup transactions work.

ZKsync operations are divided into rollup transactions (initiated inside rollup by a rollup account) and priority operations (initiated on the mainchain by an Ethereum account).

The ZKsync rollup operation lifecycles are as follows:

  • A user creates a transaction or a priority operation.
  • After processing this request, the operator creates a rollup operation and adds it to the block.
  • Once the block is complete, the operator submits it to the ZKsync smart contract as a block commitment. Part of the logic of some rollup operations is checked by the smart contract.
  • The proof for the block is submitted to the ZKsync smart contract as block verification. If the verification succeeds, the new state is considered final.

Furthermore, on ZKsync, each L2 block will progress through the following four stages until it is final.

  • Pending: The transaction was received by the operator, but it has not been processed yet.
  • Processed: The transaction is processed by the operator and is confirmed to be included in the next block.
  • Committed: This indicates that the transaction data of this block has been posted on Ethereum. It does not prove that it has been executed in a valid way, but it ensures the availability of the block data.
  • Finalized: This indicates that the SNARK validity proof for the transaction has been submitted and verified by the smart contract. After this step, the transaction is considered to be final.

The typical time for a transaction to go from Processed to Finalized is a couple of hours at the current stage.

Please note that for developer convenience, we usually treat the Processed and Committed states as a single stage called Committed since they have no difference from the UX/DevEx standpoints.

The State of ZKsync

The current version of ZKsync Era solves the needs of most applications on Ethereum, and with more features planned for release soon, ZKsync Era will provide developers with a design space to experiment with applications not possible on Ethereum today. With this release, we are supporting the following features:

  • Native support of ECDSA signatures: Unlike the first version of ZKsync and other ZK rollups, no special operation is required to register the user’s private key. Any account can be managed in L2 with the same private key that is used for L1.
  • Solidity 0.8.x support: Deploy your existing codebase with little to no changes required.
  • With small exceptions, our Web3 API is fully compatible with Ethereum. This allows seamless integration with existing indexers, explorers, etc.
  • Support for Ethereum cryptographic primitives: ZKsync natively supports keccak256, sha256, and ecrecover via precompiles.
  • Hardhat plugin: Enables easy testing and development of smart contracts on ZKsync.
  • L1 → L2 smart contract messaging: Allows developers to pass data from Ethereum to smart contracts on ZKsync, providing the required information to run various smart contracts.
  • Native account abstraction: ZKsync Era implements account abstraction natively (/build/developer-reference/account-abstraction), which brings multiple UX improvements for all accounts.

Highlights of ZKsync Era

  • Mainnet-like security with zero reliance on 3rd parties.
  • Permissionless EVM-compatible smart contracts.
  • Standard Web3 API.
  • Preserving key EVM features, such as smart contract composability.
  • Introducing new features, such as native account abstraction.

ZKsync in comparison

ZKsync stands out remarkably in security and usability among existing L2 scaling solutions. Thanks to the combination of cutting-edge cryptography and on-chain data availability, ZK rollups (the core network of ZKsync) are the only L2 scaling solution that doesn't require any operational activity to keep the funds safe.

For example, users can go offline and still be able to withdraw their assets safely when they come back, even if the ZK rollup validators are no longer around. For a comprehensive distinction between ZKsync Era and Ethereum, read this guide.

Made with ❤️ by the ZKsync Community