实践Substrate私有网络搭建

jasonruan 2020.07.22

1 前言

本文参考:https://substrate.dev/docs/en/tutorials/start-a-private-network/,搭建Substrate私有网络,并将其托管到telemetry.polkadot.io上。

2 搭建步骤

2.1 安装 Substrate Node Template

# 安装依赖工具
$ curl https://getsubstrate.io -sSf | bash -s -- --fast

# clone最新分支版本的Substrate Node Template源码
$ git clone -b v2.0.0-rc4 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
$ cd substrate-node-template/
$ git checkout -b v2.0.0-rc4

# 初始化WebAssembly编译环境
source ~/.cargo/env
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly

# 编译
$ cargo build --release

2.2 创建Keys

使用Subkey命令,它是Substrate专用秘钥生成工具。安装方法:

$ cargo install --force subkey --git https://github.com/paritytech/substrate --tag v2.0.0-rc4

2.2.1 创建助记词

$ ./subkey --sr25519 generate
Secret phrase `text bubble owner rebuild damage today steel inflict mom book absent fiscal` is account:
  Network ID/version: substrate
  Secret seed:        0x29a4b095bb4ef2924cbc09f2c366cde44186de89348e8044b708527c35ae38dd
  Public key (hex):   0xec3ecd2ffebf75556c56e6cd183275a4017d70178d06c13d462a2245a902053a
  Account ID:         0xec3ecd2ffebf75556c56e6cd183275a4017d70178d06c13d462a2245a902053a
  SS58 Address:       5HQTpACjQHAE1o9niQctiFAzDLe4nKzMjjaW82ENTnS7DbGH

2.2.2 创建Key Pair 1

注:用于区块生成的Aura账号需要使用sr25519,用于区块确认(finalization)的GRANDPA账号需要使用ed25519

$ ./subkey --sr25519 inspect "text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//aura"
Secret Key URI `text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//aura` is account:
  Network ID/version: substrate
  Secret seed:        0xa63f8465e6b3d9380a2ffc4ca84256032d438d32eb4e42217a2176f255d35287
  Public key (hex):   0xc2b21193cf6669c82421036e382a945b45db9b0c24dff201cd341346bbe80d61
  Account ID:         0xc2b21193cf6669c82421036e382a945b45db9b0c24dff201cd341346bbe80d61
  SS58 Address:       5GTz3X4NeranDE5ZUj6EzK2PiR6xFokevbKyNQ4REc57DREC
  
 $ ./subkey --ed25519 inspect "text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//grandpa"
Secret Key URI `text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//grandpa` is account:
  Network ID/version: substrate
  Secret seed:        0xae72aa8342e70e624d2bb583616c2c15bbedf8b00f337886ee6abbad1e99d169
  Public key (hex):   0x5c066fdf0bfc266fdef4153371c07673108b4681005bfddb02b86612ee362866
  Account ID:         0x5c066fdf0bfc266fdef4153371c07673108b4681005bfddb02b86612ee362866
  SS58 Address:       5E9NB65gRVDMqNundHMFC3Umd4tdxocuWEcvAx31vj7hQPRW

2.2.3 创建Key Pair 2

$ ./subkey --sr25519 inspect "text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//aura"
Secret Key URI `text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//aura` is account:
  Network ID/version: substrate
  Secret seed:        0x06e30e1b0e598d61c4a38feb80ea1d75a958fd8a2dd3bd01ac6dcf0d8ef255a8
  Public key (hex):   0x9c3c7edccb0c653c6a867ed9b51cf8a21265a6099109f8bbc03517df65ad7c71
  Account ID:         0x9c3c7edccb0c653c6a867ed9b51cf8a21265a6099109f8bbc03517df65ad7c71
  SS58 Address:       5FbZJF6Afe2xsM2QnsRSGW7nDkXwBMNKUmFdUp6jEL9QTEjX
  
$ ./subkey --ed25519 inspect "text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//grandpa"
Secret Key URI `text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//grandpa` is account:
  Network ID/version: substrate
  Secret seed:        0x11a7c60cc1e1934e549da88512ea4b9dbb53bed6845af90d3e12f67a39b4ae48
  Public key (hex):   0x9d1811c2cc677a55b04eac77a4390b64a1760e93cfe5577500c89cc921372aec
  Account ID:         0x9d1811c2cc677a55b04eac77a4390b64a1760e93cfe5577500c89cc921372aec
  SS58 Address:       5FcgXQtGzM7SrrAEZjyA9KQzBmpWTyfP8tWBgAFyYC2m1foX

2.3 创建用户自定义chain spec文件

2.3.1 创建chain spec文件

$ ./target/release/node-template build-spec --disable-default-bootnode --chain local > customSpec.json
2020-07-22 20:17:44 Building chain spec

2.3.2 修改chain spec文件

customSpec.json文件中相关配置,改成前面创建的地址

  "name": "jsrzx Testnet",                                                                                                                                                        
  "id": "jsrzx_testnet",

      "aura": {
        "authorities": [
          "5GTz3X4NeranDE5ZUj6EzK2PiR6xFokevbKyNQ4REc57DREC",
          "5FbZJF6Afe2xsM2QnsRSGW7nDkXwBMNKUmFdUp6jEL9QTEjX"
        ]   
      },
      "grandpa": {
        "authorities": [
          [ 
            "5E9NB65gRVDMqNundHMFC3Umd4tdxocuWEcvAx31vj7hQPRW",
            1   
          ],
          [ 
            "5FcgXQtGzM7SrrAEZjyA9KQzBmpWTyfP8tWBgAFyYC2m1foX",
            1   
          ] 
        ]   
      },
      "balances": {
        "balances": [
          [ 
            "5GTz3X4NeranDE5ZUj6EzK2PiR6xFokevbKyNQ4REc57DREC",
            1152921504606846976
          ],
          [ 
            "5FbZJF6Afe2xsM2QnsRSGW7nDkXwBMNKUmFdUp6jEL9QTEjX",
            1152921504606846976
          ],
        ]   
      },
      "sudo": {
        "key": "5GTz3X4NeranDE5ZUj6EzK2PiR6xFokevbKyNQ4REc57DREC"
      }

2.3.3 创建chain spec raw文件

$ ./target/release/node-template build-spec --chain=customSpec.json --raw --disable-default-bootnode > customSpecRaw.json
2020-07-22 20:23:48 Building chain spec

2.4 创建私有网络

2.4.1 启动Bootnode节点

2.4.1.1 执行启动命令

