🔨

zkSync Era

不支持的opcodes
  • SELFDESTRUCT
zkSync 🛠 zkSync 2.0 for Builders
  • zksync同时提供zkRollup和zkPorter
  • zkPorter指数据在不上L1,类似于Volition,安全性由zksync代币保证
  • zkSync可以在发交易的overrides的customData中注明feeToken(只要validator接受)
  • 移除了payable, msg.value默认等于0
zksync不属于bytecode级别兼容的zkEVM,而是语言层的zkVM
  • solidity ⇒ yul ⇒ llvm ir ⇒ zkVM bytecode
  • 同样的solidity编译后得到的bytecode不同(因为vm不同)
不支持的:
  • solidity ≤ 0.4.12(建议>0.8)
  • 某些OZ库
  • 一些预编译合约(但是hash和ecrecover支持)
  • EIP1559(只支持type 0)
zksync具有一系列system contracts以减少zk电路大小和复杂度
  • ContractDeployer负责部署
  • zksync账户默认支持AA,每个账户都有code
zksync中不存在runtimeCode,只有creationCode
  • 两者统一合并到了creationCode
  • zksync账户的nonce分为deployment nonce和transaction nonce
zksync的部署跟L1有很大区别:
  • L1 bytecode在transaction的data字段中,但zksync中bytecode在transaction的factory_deps中
Finality on zkSync Era
  • Fill a batch with transactions (usually takes a few minutes).
  • Commit the batch to Ethereum.
  • Generate a proof for the whole batch (usually takes around an hour).
  • Submit the proof for verification by the Ethereum smart contract.
  • Finalize the batch on Ethereum (delayed by ~21 hours as a security measure during the alpha phase).