8

I have geth 1.5.4 installed on my ubuntu box. Here is the geth command line documentation for networkid:

--networkid value Network identifier (integer, 0=Olympic (disused), 1=Frontier, 2=Morden (disused), 3=Ropsten) (default: 1)

So, to connect to the Ropsten network, I started geth with --networkid 3.

geth --fast --networkid 3 console

However, it did not connect to the Ropsten network at all. My node started syncing but not sure what network it connected to. When I don't specify networkid but just pass --testnet:

geth --fast --testnet console

it connects to Ropsten network correctly and starts syncing.

What is the difference between specifying --testnet vs --networkid 3?

5

In addition to --networkid 3 starting geth with --testnet also makes sure that you use the correct genesis node for Ropsten.

You can start Ropsten also this way:

geth init ropsten_genesis.json && geth --networkid 3
1

--networkid 3 is the new testnet specifically, Ropsten. 1 is the main blockchain and 2 is the old testnet, morden.

When you use geth --networkid 3, it sets the default testnet to Ropsten, so after you've done it once, --testnet will bring you on Ropsten.

  • 1
    I just tried restarting geth without --testnet but with --networkid 3 and it did NOT connect to Ropsten network. So, I am still not sure what the difference between the two is. – maheshmurthy Dec 2 '16 at 16:55
  • This is missing key parts of the answer. @phologratos has it right, I think. – Mike Shultz Jul 24 '17 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.