Skip to content

Instantly share code, notes, and snippets.

@andreafspeziale
Last active March 30, 2022 03:24
Show Gist options
  • Save andreafspeziale/07cd961f87c39eb8ab3f6d483103b341 to your computer and use it in GitHub Desktop.
Save andreafspeziale/07cd961f87c39eb8ab3f6d483103b341 to your computer and use it in GitHub Desktop.
Operating Ropsten Ethereum testnet network with Geth and Mist on OSX

Operating Ropsten Ethereum testnet

from a newbie to newbies

Intro

I believe that a development environment is one of the access key in learning new technologies. I didn't find on the internet a simple and common path to make the Ropsten network, the Ethereum public testnet, work.

So I'm writing down a couple of command lines and links that can be useful to achieve it.

Resources and requirements

  • Ethereum project
  • Wiki
  • Geth is the the command line interface for running a full ethereum node implemented in Go
  • Mist is the tool of choice to browse and use Ðapps.

Env

All the libs etc. has been installed on a Macbook pro with:

  • 2,7 GHz Intel Core i5
  • 16 GB 1867 MHz DDR3
  • 256GB SSD.

A good machine.

Commands

Launch the geth node only for blocks sync:

$ geth --testnet --fast --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"

When you see the node synching logs, you should be ready to launch Mist from your Application folder. Here is where I found my first difficulties. Mist wouldn't start and was reporting errors. In order to solve them, I launched Mist using the command line.

You can easily do it by opening a new terminal tab and by typing the following command:

$ /Applications/Mist.app/Contents/MacOS/Mist --rpc ~/Library/Ethereum/testnet/geth.ipc

As soon as Mist is launched, it recognizes the geth node running in the background and starts showing the download progress. Once the testnet blockchain download is finished, Mist will return the GUI which can be used to create your first address/wallet.

Create it now, you'll need that address in a second!

In order to start playing with smart contracts or trying simple transactions you'll need some ether. I read on the web that ether can be collected using a faucet which wasn't working; so I tried to mine some ether. Several guides on the internet report a Mist functionality allowing you to mine ether. However this only works when running a private network.

Since we are using the public network, we need to mine some ether using geth mining functionalities. To archive this:

  • close the geth process you previously launched
  • copy from Mist the address you previously created
  • to be safe, close the Mist process you previously launched using the command line

Then:

  • launch a new geth process and enable mining functionality and set the address to receive mined token as follows: $ geth --testnet --fast --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --etherbase 'YOUR_ADDRESS' --mine
  • launch Mist from the command line one more time

Now the chance to mine a block depends on your hardware. I've been able to mine 3.6 ETH in a couple of hours.

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