2

I've upgraded my geth client to version 1.4.10-stable-5f55d95a (from 1.3.5) and now it won't run with the following command line arguments (the documentation is lackluster when it comes to describing the init parameter):

geth --datadir "./data_dir" --networkid 13 --rpcapi eth,web3,personal --rpc --maxpeers 0 init "gen.josn" --etherbase "0x0000000000000000000000000000000000000000" --mine --minerthreads 2

which worked in 1.3.5.

I've tried the following variations:

geth --mine --minerthreads 2 --datadir "./data_dir" --networkid 13 --rpcapi eth,web3,personal --rpc --maxpeers 0 init "gen.json"

which gives:

I0727 11:44:43.892926 ethdb/database.go:82] Alloted 16MB cache and 16 file handles to single_bootstrap_node_geth/chaindata
I0727 11:44:43.917096 core/genesis.go:92] Genesis block already in chain. Writing canonical number
I0727 11:44:43.917411 cmd/geth/main.go:299] successfully wrote genesis block and/or chain rule set: 2279317df6aed704d8d46771ed06fbe4b7a935f7005d341b091b7957bc374def

and also running as:

geth init "gen.json" --mine --minerthreads 2 --datadir "./data_dir" --networkid 13 --rpcapi eth,web3,personal --rpc --maxpeers 0

which gives:

Incorrect Usage.

init [arguments...]

The init command initialises a new genesis block and definition for the network.
This is a destructive action and changes the network in which you will be
participating.


flag provided but not defined: -mine

Where can I find the documentation of version 1.4.10?

Sebi
  • 5,294
  • 6
  • 27
  • 52
  • 1
    I've deleted the answer I posted before as it was clearly wrong - you'd already tried the suggestion. I'll have a look at the issue in the second command... – Richard Horrocks Jul 27 '16 at 16:51

1 Answers1

2

According to the results of your second command, it looks like you're already running on a private blockchain. If that's the case, you don't need to give the init command again. Just the --datadir and --networkid commands will suffice.

Incorrect Usage.

init [arguments...]

The --datadir command should appear before the init command. Source

flag provided but not defined: -mine

Sometimes, when you copy paste the command, -- will be replaced by - which might cause this error. To be sure, either type in the command or check it after copying.

galahad
  • 3,920
  • 3
  • 26
  • 66
  • I've managed to get it running. I had to setup the block chain using init and then run geth as a miner over it (pointing it to the directory in which the block chain was initiated). – Sebi Jul 28 '16 at 14:52
  • 1
    Cool. I usually start/stop miner from the JavaScript console. I think it's easier. – galahad Jul 28 '16 at 14:54
  • In my setup I have a bash script that initializes the block chain once, starts mining, waits a little and finally launches geth IPC. – Sebi Jul 28 '16 at 14:55