$ ./target/release/node-template   --ws-external --rpc-external --rpc-cors=all   --base-path /tmp/jsrzx-bootnode01   --chain=./customSpecRaw.json   --port 30333   --ws-port 9944   --rpc-port 9933   --telemetry-url 'ws://telemetry.polkadot.io:1024 0'   --validator   --rpc-methods=Unsafe   --name jsrzx-BootNode01
2020-07-22 22:04:20 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.
2020-07-22 22:04:20 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.
2020-07-22 22:04:20 Substrate Node
2020-07-22 22:04:20 ✌️  version 2.0.0-rc4-54c58a2-x86_64-linux-gnu
2020-07-22 22:04:20 ❤️  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2020
2020-07-22 22:04:20 📋 Chain specification: jsrzx Testnet
2020-07-22 22:04:20 🏷  Node name: jsrzx-BootNode01
2020-07-22 22:04:20 👤 Role: AUTHORITY
2020-07-22 22:04:20 💾 Database: RocksDb at /tmp/jsrzx-bootnode01/chains/jsrzx_testnet/db
2020-07-22 22:04:20 ⛓  Native runtime: node-template-1 (node-template-1.tx1.au1)
2020-07-22 22:04:20 🔨 Initializing Genesis block/state (state: 0xd10f…a688, header-hash: 0x8647…f715)
2020-07-22 22:04:20 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2020-07-22 22:04:20 ⏱  Loaded block-time = 6000 milliseconds from genesis on first-launch
2020-07-22 22:04:20 📦 Highest known block at #0
2020-07-22 22:04:20 Using default protocol ID "sup" because none is configured in the chain specs
2020-07-22 22:04:20 🏷  Local node identity is: 12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX (legacy representation: QmYNUMrY5ow2Ev9zm5fZ2VdE3mQQcmfbzrSsyXaRAppMXc)
2020-07-22 22:04:20 〽️ Prometheus server started at 127.0.0.1:9615
2020-07-22 22:04:25 💤 Idle (0 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 0 ⬆ 0
2020-07-22 22:04:30 💤 Idle (0 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 0 ⬆ 0
2020-07-22 22:04:35 💤 Idle (0 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 0 ⬆ 0

启动后,我们并未看到有区块产生,还需要执行下面的操作。

接下来我们需要把我们创建的keys添加到该节点的keystore里面,这步操作在后续每个网络节点部署时都必不可少。

2.4.1.2 添加keyskeystore

方式一:使用Polkadot-JS Apps UI
image.png
方式二:使用curl命令
  • 添加aura1
curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d "@aura1.json"
{"jsonrpc":"2.0","result":null,"id":1}

{
  "jsonrpc":"2.0",
  "id":1,
  "method":"author_insertKey",
  "params": [
    "aura",
    "text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//aura",
    "0xc2b21193cf6669c82421036e382a945b45db9b0c24dff201cd341346bbe80d61"
  ]
}
  • 添加grandpa1
curl http://localhost:9933 -H "Content-Type:application/json;charset=utf-8" -d "@gran1.json"
{"jsonrpc":"2.0","result":null,"id":1}

{
  "jsonrpc":"2.0",
  "id":1,
  "method":"author_insertKey",
  "params": [
    "gran",
    "text bubble owner rebuild damage today steel inflict mom book absent fiscal//jasonruan//grandpa",
    "0x5c066fdf0bfc266fdef4153371c07673108b4681005bfddb02b86612ee362866"
  ]
}

2.4.2 添加验证人节点

2.4.2.1 执行启动命令

$   ./target/release/node-template   --base-path /tmp/jsrzx-validator01  --chain ./customSpecRaw.json   --port 30334   --ws-port 9945   --rpc-port 9934   --telemetry-url 'ws://telemetry.polkadot.io:1024 0'   --validator   --rpc-methods=Unsafe   --name jsrzx-Validator01   --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX
2020-07-22 22:05:24 Substrate Node
2020-07-22 22:05:24 ✌️  version 2.0.0-rc4-54c58a2-x86_64-linux-gnu
2020-07-22 22:05:24 ❤️  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2020
2020-07-22 22:05:24 📋 Chain specification: jsrzx Testnet
2020-07-22 22:05:24 🏷  Node name: jsrzx-Validator01
2020-07-22 22:05:24 👤 Role: AUTHORITY
2020-07-22 22:05:24 💾 Database: RocksDb at /tmp/jsrzx-validator01/chains/jsrzx_testnet/db
2020-07-22 22:05:24 ⛓  Native runtime: node-template-1 (node-template-1.tx1.au1)
2020-07-22 22:05:25 🔨 Initializing Genesis block/state (state: 0xd10f…a688, header-hash: 0x8647…f715)
2020-07-22 22:05:25 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2020-07-22 22:05:25 ⏱  Loaded block-time = 6000 milliseconds from genesis on first-launch
2020-07-22 22:05:25 📦 Highest known block at #0
2020-07-22 22:05:25 Using default protocol ID "sup" because none is configured in the chain specs
2020-07-22 22:05:25 🏷  Local node identity is: 12D3KooWD4fjwTCEtoHczV3bH1bzyouWtAS1VXtM5q49m9zWmrXu (legacy representation: QmUQMXzgnMwxzb47xHLxgHzfSuD1sUseDjtZ8CqUW1isJw)
2020-07-22 22:05:25 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWD4fjwTCEtoHczV3bH1bzyouWtAS1VXtM5q49m9zWmrXu
2020-07-22 22:05:30 💤 Idle (1 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 0.6kiB/s ⬆ 0.6kiB/s
2020-07-22 22:05:35 💤 Idle (1 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 27 B/s ⬆ 32 B/s
2020-07-22 22:05:36 ✨ Imported #1 (0x2a04…4c11)
2020-07-22 22:05:40 💤 Idle (1 peers), best: #1 (0x2a04…4c11), finalized #0 (0x8647…f715), ⬇ 0.1kiB/s ⬆ 77 B/s
2020-07-22 22:05:45 💤 Idle (1 peers), best: #1 (0x2a04…4c11), finalized #0 (0x8647…f715), ⬇ 91 B/s ⬆ 0.1kiB/s
2020-07-22 22:05:48 ✨ Imported #2 (0x8c10…083e)
  • 此时Bootnode节点输出
2020-07-22 22:05:25 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX
2020-07-22 22:05:30 💤 Idle (1 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 0.2kiB/s ⬆ 0.2kiB/s
2020-07-22 22:05:35 💤 Idle (1 peers), best: #0 (0x8647…f715), finalized #0 (0x8647…f715), ⬇ 32 B/s ⬆ 27 B/s
2020-07-22 22:05:36 🙌 Starting consensus session on top of parent 0x864739e39231bfe4eb360a45b24a79256dedd261525028f45c112dc48ea3f715
2020-07-22 22:05:36 🎁 Prepared block for proposing at 1 [hash: 0xfc7a3b7f071bad7bb008f981ffc755d8c52bd28fd4b7a6066f8e0d3e9fb9cee3; parent_hash: 0x8647…f715; extrinsics (1): [0xc222…88fc]]
2020-07-22 22:05:36 🔖 Pre-sealed block for proposal at 1. Hash now 0x2a04174f2ebb9e13e12f7eb936d6bf00452f5077399f724a99501b8c78124c11, previously 0xfc7a3b7f071bad7bb008f981ffc755d8c52bd28fd4b7a6066f8e0d3e9fb9cee3.
2020-07-22 22:05:36 ✨ Imported #1 (0x2a04…4c11)
2020-07-22 22:05:40 💤 Idle (1 peers), best: #1 (0x2a04…4c11), finalized #0 (0x8647…f715), ⬇ 0.2kiB/s ⬆ 0.2kiB/s
2020-07-22 22:05:45 💤 Idle (1 peers), best: #1 (0x2a04…4c11), finalized #0 (0x8647…f715), ⬇ 0 ⬆ 0
2020-07-22 22:05:48 🙌 Starting consensus session on top of parent 0x2a04174f2ebb9e13e12f7eb936d6bf00452f5077399f724a99501b8c78124c11
2020-07-22 22:05:48 🎁 Prepared block for proposing at 2 [hash: 0x340e597ba2794bf039d42ffd66013391555e78525166e2cd8e2c60ec93f446ed; parent_hash: 0x2a04…4c11; extrinsics (1): [0xbc14…f03d]]
2020-07-22 22:05:48 🔖 Pre-sealed block for proposal at 2. Hash now 0x8c10584f605a4cd3d93a70d047fb2e1ea80067f87776ab56ce132d9d405d083e, previously 0x340e597ba2794bf039d42ffd66013391555e78525166e2cd8e2c60ec93f446ed.
2020-07-22 22:05:48 ✨ Imported #2 (0x8c10…083e)
2020-07-22 22:05:50 💤 Idle (1 peers), best: #2 (0x8c10…083e), finalized #0 (0x8647…f715), ⬇ 77 B/s ⬆ 0.1kiB/s
2020-07-22 22:05:55 💤 Idle (1 peers), best: #2 (0x8c10…083e), finalized #0 (0x8647…f715), ⬇ 51 B/s ⬆ 51 B/s
2020-07-22 22:06:00 🙌 Starting consensus session on top of parent 0x8c10584f605a4cd3d93a70d047fb2e1ea80067f87776ab56ce132d9d405d083e
2020-07-22 22:06:00 🎁 Prepared block for proposing at 3 [hash: 0x1aaf8b572a750e24ad1b0ee0d0b1e5aa6832f6873526e6efe59126130e88bca0; parent_hash: 0x8c10…083e; extrinsics (1): [0x99e8…ddee]]
2020-07-22 22:06:00 🔖 Pre-sealed block for proposal at 3. Hash now 0xfa3e8f79aef17e48f0fd5338b9c754cbc3e349ace3246edbc5995a7d2f91ea7c, previously 0x1aaf8b572a750e24ad1b0ee0d0b1e5aa6832f6873526e6efe59126130e88bca0.
2020-07-22 22:06:00 ✨ Imported #3 (0xfa3e…ea7c)

我们可以看到连接已经建立,不断有best区块产生,但是没有finalized区块产生,这时需要我们在验证人节点也添加keys,并且重启节点。

2.4.2.2 添加keyskeystore

方式一:使用Polkadot-JS Apps UI
image.png
方式二:使用curl命令
  • 添加aura2
curl http://localhost:9934 -H "Content-Type:application/json;charset=utf-8" -d "@aura2.json"
{"jsonrpc":"2.0","result":null,"id":1}

{
  "jsonrpc":"2.0",
  "id":1,
  "method":"author_insertKey",
  "params": [
    "aura",
    "text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//aura",
    "0x9c3c7edccb0c653c6a867ed9b51cf8a21265a6099109f8bbc03517df65ad7c71"
  ]
}
  • 添加grandpa2
curl http://localhost:9934 -H "Content-Type:application/json;charset=utf-8" -d "@gran2.json"
{"jsonrpc":"2.0","result":null,"id":1}

{
  "jsonrpc":"2.0",
  "id":1,
  "method":"author_insertKey",
  "params": [
    "gran",
    "text bubble owner rebuild damage today steel inflict mom book absent fiscal//rzexin//grandpa",
    "0x9d1811c2cc677a55b04eac77a4390b64a1760e93cfe5577500c89cc921372aec"
  ]
}

2.4.3 重启节点

之所以没有finalized区块产生,是因Substrate节点在导入grandpa key后,需要进行重启。

重启之后看到成功产生finalized区块。

  • Bootnode节点日志
$ ./target/release/node-template   --ws-external --rpc-external --rpc-cors=all   --base-path /tmp/jsrzx-bootnode01   --chain=./customSpecRaw.json   --port 30333   --ws-port 9944   --rpc-port 9933   --telemetry-url 'ws://telemetry.polkadot.io:1024 0'   --validator   --rpc-methods=Unsafe   --name jsrzx-BootNode01

2020-07-22 22:10:31 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.
2020-07-22 22:10:31 It isn't safe to expose RPC publicly without a proxy server that filters available set of RPC methods.
2020-07-22 22:10:31 Substrate Node
2020-07-22 22:10:31 ✌️  version 2.0.0-rc4-54c58a2-x86_64-linux-gnu
2020-07-22 22:10:31 ❤️  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2020
2020-07-22 22:10:31 📋 Chain specification: jsrzx Testnet
2020-07-22 22:10:31 🏷  Node name: jsrzx-BootNode01
2020-07-22 22:10:31 👤 Role: AUTHORITY
2020-07-22 22:10:31 💾 Database: RocksDb at /tmp/jsrzx-bootnode01/chains/jsrzx_testnet/db
2020-07-22 22:10:31 ⛓  Native runtime: node-template-1 (node-template-1.tx1.au1)
2020-07-22 22:10:31 📦 Highest known block at #35
2020-07-22 22:10:31 Using default protocol ID "sup" because none is configured in the chain specs
2020-07-22 22:10:31 🏷  Local node identity is: 12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX (legacy representation: QmYNUMrY5ow2Ev9zm5fZ2VdE3mQQcmfbzrSsyXaRAppMXc)
2020-07-22 22:10:31 〽️ Prometheus server started at 127.0.0.1:9615
2020-07-22 22:10:33 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX
2020-07-22 22:10:36 🙌 Starting consensus session on top of parent 0x805367935836c821252e2377a2b40f9299c656a0110a282573ce9b68898b9477
2020-07-22 22:10:36 Timeout fired waiting for transaction pool at block #35. Proceeding with production.
2020-07-22 22:10:36 🎁 Prepared block for proposing at 36 [hash: 0x93a11511d172c3e01ea7d161fa050befc8b5ab5524335647e27a7f4701662557; parent_hash: 0x8053…9477; extrinsics (1): [0xa745…4d58]]
2020-07-22 22:10:36 🔖 Pre-sealed block for proposal at 36. Hash now 0xcd7199364b6caaf77d4f691f9db0dbdceddfbe5dbadec77b537e744420ed0802, previously 0x93a11511d172c3e01ea7d161fa050befc8b5ab5524335647e27a7f4701662557.
2020-07-22 22:10:36 ✨ Imported #36 (0xcd71…0802)
2020-07-22 22:10:36 💤 Idle (1 peers), best: #36 (0xcd71…0802), finalized #33 (0x6dfb…9bb2), ⬇ 1.4kiB/s ⬆ 1.5kiB/s
2020-07-22 22:10:41 💤 Idle (1 peers), best: #36 (0xcd71…0802), finalized #34 (0x8720…c226), ⬇ 0.9kiB/s ⬆ 0.9kiB/s
2020-07-22 22:10:42 ✨ Imported #37 (0xc532…2af4)
  • 验证人节点日志
$   ./target/release/node-template   --base-path /tmp/jsrzx-validator01  --chain ./customSpecRaw.json   --port 30334   --ws-port 9945   --rpc-port 9934   --telemetry-url 'ws://telemetry.polkadot.io:1024 0'   --validator   --rpc-methods=Unsafe   --name jsrzx-Validator01   --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWC2mv6TUKbQbgujE57BWXtPdZM45E1tXtr8ekpUFwZoMX

2020-07-22 22:10:32 Substrate Node
2020-07-22 22:10:32 ✌️  version 2.0.0-rc4-54c58a2-x86_64-linux-gnu
2020-07-22 22:10:32 ❤️  by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2020
2020-07-22 22:10:32 📋 Chain specification: jsrzx Testnet
2020-07-22 22:10:32 🏷  Node name: jsrzx-Validator01
2020-07-22 22:10:32 👤 Role: AUTHORITY
2020-07-22 22:10:32 💾 Database: RocksDb at /tmp/jsrzx-validator01/chains/jsrzx_testnet/db
2020-07-22 22:10:32 ⛓  Native runtime: node-template-1 (node-template-1.tx1.au1)
2020-07-22 22:10:32 📦 Highest known block at #35
2020-07-22 22:10:32 Using default protocol ID "sup" because none is configured in the chain specs
2020-07-22 22:10:32 🏷  Local node identity is: 12D3KooWD4fjwTCEtoHczV3bH1bzyouWtAS1VXtM5q49m9zWmrXu (legacy representation: QmUQMXzgnMwxzb47xHLxgHzfSuD1sUseDjtZ8CqUW1isJw)
2020-07-22 22:10:33 🔍 Discovered new external address for our node: /ip4/127.0.0.1/tcp/30334/p2p/12D3KooWD4fjwTCEtoHczV3bH1bzyouWtAS1VXtM5q49m9zWmrXu
2020-07-22 22:10:36 ✨ Imported #36 (0xcd71…0802)
2020-07-22 22:10:37 💤 Idle (1 peers), best: #36 (0xcd71…0802), finalized #33 (0x6dfb…9bb2), ⬇ 1.6kiB/s ⬆ 1.6kiB/s
2020-07-22 22:10:42 🙌 Starting consensus session on top of parent 0xcd7199364b6caaf77d4f691f9db0dbdceddfbe5dbadec77b537e744420ed0802
2020-07-22 22:10:42 🎁 Prepared block for proposing at 37 [hash: 0xa891f9f76b326856e5fc564a567372315e1924bf06ba69db6c7be13466a6ff73; parent_hash: 0xcd71…0802; extrinsics (1): [0xe180…6b2b]]
2020-07-22 22:10:42 🔖 Pre-sealed block for proposal at 37. Hash now 0xc532950ea2ee70a35b1d6e9f346b5c8f1ac3881770946f282f1942bcbe1e2af4, previously 0xa891f9f76b326856e5fc564a567372315e1924bf06ba69db6c7be13466a6ff73.
2020-07-22 22:10:42 ✨ Imported #37 (0xc532…2af4)

2.5 托管网络节点

节点启动成功后,我们便可以在telemetry.polkadot.io上查看创建的网络节点:

image.png

3 参考资料

https://substrate.dev/docs/en/tutorials/start-a-private-network/

https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 206,482评论 6 481
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 88,377评论 2 382
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 152,762评论 0 342
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 55,273评论 1 279
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 64,289评论 5 373
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,046评论 1 285
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,351评论 3 400
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,988评论 0 259
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 43,476评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,948评论 2 324
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,064评论 1 333
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,712评论 4 323
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,261评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,264评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,486评论 1 262
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,511评论 2 354
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,802评论 2 345