Substrate Developer Hub

Substrate Developer Hub

  • 教程
  • 知识库
  • 进阶菜谱
  • API 文档
  • Languages icon简体中文
    • English
    • 协助翻译

›Runtime

开始

  • 总览
  • Architecture
  • 安装
  • 在 Windows 系统开始
  • 词汇表

学习 Substrate

  • Extrinsics
  • 交易池
  • 账户摘要
  • 会话密钥
  • 交易权重
  • 链下功能

Runtime

  • Runtime 总览
  • Runtime 的基本类型
  • FRAME
  • Pallets
  • Runtime宏
  • Runtime 元数据
  • Runtime 存储
  • Runtime 来源
  • Runtime 执行流程
  • Runtime事件
  • Runtime 错误
  • 交易费用
  • 调试
  • Runtime 测试
  • Runtime Benchmarking
  • 链上随机生成
  • Runtime 升级

智能合约

  • 总览
  • ink! 智能合约
  • ink! 概念
  • ink! 开发
  • 合约 (Contracts) 模块
  • EVM 模块
  • ink! 常问问题

整合

  • Polkadot-JS
  • 客户端库
  • 链规范
  • Subkey 工具
  • 内存分析

进阶

  • SCALE 编解码器
  • 共识机制
  • 区块导入过程
  • Runtime Executor
  • 密码学
  • 存储
  • SS58 地址格式
  • Why are there no Hash collections in sp_std?

贡献

  • 协助翻译
Translate

Runtime 总览

Runtime 是用于定义区块链的业务逻辑。 在基于 Substrate 开发的区块链中,runtime 被称为”状态转换函数“;Substrate 开发人员在 runtime 中定义了用于表示区块链 状态的存储项,同时也定义了允许区块链用户对该状态进行更改的函数。

为了能够提供无须分叉的升级功能,Substrate采用了可编译成 WebAssembly (Wasm) 字节码的 runtime 形式。 此外,Substrate 还对 runtime 必须实现的核心基本类型 进行定义。

核心 Substrate 代码库随附有 FRAME 框架,FRAME 是Parity 的 Substrate runtime 开发系统,已经应用于 Kusama 和 Polkadot 等链上。 FRAME 定义了额外的 runtime 基础类型,并提供了一个框架,使得通过编写模块 (称为 "pallets") 来构建 runtime 变得十分容易。 每个 pallet 用于封装特定于该域的逻辑,这些逻辑可表示为一组存储项、事件、错误和可调用函数的集合。 FRAME 开发人员可选择创建自己的 pallet ,也可选择重用包括50多个 Substrate 随附 pallet 在内的现有资源。

Runtime 组合

本节大部分内容将会重点介绍使用如何使用 FRAME 进行 Substrate runtime 开发。 但是请记住,FRAME 并不是 Substrate runtime 开发可使用的唯一系统。

进一步学习

  • 教程:《开发您的第一条 Substrate 区块链》
  • 教程:《在 Substrate runtime 添加自定义模块》
← 链下功能Runtime 的基本类型 →
Substrate Developer Hub
开发者中心
教程知识库进阶菜谱API 文档
社区
社区主页通讯Substrate 技术聊天室Substrate 研讨会Stack Overflow推特聚会活动
更多
Substrate Builders 计划BlogSubstrate GitHub开发者中心 GitHub隐私政策使用条款Cookie 设置
Copyright © 2021 Parity Technologies