Introducing Account Abstraction, L2 → L1 Messaging, and more.

Today, we’re pushing major structural changes to improve user experience, increase compatibility with Ethereum’s EVM, and upgrade performance on the zkSync v2 testnet.

Hello, Account Abstraction

In this upgrade, we are adding Account Abstraction, a feature considered to be the “long dream of the Ethereum developer community”.

In summary, the goal of account abstraction is to reduce the number of account types, or entities with an ether (ETH) balance that can send transactions.

Ethereum currently features two account types — accounts controlled by private keys and contract accounts.

Account abstraction moves to enforce a single account type, just contract accounts, and pushes functionality such as signature verification, gas payment, and replay protection out of the core protocol and into the EVM. This differs from Ethereum today where all transactions must start from an EOA, or account controlled by a private key.

At a very high level, account abstraction allows us to make authorizations programmable, enabling a greater diversity of wallet and protocol design with use cases including:

  • The implementation of smart contract wallets that improve the user experience of private key storage and recovery (eg. social recovery, multisig)
  • The ability to natively pay gas fees in tokens other than ETH
  • The ability for accounts to change public and private keys
  • The addition of non-cryptographic modifications, where users can require transactions to have expiry times, confirm slightly out-of-order, and more
  • Diversity in signature verification systems from the current ECDSA, including post-quantum safe signature algorithms (eg. Lamport, Winternitz)

In other words, account abstraction brings about major improvements to the overall user experience, and expands the application design space for developers. When it comes to how this can be used, we’re bound to see numberous creative use cases emerge that aren’t covered above.

Note: AA EOA’s like Metamask are still supported.

Calling Layer 1, L2 -> L1 Messaging is Live

Before this upgrade, developers could communicate and pass messages from Ethereum to zkSync v2, but couldn’t pass messages from v2 back to Ethereum. This upgrade closes the communication loop and allows developers to send information to Ethereum when something happens on L2, which can then be acted upon.

For instance, DAOs can keep voting tokens locked in a vault on L1, but conduct voting on zkSync where fees are far less expensive. Once the voting has finalized, zkSync can provably relay the result back to Ethereum where that information can be acted upon.

We’ve added support for msg.value

msg.value is a transaction property that defines how much ETH was sent in a transaction. Given ETH is a special token type (not an ERC20) that relies on this property, this meant that native Ethereum transactions on zkSync v2 previously weren’t possible, forcing developers to make modifications to existing codebases and utilize wrapped ETH instead. With this addition, native ETH can be transacted on v2, and it’s easier than ever for developers to migrate their codebase.

New Opcodes

The addition of L2 -> L1 messaging allows us to simplify the protocol’s interface and replace hardcoded operations (eg. withdrawals) with generic L1 <> L2 communication.

The following opcodes are now supported by the compiler, bringing a smoother process to migrate L1 smart contracts to zkSync.

  • EXTCODESIZE
  • CALLVALUE (msg.value)
  • BALANCE
  • SELFBALANCE
  • EXTCODEHASH

We’ve performed a regenesis

To implement these changes, we have performed a regenesis of zkSync 2.0 testnet. This means that contracts must be redeployed, and the state of account balances and transactions has been reset. We will have another regenesis before launching to mainnet.

Housekeeping

These upgrades are some of the most requested amongst developers, and we’re excited to see what unique applications they unlock. Given the purpose of testnet is to harden our systems, bugs and issues can be expected (especially with account abstraction, which should be considered an unstable feature with breaking changes expected in the near future).

If you run into something funky, get in touch with us on Discord so we can help.

We have more updates coming, and it will be a jam-packed second half of the year ;)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store