开源推荐
morning
GitHub 热门项目: quip-protocol-rs
摘要
GitHub项目:quip-protocol-rs 仓库地址:https://github。
the
template
node
solochain
https
2026-05-23
1 阅读
GitHub Trending
GitHub 项目:quip-protocol-rs
仓库地址:https://github.com/QuipNetwork/quip-protocol-rs
星级:5679 | 作者:Quip网络
项目描述:从 Substrate 分叉的 Quip 协议的 Rust 实现
===================================================
自述文件内容:
# Substrate 节点模板
一个新的 [Substrate](https://substrate.io/) 节点,准备好进行黑客攻击:rocket:
该模板的独立版本适用于 Polkadot 的每个版本
在 [Substrate 开发者中心平行链
模板](https://github.com/substrate-developer-hub/substrate-node-template/)
存储库。平行链模板直接在每个 Polkadot 生成
从 [Solochain 模板] 中发布分支
基材](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain)
上游
通常最好使用独立版本来启动新项目。全部
错误、建议和功能请求应在上游提出
[基材](https://github.com/paritytech/polkadot-sdk/tree/master/substrate)
存储库。
## 开始使用
根据您的操作系统和 Rust 版本,可能还有其他
编译此模板所需的包。检查
适用于您的平台的[安装](https://docs.substrate.io/install/)说明
最常见的依赖关系。或者,您可以使用[替代方案之一
安装](#alternatives-installations) 选项。
获取solochain模板代码:
````嘘
git 克隆 https://github.com/paritytech/polkadot-sdk-solochain-template.git solochain-template
cd solochain-模板
````
### 构建
? 使用以下命令构建节点而不启动它:
````嘘
货物构建--发布
````
### 嵌入式文档
构建项目后,您可以使用以下命令来探索其
参数和子命令:
````嘘
./target/release/solochain-template-node -h
````
您可以生成并查看[Rust
此模板的文档](https://doc.rust-lang.org/cargo/commands/cargo-doc.html)
用这个命令:
````嘘
货物+夜间文档--打开
````
### 单节点开发链
以下命令启动一个单节点开发链,但不
持续状态:
````嘘
./target/release/solochain-template-node --dev
````
要清除开发链的状态,请运行以下命令:
````嘘
./target/release/solochain-template-node purge-chain --dev
````
要启动具有详细日志记录的开发链,请运行以下命令:
````嘘
RUST_BACKTRACE=1 ./target/release/solochain-template-node -ldebug --dev
````
开发链:
- 在节点运行时维护“tmp”文件夹中的状态。
- 使用 **Alice** 和 **Bob** 帐户作为默认验证者权限。
- 使用 **Alice** 帐户作为默认的 `sudo` 帐户。
- 预先配置了创世状态(`/node/src/chain_spec.rs`)
包括几个预先资助的发展账户。
要在运行之间保留链状态,请通过运行命令指定基本路径
类似于以下内容:
````嘘
// 创建一个文件夹用作数据库基本路径
$ mkdir 我的链状态
// 使用该文件夹来存储链状态
$ ./target/release/solochain-template-node --dev --base-path ./my-chain-state/
// 检查运行链后在基本路径内创建的文件夹结构
$ ls ./my-chain-st