How do I connect to a private network from ethereu

2019-04-28 04:37发布

How do I connect to a private network from ethereum wallet? I was able to create a private network from geth command line using custom genesis file but now wanted my ethereum wallet to point to custom genesis file of the private network.Currently I am able to point my etherem wallet to either the mainnet or testnet but not private network.

I did find the following instructions on github mist browser Readme file but haven't been able to make much progress

To run a privatenet you need to have geth installed separately and run it with the ipcpath flag: $ geth --networkid 1234 --ipcpath /Users/you/Library/Ethereum/geth.ipc --datadir ...

标签: ethereum
2条回答
爷、活的狠高调
2楼-- · 2019-04-28 05:24

You need to download geth and Ethereum mist wallet , and install them.

Then go to the folder where you want to start the blockchain and follow these steps:

  1. Start command prompt here

    • $ mkdir chaindata
    • $ geth --datadir=./chaindata init genesis.json
    • $ geth --datadir=./chaindata --fast --cache=1024
  2. Start another command prompt here

    • $ geth attach
  3. Start Ethereum Wallet. Make sure it opens in private network

  4. for Mining

    • $ miner.start(3);
    • $ miner.stop();

You can get a video tutorial for the same here.

Hope it helps you!

查看更多
叛逆
3楼-- · 2019-04-28 05:29
  1. Ensure your Ethereum Wallet is closing.
  2. On your terminal.

    $ geth --networkid "1234" --datadir "/some/other/path" --ipcpath "/Users/<username>/Library/Ethereum/geth.ipc" console

  3. Reopen your Ethereum Wallet.

See: Ethereum Wallet – Developer Preview

If your want to reconnect to mainnet or testnet. Just type this "$ geth console" in your terminal.

查看更多
登录 后发表回答