Ethereum Mist 与本地专用网络连接

Ethereum Mist connect with local private network

系统信息

Geth Version: 1.7.3-stable

Git Commit: 4bb3c89d44e372e6a9ab85a8be0c9345265c763a

Operating System: linux

预期行为

将 Mist 连接到本地专用网络

实际行为

我输入命令:

geth --datadir ~/private_network init ~/private_network/genesis.json

geth --datadir ~/private_network --networkid 3131 --ipcpath ~/private_network/geth.ipc console 2>~/private_network/console.log

我 运行 Mist 但我有一个错误“地址已在使用中”即使我杀死使用端口 30303 的进程我也有相同的结果

回溯

~/.ethereum/testnet/geth/ethash count=3

INFO [12-16|12:05:37] Disk storage enabled for ethash DAGs dir=~/.ethash count=2

INFO [12-16|12:05:37] Initialising Ethereum protocol versions="[63 62]" network=3

INFO [12-16|12:05:37] Loaded most recent local header number=797369 hash=81c88e…3044c5 td=587702682055345

INFO [12-16|12:05:37] Loaded most recent local full block number=0 hash=419410…ca4a2d td=1048576

INFO [12-16|12:05:37] Loaded most recent local fast block number=761870 hash=08735b…e597b9 td=571350456833753

INFO [12-16|12:05:37] Loaded local transaction journal transactions=0 dropped=0

INFO [12-16|12:05:37] Upgrading chain index type=bloombits percentage=79

INFO [12-16|12:05:37] Regenerated local transaction journal transactions=0 accounts=0

INFO [12-16|12:05:37] Starting P2P networking Fatal: Error starting protocol stack: listen udp :30303: bind: address already in use

您正在连接到 Ropsten 网络(网络=3)。您必须使用 --network 选项将您的网络 ID 传递到 Mist 中,并使用 --rpc.

提供您的 .ipc 文件的路径

$ ./Mist.exe --network 3131 --rpc ~/private_network/geth.ipc

完整的命令行选项:

$ ./Mist.exe --help

Usage: Mist.exe --help [Mist options] [Node options]

Mist options:
  --mode, -m              App UI mode: wallet, mist.  [string] [default: "mist"]
  --node                  Node to use: geth, eth        [string] [default: null]
  --network               Network to connect to: main, test
                                                        [string] [default: null]
  --rpc                   Path to node IPC socket file OR HTTP RPC hostport (if
                          IPC socket file then --node-ipcpath will be set with
                          this value).                                  [string]
  --swarmurl              URL serving the Swarm HTTP API. If null, Mist will
                          open a local node.
                                     [string] [default: "http://localhost:8500"]
  --gethpath              Path to Geth executable to use instead of default.
                                                                        [string]
  --ethpath               Path to Eth executable to use instead of default.
                                                                        [string]
  --ignore-gpu-blacklist  Ignores GPU blacklist (needed for some Linux
                          installations).                              [boolean]
  --reset-tabs            Reset Mist tabs to their default settings.   [boolean]
  --logfile               Logs will be written to this file in addition to the
                          console.                                      [string]
  --loglevel              Minimum logging threshold: info, debug, error, trace
                          (shows all logs, including possible passwords over
                          IPC!).                      [string] [default: "info"]
  --syncmode              Geth synchronization mode: [fast|light|full]  [string]
  --version, -v           Display Mist version.                        [boolean]
  --skiptimesynccheck     Disable checks for the presence of automatic time sync
                          on your OS.                                  [boolean]

Node options:
  -  To pass options to the underlying node (e.g. Geth) use the --node- prefix,
     e.g. --node-datadir

Options:
  -h, --help  Show help                                                [boolean]