Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

平行链扩容方案 #1268

Closed
bysomeone opened this issue Jul 29, 2022 · 1 comment · Fixed by #1285
Closed

平行链扩容方案 #1268

bysomeone opened this issue Jul 29, 2022 · 1 comment · Fixed by #1285
Labels

Comments

@bysomeone
Copy link
Collaborator

bysomeone commented Jul 29, 2022

op-rollup

交易执行和聚合(Transaction execution and aggregation)

  • 由验证器节点打包执行二层交易, 对底层数据压缩后批量发布到主链
  • 验证器节点可以单个中心化控制, 或者多个采用类POS质押相互监督
  • 主链对压缩后的数据只做存储记录, 不会导致状态变化

状态提交(State commitments)

  • 提交状态数据Merkle root, 涉及账户, 余额, 合约逻辑等, 记录状态变化过程
  • 提交区块交易Merkle root, 用于交易存在Merkle proof

欺诈证明(Fraud proving)

主链记录了二层每一次提交的状态根, 在最终确认前需要经过挑战期, 任意第三方可以对状态更新提出质疑, 并提交欺诈证明, 以更新正确的状态

  • Optimism是将存在争议的交易提交到主链, 进行重新执行, 主链比较已提交和执行后的状态, 直接仲裁
  • Aribitrum采用多轮交互, 将争议范围进行二分缩小, 到单条指令级别, 再由主链执行单条执行, 根据结果完成仲裁
  • 上述方法均依赖于派生了新的虚拟机(OVM/AVM), 在主链合约中即能完成二层交易的重新执行或指令级别争议仲裁

matic

matic混合了侧链和plasma技术, 实现了侧链高并发的同时也保证了一定的去中心化安全性

bor

侧链节点实现, 对共识进行了调整, 提高了出块速度和并发

heimdall

共识层节点实现, 协调侧链和主链状态更新等

  • 在主链进行POS质押, 构成验证节点池子
  • 批量对bor的区块进行验证并, 并计算批次内所有区块哈希 merkle root , 共识后(2n/3+1)提交到主链

ethereum

作为matic主链, 部署了相关合约, 用于质押, 跨链, 侧链状态记录持久化

总结

相较于op-rollup基于EVM的欺诈证明, matic框架更适用于当前平行链模式, 可以做类似的实现

  • 平行链独立出块, 涉及挖矿打包共识
  • 向主链批量提交数据, 涉及交易等数据压缩, 提交共识
  • 协调主链和平行链状态更新, 涉及质押,跨链等功能
bysomeone added a commit to bysomeone/plugin that referenced this issue Feb 8, 2023
33cn pushed a commit that referenced this issue Feb 17, 2023
<a name="1.68.0"></a>
# [1.68.0](v1.67.5...v1.68.0) (2023-02-17)

### Features

* add state committer interface in consensus module(#1268) ([8d907b2](8d907b2)), closes [#1268](#1268)
@33cn
Copy link
Owner

33cn commented Feb 17, 2023

🎉 This issue has been resolved in version 1.68.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@33cn 33cn added the released label Feb 17, 2023
33cn pushed a commit to 33cn/plugin that referenced this issue Feb 21, 2023
<a name="1.68.0"></a>
# [1.68.0](v1.67.6...v1.68.0) (2023-02-21)

### Features

* add consensus commiter plugin rollup(33cn/chain33#1268) ([b0aca7d](b0aca7d)), closes [33cn/chain33#1268](33cn/chain33#1268)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants