diff --git a/docs/website/pages/blog/release-230717.en-US.mdx b/docs/website/pages/blog/release-230717.en-US.mdx new file mode 100644 index 000000000..616958c47 --- /dev/null +++ b/docs/website/pages/blog/release-230717.en-US.mdx @@ -0,0 +1,147 @@ +--- +title: Rooch v0.1 Release, Completing "Sprouting" Milestone +description: "This milestone includes the introduction of the Rooch Container preview version, developer tools, Move standard library and framework, JSON RPC, and other essential features. The next steps include further refining the developer tools, implementing multi-chain settlement, establishing Token/NFT standards, and enabling cross-chain asset mapping. Rooch aims to explore additional application scenarios and strives to become a fundamental infrastructure in the Web3 ecosystem." +author: jolestar +category: News +date: 2023/07/17 +--- + +import PostHeader from "/components/blog/postHeader"; + + + +Rooch v0.1 Release, Completing "**Sprouting**" Milestone is the second milestone on the path to Rooch mainnet. + +The objective of the "**Sprouting**" milestone is to release the first preview version of the Rooch Container, providing essential developer tools for developers to build applications on the Rooch platform. + +## Key Features of Rooch v0.1 + +This version primarily provides the following key features: + +### Rooch Command Line Tool + +The Rooch Command Line Tool allows users to start the Rooch Container, create, compile, and deploy Move projects, and query the state, transactions, and execution results of application contracts. It supports the complete development cycle and requirements of an application. For a list of supported commands and parameters, please refer to the [Rooch Command Line Tool documentation](/docs/developer/rooch-cli). + +### MoveOS + +MoveOS is a wrapper for MoveVM that provides a standardized state tree and state proofs. It encapsulates transaction validation and execution processes for MoveVM. In the future, MoveOS can be used in other scenarios that require support for the Move execution environment. + +### Move Standard Library and Framework + +Rooch includes three Move standard libraries: `MoveStdlib`, `MoveosStdlib`, and `RoochFramework`. `MoveStdlib` is the standard library for the Move language, `MoveosStdlib` is the standard library for MoveOS, and `RoochFramework` is the application framework for Rooch. + +1. `MoveStdlib` is located at address `0x1` and directly reuses the standard Move language library. +2. `MoveosStdlib` is located at address `0x2` and extends `MoveStdlib`. It provides state storage abstraction and encapsulates data structures such as `Table`, `TypeTable`, `Object`, `ObjectStorage`, `AccountStorage`, and more. +3. `RoochFramework` is located at address `0x3` and includes modules for Rooch accounts, transaction validation, multi-chain address mapping, and more. + +This address allocation solution for foundational libraries in Rooch avoids naming conflicts and facilitates extensibility. It also allows ecosystem projects to directly integrate frameworks into Rooch, such as DAO, DeFi, Gaming, Social, etc. In the next phase, Rooch will publish plans for collaborative framework development, so stay tuned. + +### Move Storage Abstraction + +Rooch extends Move by introducing storage abstraction. It provides two modes of state storage: `ObjectStorage` and `AccountStorage`. Rooch deprecates the global storage instructions in Move and replaces them with corresponding functions in `AccountStorage`. The mapping table below shows the correlation between the two. + +| Move Global Storage Instruction | Function in AccountStorage | +| ------------------------------- | ------------------------ | +| `move_to(&signer,T)` | `account_storage::global_move_to(&mut StorageContext,&signer,T)` | +| `move_from(address)` | `account_storage::global_move_from(&mut StorageContext,address)` | +| `borrow_global(address)` | `account_storage::global_borrow(&mut StorageContext,address)` | +| `borrow_global_mut(address)` | `account_storage::global_borrow_mut(&mut StorageContext,address)` | + +The introduction of these changes serves two main purposes: + +1. Defining state storage through contracts and unifying `ObjectStorage` and `AccountStorage` with a low-level Key-Value interface. This opens up possibilities for future extension in state storage, such as providing dedicated storage spaces for applications. +2. Resolving the referencing challenge in Move. Developers previously faced difficulties in returning references borrowed through the `borrow_global` instruction within their own methods, as these references were created out of thin air and could not be returned as function results. By borrowing through the `StorageContext`, this issue is solved, as the reference's lifetime becomes tied to the `StorageContext`'s lifetime. + +To ensure the security of state storage, and to enforce type safety rules similar to Move's global state instructions, Rooch introduces the `#[private_generics(T)]` annotation. This annotation can be added to function and indicates that the generic parameter `T` must be defined in the current contract of the caller, adhering to the constraints of Move's global storage instructions. + +For more detailed design on storage abstraction, please refer to the [Storage Abstraction](/docs/tech-highlights/storage_abstraction) documentation. + +### Rooch JSON RPC + +Applications can submit transactions and query the state of application contracts using JSON RPC in Rooch. + +Rooch provides a state query API `rooch_getStates` based on a unified access path, which returns the BCS serialized result of Move states. Additionally, Rooch offers the `rooch_getAnnotatedStates` API, which returns Move states in a JSON structure, making it convenient for programming languages that do not support BCS directly. + +This version includes a demonstration version of the Ethereum RPC Proxy, allowing users to interact with Rooch Container using MetaMask. + +For the currently supported API in Rooch, please refer to the [Rooch JSON RPC documentation](/docs/reference/rpc). + +### Sequencer and Proposer Prototype Implementation + +In this version, the Sequencer and Proposer are represented by a prototype implementation. The purpose is to illustrate the transaction execution flow and the instant confirmation feature in Rooch. For more information on the transaction execution flow in Rooch, please refer to the [Transaction Flow](/docs/tech-highlights/transaction_flow) documentation. + +### Examples + +In this version, there are several simple example projects provided, including: + +1. [counter](https://github.com/rooch-network/rooch/tree/main/examples/counter): A simple counter that has preliminary integration with `MetaMask` for interaction. +2. [basic_object](https://github.com/rooch-network/rooch/tree/main/examples/basic_object): A basic example showcasing the use of `Object`. +3. [complex_struct](https://github.com/rooch-network/rooch/tree/main/examples/complex_struct): Demonstrates the output results in JSON RPC for complex `struct` structures. +4. [event](https://github.com/rooch-network/rooch/tree/main/examples/event): Demonstrates the usage of `Event`. +5. [entry_function_arguments](https://github.com/rooch-network/rooch/tree/main/examples/entry_function_arguments): Showcases the supported argument types in entry function. +6. [kv_store](https://github.com/rooch-network/rooch/tree/main/examples/kv_store): A simple key-value store. +7. [blog](https://github.com/rooch-network/rooch/tree/main/examples/blog): A simple blog application with commenting functionality. + +Feel free to explore these examples to get a better understanding of how different features and functionalities can be implemented using Rooch. + + +## Next Steps and Objectives + +In the next steps, Rooch will focus on the following areas for improvement: + +1. Continuing to refine developer tools, enhancing the storage and retrieval API in Rooch, and exploring support for SQL queries to make Rooch the most efficient and user-friendly Web3 native application development framework. +2. Implementing multi-chain settlement, allowing Rooch contracts to directly verify and process transactions from other chains. Further improving the RPC proxy interface for multi-chain support and enhancing the wallet user experience. +3. Implementing Token/NFT standards and cross-chain asset mapping, completing the account abstraction , implementing gas fee delegation, session keys, and Web2 account login. + +Based on the aforementioned features, Rooch will primarily explore practical use cases from the perspective of **Rooch as a Backend Service**. This allows any application wanting to integrate blockchain to use Rooch as a backend service, where developers only need to master frontend skills and Move language. Although it is currently a centralized solution, applications can eventually achieve decentralization by integrating with the Rooch mainnet. + +Rooch offers several advantages over web2-based development frameworks: + +1. Built-in multi-chain support, including signature verification, block header verification, address mapping, and wallet support. +2. Rich querying API that do not require additional developing. +3. Support for gas-based protection against DDoS attacks. +4. Support for instant confirmation and session keys for a user experience similar to web2. + +Some specific use cases include: + +1. Web3 blogs and forums, such as Rooch can serve as an implementation of the nostr protocol. +2. Rooch as an index service for the Bitcoin inscriptions protocol(BRC20 etc.). +3. Rooch as a public data platform for wiki-like applications, with data updates achieved through governance. +4. Rooch as the backend platform for the fully on-chain gaming. + +These are just a few examples, and there are countless possibilities for developers to explore. We will soon launch the Rooch Brainstorming Contest, so stay tuned. +By leveraging Rooch as a backend service, developers can benefit from its built-in blockchain capabilities and focus on building applications with seamless integration with the blockchain. It provides a streamlined development experience and opens up a new world of possibilities for Web3 native applications. + + +## Rooch Milestones + +Before the launch of the mainnet, Rooch has five milestones. We have named these milestones via the stages of plant growth, aiming for Rooch to grow from a seed to a towering tree, becoming the infrastructure for Web3. + +### Seeding -- 2023 Q1 + +Complete technical design and team formation. + +### Sprouting -- 2023 Q2 + +Release the first preview version of Rooch Container, providing basic developer tools for building applications on Rooch. + +### Rooting -- 2023 Q3 + +Connect to different L1 public chains and DA chains, providing support for multi-chain settlement. Release a stable version of the Move Framework. Run a public developer test network. + +### Branching -- 2023 Q4 + +Collaborate with ecosystem teams to build frameworks and Layer2 infrastructure, providing app-specific containers and storage solutions. Run a permanent incentive test network. + +### Strengthening -- 2024 Q1 + +Enhance security and optimize performance. Run a pre-main network. + +### Foliage -- 2024 Q1 + +Numerous applications thrive on the Rooch network. Run the mainnet. + +## Conclusion + +Rooch's milestones are driven by application scenarios, focusing on the experience of developers and users. The goal is to expand the boundaries of Web3 applications and explore the possibilities of mass adoption. To learn more and try Rooch, please refer to the [Getting Started](/docs/getting-started) documentation. +For more detailed information on Rooch v0.1, please refer to the [Rooch v0.1 release notes](https://github.com/rooch-network/rooch/releases/tag/v0.1). We would like to thank the over ten developers who have contributed to Rooch so far. If you want to learn more and get involved in Rooch, please join the [Rooch Discord](https://discord.gg/rooch). \ No newline at end of file diff --git a/docs/website/pages/blog/release-230717.zh-CN.mdx b/docs/website/pages/blog/release-230717.zh-CN.mdx new file mode 100644 index 000000000..47054c0f1 --- /dev/null +++ b/docs/website/pages/blog/release-230717.zh-CN.mdx @@ -0,0 +1,145 @@ +--- +title: Rooch v0.1 发布,完成“萌芽|Sprouting”里程碑 +description: "该版本提供了 Rooch 容器预览版、开发者工具、Move 标准库和框架、JSON RPC 等关键特性。下一步计划完善开发者工具、实现多链结算、Token/NFT 标准以及多链资产映射。探索更多的应用场景,致力于成为 Web3 基础设施" +author: jolestar +category: News +date: 2023/07/17 +--- + +import PostHeader from "/components/blog/postHeader"; + + + +Rooch v0.1 发布,完成“萌芽|Sprouting”里程碑,这是 Rooch 主网前的第二个里程碑。 + +**萌芽|Sprouting** 里程碑的目标是发布第一个 Rooch 容器预览版本,提供基本的开发者工具,让开发者可以基于 Rooch 容器进行开发。 + +## Rooch v0.1 的关键特性 + +这个版本主要提供了以下主要特性: + +### Rooch 命令行工具 + +用来启动 Rooch 容器,创建,编译,部署 Move 项目,查询应用合约的状态、交易以及交易执行结果等。可以支撑一个应用的完整开发周期和需求。 +CLI 支持的命令以及参数请参看:[Rooch 命令行工具](/docs/developer/rooch-cli)。 + +### MoveOS + +MoveOS 是对 MoveVM 的封装,给 MoveVM 提供了标准化的状态树以及状态证明,封装了交易的验证以及执行流程。未来,MoveOS 还可以用在其他的想支持 Move 运行环境的使用场景中。 + +### Move 标准库以及框架 + +Rooch 内置了 `MoveStdlib`、`MoveosStdlib` 和 `RoochFramework` 三个 Move 标准库,其中 MoveStdlib 是 Move 语言的标准库,MoveosStdlib 是 MoveOS 的标准库,RoochFramework 是 Rooch 的应用框架。 + +1. `MoveStdlib` 使用地址 `0x1`。直接复用 Move 语言的标准库。 +2. `MoveosStdlib` 使用地址 `0x2`,提供了对 MoveStdlib 的扩展,以及应用状态存储的抽象,和数据结构封装:`Table`、`TypeTable`、`Object`、`ObjectStorage`、`AccountStorage` 等。 +3. `RoochFramework` 使用地址 `0x3`,包含 Rooch 的账户(`Account`)、交易验证、多链地址映射等模块。 + +Rooch 的这种基础库地址分配方式,一方面避免了模块的命名冲突,方便扩展。另外一方面也提供了这样一种可能,生态项目也可以直接给 Rooch 内置 Framework,比如 DAO、DeFi、Gaming、Social 等。下个阶段 Rooch 会发布 Framework 共建的计划,敬请关注。 + +### Move 存储抽象 + +Rooch 在 Move 基础上实现了存储抽象,同时提供了 `ObjectStorage` 和 `AccountStorage` 两种状态存储模式,废弃了 Move 原有的全局存储指令,用 `AccountStorage`中的方法替代,下面是二者的映射表。 + +| Move 全局存储指令 | AccountStorage 中的方法 | +| ----------------- | ----------------------- | +| `move_to(&signer,T)` | `account_storage::global_move_to(&mut StorageContext,&signer,T)` | +| `move_from(address)` | `account_storage::global_move_from(&mut StorageContext,address)` | +| `borrow_global(address)` | `account_storage::global_borrow(&mut StorageContext,address)` | +| `borrow_global_mut(address)` | `account_storage::global_borrow_mut(&mut StorageContext,address)` | + +这样做主要有两个目的: + +1. 通过合约来定义状态的存储,通过底层的 Key-Value 接口统一 `ObjectStorage` 和 `AccountStorage`。为未来扩展状态存储提供可能,比如提供应用专用的存储空间。 +2. 解决了 Move 的引用难题。开发者无法在自己的方法中返回通过 `borrow_global` 指令借用的引用,因为这个引用是凭空创造的,不能作为方法的返回值。而如果通过 `StorageContext` 借用,则可以达到这个目标,该引用的生命周期和 `StorageContext` 的生命周期绑定。 + +同时,为了保证状态存储的安全性,让 `AccountStorage` 和 `ObjectStorage` 的方法遵循和 Move 全局状态指令一样类型安全规则,Rooch 引入了 `#[private_generics(T)]` 注解(annotation)。这个注解可以加在方法上,表示该方法的泛型参数 `T` 必须定义在调用方的当前合约中,遵循 Move 全局存储指令一样的约束。 + +关于状态存储的详细设计请参看:[存储抽象](/docs/tech-highlights/storage_abstraction)。 + +### Rooch 的 JSON RPC + +应用可以通过 JSON RPC 来提交交易以及查询应用合约的状态。 + +Rooch 提供一种基于统一的访问路径(AccessPath)的状态查询接口 `rooch_getStates`,返回 Move 状态的 BCS 序列化结果。同时,Rooch 还提供 `rooch_getAnnotatedStates` 接口,返回 Move 状态的 JSON 结构,方便不支持 BCS 的编程语言直接使用。 + +这个版本提供了 Ethereum RPC Proxy 的演示版本,用户可以通过 MetaMask 和 Rooch Container 进行交互。 + +Rooch 当前支持的接口请参看:[Rooch JSON RPC](/docs/reference/rpc)。 + +### Sequencer 以及 Proposer 原型实现 + +Sequencer 以及 Proposer 这个版本中只包含了一个原型实现,主要表达了 Rooch 中的交易的执行流程,以及即时确认的特性。关于 Rooch 中的交易执行流程请参看:[交易执行流](/docs/tech-highlights/transaction_flow)。 + +### 示例 + +这个版本中,提供了一些简单的示例项目,包括: + +1. [counter](https://github.com/rooch-network/rooch/tree/main/examples/counter):一个简单的计数器,并且初步实现了和 `MetaMask` 的交互界面。 +2. [basic_object](https://github.com/rooch-network/rooch/tree/main/examples/basic_object):简单的 `Object` 示例。 +3. [complex_struct](https://github.com/rooch-network/rooch/tree/main/examples/complex_struct):展示复杂的 `struct` 结构在 JSON RPC 中的输出结果。 +4. [event](https://github.com/rooch-network/rooch/tree/main/examples/event):展示 `Event` 的使用。 +5. [entry_function_arguments](https://github.com/rooch-network/rooch/tree/main/examples/entry_function_arguments):展示 entry function 支持的参数类型。 +6. [kv_store](https://github.com/rooch-network/rooch/tree/main/examples/kv_store):一个简单的 KV 存储。 +7. [blog](https://github.com/rooch-network/rooch/tree/main/examples/blog):一个简单的博客应用,带有评论。 + +这些项目可以让开发者快速上手 Rooch,了解 Rooch 的基本特性。 + +## 下一步的目标 + +下一步,Rooch 主要从三个方向进行改进: + +1. 继续完善开发者工具,改进 Rooch 的存储和检索接口,探索支持 SQL 查询的检索接口,让 Rooch 成为最高效易用的 Web3 原生应用开发框架。 +2. 实现多链结算,让 Rooch 的合约可以直接校验并处理其他链上的交易。进一步完善多链的 RPC Proxy 接口,改进钱包使用体验。 +3. 实现 Token/NFT 标准以及多链资产映射,完成账户抽象(AccountAbstraction),实现 Gas 代付,SessionKey,以及 Web2 账户登陆。 + +基于以上特性,Rooch 这个阶段主要从 **Rooch 即后端服务(Rooch as a Backend Service)** 角度探索可落地的应用场景。让任何想接入区块链的应用直接使用 Rooch 作为后端服务,开发者只需要掌握前端技能以及 Move 语言。虽然当前只是一个中心化的方案,但未来应用可以通过接入 Rooch 主网来实现去中心化。 + +它比基于 Web2 的开发框架有以下优势: + +1. 内置的多链支持,包括签名校验,区块头验证,地址映射以及钱包支持。 +2. 丰富的检索能力,不需要进行二次开发。 +3. 支持基于 Gas 的防 DDoS 攻击。 +4. 支持即时确认,以及 SessionKey 可以实现类似于 Web2 的用户体验。 + +一些具体场景: + +1. Web3 Blog,Web3 Forum 等。比如将 Rooch 作为 nostr 协议的一种实现。 +2. Rooch 作为 Bitcoin 铭文协议(BRC20)的 Index Service。 +3. Rooch 作为类 Wiki 的公共数据平台,通过治理实现数据的更新。 +4. Rooch 作为全链游戏的后端服务。 + +更多的可能性,等待开发者的探索。我们即将发布 Rooch 脑洞大赛,敬请关注。 + +## Rooch 里程碑 + +Rooch 在主网启动之前一共有五个里程碑。我们用植物的生长过程来命名这些里程碑,希望 Rooch 能够像植物一样,从种子到参天大树,成为 Web3 的基础设施。 + +### 播种 (Seeding) -- 2023 Q1 + +完成技术方案设计和团队组建。 + +### 萌芽|Sprouting -- 2023 Q2 + +发布第一个 Rooch 容器预览版本,提供基本的开发者工具,让开发者可以基于 Rooch 容器进行开发。 + +### 生根 (Rooting) -- 2023 Q3 + +连接到不同的 L1 公链,以及 DA 链,提供多链结算的支持。发布 Move Framework 稳定版。运行公开的开发者测试网。 + +### 开枝 (Branching) -- 2023 Q4 + +和生态团队一起共建 Framework 以及 Layer2 基础设施,提供 App 专用容器以及存储方案。运行永久激励测试网(incentive test network)。 + +### 固本 (Strengthening) -- 2024 Q1 + +安全加固以及性能优化,运行预备主网(pre-main network)。 + +### 散叶 (Foliage) -- 2024 Q1 + +各种应用在 Rooch 网络中成长起来,运行主网。 + +## 总结 + +Rooch 的里程碑遵循应用场景驱动的原则,以开发者和用户的使用体验为中心,尝试拓展 Web3 应用的边界,探索 Web3 大规模采用落地的可能。想了解并试用 Rooch,请参看文档:[新手入门](/docs/getting-started)。 +Rooch v0.1 详细的发布说明请参看:[Rooch v0.1](https://github.com/rooch-network/rooch/releases/tag/v0.1)。感谢参与贡献的十多位开发者,如果想进一步了解和参与 Rooch,请加入 [Rooch Discord](https://discord.gg/rooch)。 diff --git a/docs/website/pages/docs/tech-highlights/storage_abstraction.en-US.mdx b/docs/website/pages/docs/tech-highlights/storage_abstraction.en-US.mdx index 719993e57..eb56b7237 100644 --- a/docs/website/pages/docs/tech-highlights/storage_abstraction.en-US.mdx +++ b/docs/website/pages/docs/tech-highlights/storage_abstraction.en-US.mdx @@ -21,7 +21,7 @@ In EVM, the state of a contract is stored through its field variables, and the v Move has made improvements to smart contract state storage. Applications need to perform explicit operations through global storage instructions. It mainly provides the following instructions: -1. `move_to(signer)`: Stores a resource of type `T` in the user state space of `signer`, which can only be executed by transactions initiated by the user. +1. `move_to(&signer,T)`: Stores a resource of type `T` in the user state space of `signer`, which can only be executed by transactions initiated by the user. 2. `move_from(address):T`: Retrieves a resource of type `T` from the user state space. 3. `borrow_global(address):&T`: Reads an immutable reference of type `T` from the user space. 4. `borrow_global_mut(address):&mut T`: Reads a mutable reference of type `T` from the user space. diff --git a/docs/website/pages/docs/tech-highlights/storage_abstraction.zh-CN.mdx b/docs/website/pages/docs/tech-highlights/storage_abstraction.zh-CN.mdx index 7d705d951..f04ec1cbe 100644 --- a/docs/website/pages/docs/tech-highlights/storage_abstraction.zh-CN.mdx +++ b/docs/website/pages/docs/tech-highlights/storage_abstraction.zh-CN.mdx @@ -21,7 +21,7 @@ EVM 中,合约的状态是通过合约的字段变量来存储,虚拟机直 Move 对智能合约状态存储做了改进,应用需要通过全局存储指令进行显式操作,它主要提供以下指令: -1. `move_to(signer)`:将 `T` 类型的资源存储在 `signer` 的用户状态空间内,这个只能通过用户自己发起的交易执行。 +1. `move_to(&signer,T)`:将 `T` 类型的资源存储在 `signer` 的用户状态空间内,这个只能通过用户自己发起的交易执行。 2. `move_from(address):T`:将 `T` 类型的资源从用户状态空间中取出来。 3. `borrow_global(address):&T`:从用户空间中读取 `T` 类型的的不可变引用。 4. `borrow_global_mut(address):&mut T`:从用户空间中读取 `T` 类型的的可变引用。