zkSync 进展情况-20230404
技术架构
智能合约
主要包含以下几部分:
- L1&L2 桥合约
- zkSync rollup 合约
- L1 证明验证合约
执行层
主要包含以下的组件:
- 监控L1存款和优先级操作的合约事件;
- 维护内存池,用于接收交易;
- 在内存池获取交易,在VM中执行,并改变相应的状态;
- 生成zkSync 链的区块;
- 为执行的区块准备待证明的电路;
- 向L1 合约中提交区块和证明;
- 兼容以太坊的web3 API.
Prover
处理服务器生成的区块和元数据,构造zk证明。
存储
不同的组件和子组件并不会直接通过API交互,而是通过数据存储层。
关键特征
- 支持抽象账户
- 强大的LLVM编译器,优化ZK 证明器性能。
- 数据压缩:发布状态状态差值,而不是交易输入,以压缩数据
- 超大规模可扩展性:
Hyperchain
通过Hyperchain实现超大规模可扩展性。
开源组件
Zksync era节点:https://github.com/matter-labs/zksync-era
era 合约: https://github.com/matter-labs/era-contracts
era 系统合约:https://github.com/matter-labs/era-system-contracts
zkEVM Solidity 编译器:https://github.com/matter-labs/era-compiler-solidity
Era-compiler-vyper: https://github.com/matter-labs/era-compiler-vyper
SyncVm 电路实现:https://github.com/matter-labs/era-sync_vm
Era-zk_evm: https://github.com/matter-labs/era-zk_evm
证明组件:https://github.com/matter-labs/franklin-crypto
底层电路: https://github.com/matter-labs/bellman
zkSync CLI, 用于zkSync 2.0 交互:https://github.com/matter-labs/zksync-cli
zkSync Era 文档:https://github.com/matter-labs/zksync-web-era-docs
hardhat-zksync hardhat 插件:https://github.com/matter-labs/hardhat-zksync
zkSync web wallet: https://github.com/matter-labs/zksync-wallet-vue
era-compiler-llvm-context: https://github.com/matter-labs/era-compiler-llvm-context
era-compiler-llvm-builder: https://github.com/matter-labs/era-compiler-llvm-builder
Era-zkevm_tester: https://github.com/matter-labs/era-zkevm_tester
参考
https://era.zksync.io/docs/dev/
https://blog.matter-labs.io/gm-zkevm-171b12a26b36
https://github.com/matter-labs/zksync-era