✏️
kingkong
  • Introduction
  • Go
    • 入门
    • 并发
    • 避坑
    • 测试
    • GC
    • 性能剖析PProf
    • 第三方库
    • 学习资料
    • 编写可维护Go语言代码建议
    • SOLID Go Design
    • 数组与切片
    • Go Mudules
    • mac 系统go升级 1.12到1.14
  • Kubernetes
    • 安装
    • 本质
    • 常用命令
    • 架构
    • 配置文件
    • Pod
    • Kubectl
    • 学习资料
  • Mac
    • Mac
    • Alfred4
    • 开机启动项管理
    • 升级macOS Big Sur11.1后蓝牙不能用
    • macOs磁盘清理之Homebrew数据清理
  • Docker
    • 常用命令
    • Dockerfile
    • Compose
    • Registry
    • Limit
    • Network
    • Volume
    • 特殊的进程
    • Namespace-Process
    • Namespace-Mount
    • Namespace-UTS
    • Namespace-IPC
    • Namespace-Network
    • Namespace-User
    • 踩坑
  • DevOps
    • ChatOps
    • GitOps
    • SecOps
    • VictorOps
  • Algorithm
    • raft
  • 中间件
    • etcd
    • Nacos集群部署
    • zookeeper
  • 分布式
    • CAP理论
    • BASE理论
    • Gossip协议
  • 网络
    • IP地址编址方式
    • C10k
    • NIO-BIO-AIO
    • Http
  • Linux
    • 常用命令
    • 常用命令1
    • 常用网络命令
    • 进程管理
    • 守护进程
    • Systemd
    • Unix哲学
    • 端口
    • 网络
    • CentOS目录结构
    • IT
    • 文件系统
    • 开源协定
    • 基础知识
    • bash
    • shell
    • vim
    • lvm2
    • btrfs文件系统
    • raid
    • 任务计划及周期性任务执行
    • find
    • 程序包的安装卸载
    • yum
    • sed
    • 用户、组和权限
  • 数据库
    • Redis
    • MySQL
  • 消息队列
    • kafka
  • 语言之道
  • 程序设计原则
  • LoadBalancer
    • LVS
    • HAProxy
  • 敏捷
    • 影响地图
    • 卡诺模型
    • 精益画布
    • 电梯演讲
    • INVEST原则
    • 复杂系统
    • AARRR模型
    • 用户故事
    • 看板
    • Scrum
  • MicroService
    • 分布式链接追踪系统
    • ServiceMesh
    • 如何设计微服务
    • 领域驱动设计
  • 项目实战
    • 多通道告警服务
    • IAM
  • 管理
    • 沟通
    • 演讲
    • 面试官
  • Authorization
    • JWT
  • Spring
    • IoC
    • SpringFramework
    • Spring核心编程思想
  • Java
    • SPI机制
    • Jar
    • tutorial
    • 面向对象
    • 核心类
    • 泛型
    • 集合
    • IO
    • 日期与时间
    • 单元测试
    • maven
    • 函数式编程
  • Mix
    • Bookmark
    • WorkStation
    • 快速压力转换
    • 手机拍照
    • markdown画图
    • RESTful API设计
    • 如何做单元测试
    • 赶走脂肪肝
  • Aphorism
  • 互联网
    • DNS
    • Nginx
  • Rust
  • Quarkus
    • java.util.zip.ZipException: zip END header not found
  • Python
    • tutorial
  • 区块链
    • Substrate
    • BTC
Powered by GitBook
On this page
  • Substrate包含什么
  • 启动
  • 出现错误"Rust nightly not installed, please install it!"
  • 启动两个节点
  • substrate node template

Was this helpful?

  1. 区块链

Substrate

波卡 要把不同的区块链连接到一起 跨链

解决的问题

  • 跨链协作

  • 可扩展怀

  • 共享安全

通用 易用 易修改

区块链链节点需要

  • 数据库

  • 点对点网络

  • 共识算法

  • 交易处理

  • 状态转换函数(Runtime)

核心组件

  • 数据库

  • 点对点网络

  • 加密算法

  • 序列化

  • 共识算法

  • 交易队列

定制化自由度很高

  • 区块链的基础/核心组件

  • 治理\升级模型 链逻辑升级 链上治理

  • 智能合约

Substrate包含什么

核心模块

  • 数据库

  • 交易队列

  • 命令行界面

  • 公/密钥生成

  • RPC

基本逻辑

  • 数据结构

  • 结算

  • 时间戳

p2p网络

  • 网络节点管理

  • 私讯协议集成

  • 分布式哈希表

共识机制

  • 抵押

  • Babe

  • Grandpa

  • 区块落实追踪

链上治理

  • 民主

  • 投票

  • 议会

  • 国库

Polkadot

中文学习资料

  • 公众号 polkadot中文平台

  • 公众号 Polkaworld

  • 公众号 Polkabase

启动

下载代码

$ git clone https://github.com/paritytech/substrate.git
$ cargo build --release #编译
$ ./target/release/substrate --dev #启动dev网络
$ ./target/release/substate purge-chain --dev # 删除存储目录

出现错误"Rust nightly not installed, please install it!"

The latest Rust nightly is broken for MacOS.

To solve this for Substrate, run the following:

$ rustup toolchain install nightly-2020-08-23
$ rustup target add wasm32-unknown-unknown --toolchain nightly-2020-08-23

Then make sure to compile your node with:

$ cargo +nightly-2020-08-23 build --release

启动两个节点

$ ./target/release/substrate --alice --chain local --base-path=/tmp/alice
$ ./target/release/substrate --bob --chain local --base-path=/tmp/alice

substrate node template

$ git clone https://github.com/SubstrateCourse/substrate-node-template.git #下载代码
$ cargo build --release #编译
$ ./target/release/node-template purge-chain --dev #清除本地数据
$ ./target/release/node-template --dev
Previous区块链NextBTC

Last updated 4 years ago

Was this helpful?

b站

知乎

知乎

如何学习Substrate

打开网站 点击 右上角polkadot substrate app

https://space.bilibili.com/67358318
https://zhuanlan.zhihu.com/substrate
https://zhuanlan.zhihu.com/v2web3
https://zhuanlan.zhihu.com/p/161771205
https://polkadot.js.org