运行测试网络

初始化

$ cd ./cmd/bytomd
$ ./bytomd init --chain_id testnet --root "/Users/sheng/Library/Bytom_testnet"

--chain_id三个可选项:

  • mainnet: 连接到主网.
  • testnet: 连接到测试网络.
  • solonet: 单机模式.

默认根目录

  • MacOS(darwin):~/Library/Bytom
  • Windows(windows): ~/AppData/Roaming/Bytom
  • Others(eg.Linux):~/.bytom

使用 --root 参数来自定义安装路径。

启动

$ ./bytomd node --mining --root "/Users/sheng/Library/Bytom_testnet"

bytomd node的各类指令:

      --auth.disable                Disable rpc access authenticate
      --chain_id string             Select network type
  -h, --help                        help for node
      --mining                      Enable mining
      --home		   				root directory for config and data
  -r, --root   						DEPRECATED. Use --home (default "/Users/sheng/Library/Bytom")
      --p2p.dial_timeout int        Set dial timeout (default 3)
      --p2p.handshake_timeout int   Set handshake timeout (default 30)
      --p2p.laddr string            Node listen address.
      --p2p.max_num_peers int       Set max num peers (default 50)
      --p2p.pex                     Enable Peer-Exchange  (default true)
      --p2p.seeds string            Comma delimited host:port seed nodes
      --p2p.skip_upnp               Skip UPNP configuration
      --prof_laddr string           Use http to profile bytomd programs
      --vault_mode                  Run in the offline enviroment
      --wallet.disable              Disable wallet
      --wallet.rescan               Rescan wallet
      --web.closed                  Lanch web browser or not

Dashboard

启动Dashboard来查看运行结果

$ open http://localhost:9888/