Rooch: Move Execute Layer

 

一个多链的执行层协议,连接公链与 Web3 DApp

A multi-chain Move Execute layer, connect Public Chains and Web3 DApps.

 

Rooch 名称来自于 Root & Branch 的缩写。这个名字最早是一个杂志名称,后来一个啤酒也用了这个名字。我们认为这个名字很好的表达了区块链的状态树模型,所以选用了这个名字。

The name Rooch is a shortcut for Root & Branch. which was the first name of a magazine, also used for a beer. We thought the name was a good representation of the state tree model of the blockchain, and that's why we chose it.

 

Rooch 的目标是作为模块化区块链中的执行层,连接多个公链以及 Web3 DApp,为 DApp 提供结算协议以及运行环境,以及为公链提供扩容能力。

The goal of Rooch is to act as an execution layer in a modular blockchain, connecting multi-chains to the Web3 DApps, providing Move runtime environment and settlement protocol for DApps, and providing scaling capabilities for blockchains.

关键特性 Key Feature

专注于执行层 Focus on the execution layer

模块化区块链是 Layer2 解决方案的自然演变。Rooch 将数据可用,共识,仲裁等功能委托给不同的系统承担,可以提升系统的吞吐能力,降低交易成本。而 Rooch 将专注于执行层,给 DApp 提供运行环境。

Modular blockchain is a natural evolution of the Layer2 solution, where Rooch delegates the roles of data availability, consensus, and arbitration to different systems to increase throughput and reduce transaction costs. Rooch will focus on the execution layer, providing the environment for DApps to run.

多链互联 Multi-chain interconnection

Rooch 连接多链作为结算层,例如 Starcoin、Aptos、Sui 和 Ethereum。
它可以跨多链聚合资产,向DApp提供多链资产,例如Layer2 Swap或DEx。
Rooch 也是一个 Layer2 跨链桥,安全性由 Layer1 保证,连接两大智能合约生态系统 EVM 和 Move。

Rooch connects multiple chains as a settlement layer, such as Starcoin, Aptos, Sui, Ethereum, etc, and aggregates the assets across multiple chains, providing multi-chain assets to DApps such as Layer2 Swap or DEx.
At the same time, Rooch is a Layer2 cross-chain bridge, secured by Layer1, connecting two major smart contract ecosystems, EVM and Move.

基于Move语言 Based on Move

Rooch提供 MoveOS,支持Starcoin、Aptos、Sui等多种Move Chains框架,为DApp提供多样化的Move执行环境。 可以混合使用全局存储 (Core Move) 和对象存储 (Sui Move) Move 编程模型。

Rooch provides MoveOS which supports multiple Move Chains frameworks, such as Starcoin, Aptos, and Sui, and provides a diverse Move execution environment to DApp. it is possible to use a mix of global storage (Core Move) and object storage (Sui Move) Move programming models.

Web3原生 Native for Web3

Rooch 为基于 P2P 网络的 Layer3 DApps 提供了基于状态通道的结算协议以及基于 Move 语言的应用框架。

Rooch provides a state-channel-based settlement protocol and a Move-based application framework for Layer3 DApps based on P2P networks.

技术概览(Technical Overview)

Execute Layer

 

  • MoveOS: 在 layer2 或 layer3 上为 Move DApp 提供执行环境

    • Providing the execution environment to Move DApp on layer2 or layer3.

  • OMO: 为 DApp 提供计算状态证明并生成乐观汇总的欺诈证明。

    • Providing the compute state proof for DApp and generating fraud-proof of the optimistic rollup.


  • StateChannel on layer2: 为 p2p 网络提供结算协议。

    • Providing settlement protocols for the P2P network.

  • Layer3 Move-based DApp framework: 让开发者得以基于 Move 构建 DApp 并将其部署到 p2p 网络

    • Providing the accessibility for developers to build DApps based on Move and deploy them to p2p networks.

OMO

 

为什么是模块化区块链(Why Modular blockchain)

模块化区块链的思路是将区块链系统分成多个独立模块,各自运行在独立的系统里,然后通过组合的方式构建出完整的区块链系统。这种方式可以用来解决单体区块链的扩展性问题,也可以让区块链中的不同模块有了独立演进的能力,可以通过组合尝试更多的方向。

The idea of a modular blockchain is to divide the blockchain system into several independent modules, each running in a separate system, building the complete blockchain system by combining them. This approach can be used to solve the scalability problem of a single blockchain, as well as giving the different modules in the blockchain the ability to evolve independently and to try out additional directions through combinations.

 

通常认为,区块链可分为四个模块:

  • Execution: Processes transactions.

  • Settlement: Dispute resolution and bridge.

  • Consensus: Orders transactions.

  • Data availability: Ensures data is available.

The functions that modular blockchains can specialize in are:

  • Execution: Processes transactions.

  • Settlement: Dispute resolution and bridge.

  • Consensus: Orders transactions.

  • Data availability: Ensures data is available.

 

模块化区块链是 Layer2 方案自然演进的结果。Rooch 利用模块化区块链的方式,可以接入多个结算层,给 Solidity/EVM 生态的应用带去在 Layer2 使用 Move 的能力,也给 Move 生态带来 EVM 生态的应用,实现两个生态应用的互通与组合。

The modular blockchain is a natural evolution of the Layer2 solution, and Rooch uses the modular blockchain solution to connect multiple settlement layers, giving Solidity/EVM ecosystem applications the ability to use Move in Layer2 and bringing EVM ecosystem applications to Move ecosystem, enabling the interoperability of applications from both ecosystems.

为什么是 Move Why Move

Move 引入的面向资源编程模型,让 Move 合约中的状态可以在不同的合约间移动,我们把这种状态叫做“自由状态”。”自由状态”给合约提供了一种面向资源的组合能力,让合约间可以基于状态类型来组合。

Move introduces a resource-oriented programming model that allows state in a Move contract to be moved between contracts, which is known as "free state". "Free state" gives contracts the ability to combine resources in a resource-oriented way, allowing contracts to be combined with each other based on the type of state.

而”自由状态”模型,也给分层方案带来了新的想象力,既然状态可以在合约之间移动,那也应该可以在不同的层之间移动。这样同一个资产的类型可以在 Layer1 和 Layer2 保持一致,让基于状态类型的可组合性从 Layer1 延伸到 Layer2。

The "Free State" model also brings new imagination to the layering solution, since the state can be moved between contracts, it should also be moved between layers. In this way maintaining the same address and asset (or state) type between Layer1 and Layer2 becomes possible.

总结一下,Move 给跨层的交互性设计带来新的思路:

  1. Move 的面向资源模型,可以实现通用的任意状态的跨层迁移,并保证资源类型的延续性。

  2. Move 的合约间的依赖方式,可以实现在 Layer2 直接执行 Layer1 的合约,从而实现无缝的跨层调用。

To summarize, Move brings new ideas to the design of cross-layer interactivity.

  1. Move's resource-oriented model enables generic, arbitrary state migration across layers and keep the resource types.

  2. Move's dependency approach enables direct execution of Layer1 contracts in Layer2, thus enabling seamless cross-layer invocation.

使用场景 UserCase

跨链桥 Rollup CrossChain Bridge & Layer2 DEX

当前跨链桥的方案主要有几种:

There are several main options for current cross-chain bridges.

  • 两条链直接通过智能合约互相嵌入对方的轻节点,验证对方的交易和状态。这种方案的优点是不需要引入新的中间层,安全性受智能合约以及 Layer1 保证。缺点是如果接入的链比较多,互相连接会导致复杂度指数上升。

    • Chains verify each other's transactions and status by embedding each other's smart contracts into each other's light nodes directly. The advantage of this solution is that there is no need to introduce a new middle layer , security is guaranteed by the smart contract and Layer1. The disadvantages are that if more chains are connected, the interconnection will lead to an exponential increase in complexity.

  • 引入中继链。中继链和其他链互连,消息和资产通过中继链中转。优点是解决了方案 1 的复杂度问题,缺点是安全受中继链的安全保证,而中继链的共识安全程度往往低于它连接的主链。

    • Introduce relay chains. The relay chain is interconnected with other chains and messages and assets are relayed through the relay chain. The advantage is that it solves the complexity problem of option 1. The disadvantage is that security is guaranteed by the security of the relay chain, which is often less secure by consensus than the main chain it connects to.

  • 多签。实现简单,但安全性依赖于多签私钥的管理。

    • Multi-signature. Simple to implement, but security depends on the management of the multi-signature private key.

而基于多链 Layer2 的方案中,多个结算层的资产汇集到 Layer2,Layer2 也可以承担起跨链桥的作用,但安全性受智能合约和 Layer1 保证。多链资产给运行在 Rooch 上的 DEX 提供了更强的竞争力,而 Rooch 可以通过 DEX 实现更复杂的跨链操作,比如跨链时同时兑换资产。

In a multi-chain Layer2-based solution, assets from multiple settlement layers are pooled in Layer2, which can also act as a cross-chain bridge, but security is guaranteed by the smart contract and Layer1.

Multi-chain assets provide a stronger competitive edge to DEX running on Rooch. And Rooch can implement more complex cross-chain operations, such as exchanging assets simultaneously when crossing chains, through the DEX.

State Channel on P2P network and Streaming Payments

状态通道(State Channel) ,或者叫支付通道(Payment Channel),以闪电网络(Lightning Network )为代表,是一种比较成熟的扩容方案。它的思路是双方各自抵押一部分资产在链上,然后在链下维护一个两个参与方(理论上也可以扩展到多个参与方)的局部共识状态,每次交易只需要双方确认。

State Channels, also known as the Payment Channels, is represented by the Lightning Network and is a relatively mature scaling solution. The idea is that each party pledges a portion of its assets on the chain, and then maintains a local consensus state under the chain between the two participants (which could theoretically be extended to multiple participants), with each transaction requiring only confirmation from both parties.

它的最佳应用场景是在 P2P 网络中做高频流式支付。但因为当前的状态通道都是架设在 Layer1 之上,创建通道的 Gas 成本和时间成本都很高,无法直接用在 P2P 网络中。而 Layer2 提供了即时确认交易的能力,以及低廉的 Gas 费用,使得 P2P 网络中的节点可以在创建网络连接的同时,把这个连接升级成为一个带支付能力的网络连接。

The best application scenario for this is for high frequency streaming payments in P2P networks. However, the current stateful channels are built on Layer1, and the Gas cost and time cost of creating a channel is too high to be used directly in a P2P network. However, Layer2 provides the ability to instantly confirm transactions and the low cost of Gas, allowing nodes in a P2P network to create a network connection and upgrade it to a payment-capable network connection at the same time.

有了流式支付的状态通道,应用即可在 P2P 网络中提供付费服务,比如需要按字节付费的数据下载,按请求次数付费的 API 等。

With a state channel for streaming payments, applications can provide paid services in the P2P network, such as data downloads that require per-byte payments, APIs that require per-request payments, and so on.

Web2 Service to Web3

Web2 Service 如果要接入 Web3,除了通过状态通道解决付费问题,另外一个是去中心化以及信任问题。 用户对 Web2 Service 的使用基于对服务方的信任,如果想让 Web2 Service 变成一个去中心化协议,任何人都可以运行该 Service 的程序对外提供服务,就有信任难题。

For Web2 Service to access Web3, apart from the issue of payment through a stateful channel, there is also the issue of decentralization and trust.

Web2 Service is used by users based on trust in the service provider, and if you want to make Web2 Service a decentralized protocol where anyone can run the service to provide services to the public, there will be a trust challenge.

比如一个提供区块链状态数据检索的服务,调用方如何确认自己的检索请求得到了正确的执行?并且结果没有被篡改?

For instance, if a service provides blockchain state data retrieval, how can the caller confirm that their retrieval request has been executed correctly? And that the results have not been tampered with?

而 Rooch 的 OMO 项目可以配合数据集证明机制,提供在某个数据集的基础上执行某个查询的计算证明,用户如果怀疑计算结果有误,可以通过查询多个服务提供方获取欺诈证明,并在 Layer2 上进行挑战,使得作弊的服务提供方得到惩罚。

这样 Web2 的应用可以通过这种方式来实现接入 Web3 并实现去中心化。

Rooch's OMO project can be coupled with a proof-of-dataset mechanism to provide proof of computation for a query executed based on a dataset. Users who doubt that the computation is incorrect can query multiple service providers to obtain proof of fraud and challenge them on Layer2 to penalize the cheating service provider.

In this way, Web2 applications can access Web3 to decentralize.

 

Roadmap

  • 2022-Q4: OMO PoC demo

  • 2022-Q4: Layer2 & Layer3 fraud-proof protocol and state movement protocol

  • 2023-Q1: MoveOS & Move Execute Layer

  • 2023-Q1: Connect to Ethereum & Move Chains

  • 2023-Q2: Run Move DApps on Execute Layer

  • 2023-Q3: State channel on P2P network

  • 2023-Q4: Move-based DApp framework