Skip to content

Instantly share code, notes, and snippets.

@Akagi201
Last active February 15, 2019 01:48
Show Gist options
  • Save Akagi201/a6330511ed155dbc6b886d22a12dd84f to your computer and use it in GitHub Desktop.
Save Akagi201/a6330511ed155dbc6b886d22a12dd84f to your computer and use it in GitHub Desktop.
[substrate]

术语

  • AfG Consensus
  • STF: runtime

tutorial

介绍

Install

Substrate 测试网

单节点

  • substrate --dev 相当于 substrate --chain=dev --validator --key Alice

多节点

  • substrate --chain=local --validator --name "ALICE" --key Alice -d /tmp/alice --node-key 0000000000000000000000000000000000000000000000000000000000000001 TCP port: 30333, /ip4/0.0.0.0/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN, Using authority key 5GoKvZWG5ZPYL1WUovuHW3zJBWBP5eT8CbqjdRY4Q6iMaDtZ
  • substrate --chain=local --validator --name "BOB" --key Bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN'
❯ subkey restore Alice
Seed 0x416c696365202020202020202020202020202020202020202020202020202020 is account:
  Public key (hex): 0xd172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f
  Address (SS58): 5GoKvZWG5ZPYL1WUovuHW3zJBWBP5eT8CbqjdRY4Q6iMaDtZ

Purge Chain Database

  • substrate purge-chain --dev
  • manually: rm -rf ~/Library/Application\ Support/Substrate/chains/dev/

telemetry

Refs

Demo

  • 使用最简单的共识, 类似 POA.
  • 支持动态添加 validator, 目前写死两个.
  • 支持转账, 目前不通.
  • 区块链浏览器以及支持转账等链上操作.
  • 预期耗时 2 周时间.

问题

  • edgeware-nodeCargo.toml substrate 均指定为 v0.9 版本.

wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment