Skip to content

Instantly share code, notes, and snippets.

@gititGoro
Last active September 15, 2023 07:32
Show Gist options
  • Save gititGoro/64884a6084b050c3d021805ace472275 to your computer and use it in GitHub Desktop.
Save gititGoro/64884a6084b050c3d021805ace472275 to your computer and use it in GitHub Desktop.
Environmental setup for Ethereum Dev as of 14 June 2017

Setting up a private ethereum blockchain for development and pointing your wallet at it

Ethereum tutorials all advise downloading the Mist wallet and beginning dev. The only problem is that the testnet and real blockchain are huge and take hours to download. What follows is a recipe for quickly setting up a small blockchain and pre-mining it with some test ethereum

The following is done in Linux but will work in MacOS and should have equivalent command line options in Windows. Where I don't give detailed instructions, it's because a quick google search will fill in the blanks.

Install geth https://github.com/ethereum/go-ethereum/wiki/geth

install Mist https://github.com/ethereum/mist/releases

OPEN A TERMINAL

  • run> geth --dev A private blockchain node will start up. A bunch of verbose logging will appear. Take note of the IPC location. Suppose, for instance, it's /home/vitalikpc/.ethereum/geth.ipc
  • kill process
  • go to the location it expects
    • if there isn't a geth.ipc then run> touch geth.ipc in terminal
  • run> geth --dev --ipcpath /home/vitalikpc/.ethereum/geth.ipc
  • start new terminal window (or tab if you can).
  • run> geth --dev attach
    • This starts a javascript console
  • run> personal.newAccount('some password')
  • run> miner.start()
    • Your original terminal window will go crazy. Wait for some blocks to be sealed.
  • run> miner.stop()
  • run> exit

You can now open Mist and it will display "PRIVATE-NET" in red at the top after a minute or 2. You should have some non-zero ether balance which you can use for dev. You can set the gas price when starting geth. geth --help will tell you how to do that.

Once you've done all this, follow the sample tutorials online which make use of an active wallet. ethereum.org has some sample tutorials that start from the point of all of the above having been magically completed.

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