7

I installed a v.0.8.7 client and tried switching to Ropsten, following these instructions. Namely, I typed in:

dyn906-29:~ sam$ geth -- datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ init /Users/sam/Library/Ethereum/testnet/testnet_genesis.json; geth -- datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ --networkid 3 console

... synchronization started, with typical (i.e., after I let it run about 10 minutes) console output:

I1124 12:07:01.281067 eth/downloader/downloader.go:298] Synchronisation failed: block download canceled (requested)
I1124 12:07:23.178469 core/blockchain.go:975] imported 3 block(s) (0 queued 0 ignored) including 0 txs in 1.001425657s. #84205 [dc3d3bcd / c0b43021]
I1124 12:07:24.448356 core/blockchain.go:975] imported 3 block(s) (0 queued 0 ignored) including 2 txs in 8.001122ms. #84208 [e716f763 / 9cdfe671]
I1124 12:07:33.003664 core/blockchain.go:975] imported 2048 block(s) (0 queued 0 ignored) including 1897 txs in 4.743529105s. #86256 [2c5e179c / dbc9325e]
I1124 12:07:37.833884 core/blockchain.go:975] imported 2048 block(s) (0 queued 0 ignored) including 676 txs in 4.821595483s. #88304 [f9215a23 / 62150759]

What confuses me in this output it indicates I downloaded as many as 86256 blocks (see end of last line)... but I see here that there are only about 35000 blocks in the new testnet so far.

So I have the impression that I am synchronising with Morden..

1. Am I currently synchronizing with Morden (instead of with Ropsten)?

2. How can I make sure my Client is synchronizing with Ropsten?

Thanks.

EDIT: The GUI mentions a total of ca. 1,800 K blocks... so I am fairly positive my Client is synchronising with Morden. So how to move to Ropsten?

q9f
  • 32,913
  • 47
  • 156
  • 395
hartmut
  • 488
  • 5
  • 15
  • check the content of /Users/sam/Library/Ethereum/testnet/geth/chaindata/ is there the blockchain files? if not your command is wrong – Badr Bellaj Nov 24 '16 at 17:18
  • Related: http://ethereum.stackexchange.com/questions/10205/switching-to-ropsten – eth Nov 24 '16 at 20:51

2 Answers2

7

Using Geth 1.5.3 and later, it's 2 steps:

  1. Run geth --testnet removedb to delete your blockchain database for the Morden network.

  2. Run geth --testnet


ORIGINAL:

When you use geth init, the datadir should end with /testnet. For example: /Users/sam/Library/Ethereum/testnet

When you use other commands like geth console, the datadir should be the parent directory, in this example: /Users/sam/Library/Ethereum

Yes, it is confusing. But when Geth 1.5.3 is released, geth --testnet will simplify it and you don't need to bother with geth init.

It is helpful to start with a clean datadir (you may need to manually create the /testnet subdirectory), but make sure that you back up your existing datadir: be careful to make sure you do not lose any keystore.

eth
  • 85,679
  • 53
  • 285
  • 406
  • I may need to double-check this but posting for now in case it helps. EDIT: I won't check the original post since Geth 1.5.3 has now been released. – eth Nov 24 '16 at 21:08
  • 3
    The geth --testnet removedb part is the most useful part of your answer, maybe you should highlight it a bit more. It's actually more of an answer than "just run geth --testnet" – Teleporting Goat Nov 30 '16 at 10:49
  • @TeleportingGoat Thanks for the suggestion! I improved the answer (which came from a similar question and your comment was very helpful). – eth Dec 01 '16 at 02:59
3

In your second call there is a space between -- and datadir, so probably you are running geth with the wrong data directory and therefore you are using the wrong genesis block. Try running

geth --datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ --networkid 3 console

instead of

geth -- datadir /Users/sam/Library/Ethereum/testnet/geth/chaindata/ --networkid 3 console
phlogratos
  • 183
  • 4
  • you are right, thank you so much. Part of the problem remains, in that after I entered these command, Ethereum wallet appears to still be synchronising with Morden (since it says that it needs to download 1800K blocks). Any idea on how to go about this? – hartmut Nov 24 '16 at 19:01