1

I'm running Geth as well as Mist. I know I can run Geth, run Geth with console, run Geth and attach the console in a new terminal, as well as run Mist on its own. For some reason Mist doesn't seem to boot up when Geth is already running...

Either way, I want to do analysis on the live/main net so I want to download the full blockchain as well as have the fast version for transactions for when the full blockchain is not fully synched for a few days.

Is this possible/recommendable to do simply by specifying one of two separate data directories that I explicitly call when I run geth depending on if I want to update the full blockchain with geth or the light blockchain with geth --fast?

1

Yes.

Use --datadir for Geth. You just have to be careful not to mix up or forget specifying the --datadir whenever you run any Geth commands. This can also be used to have different testnets or private chains.

The database used by Geth can only be accessed by one process: only one instance with a given --datadir can run at a time. Mist also runs Geth, so you may need to also follow How to set a different datadir in Mist?

  • That's helpful, what is the actual danger of mixing commands. As in, I run --fast on the slow chain datadir, or vice versa? – Hovig Charchaflian Mar 28 '17 at 20:44
  • By mixing up commands, for example Geth with dir1 and then Geth console with dir2, you might be expecting certain blocks and transactions in the console but not see them because you are operating on chain dir1. Mixing up a testnet or private chain with mainnet may also lead to mainnet overwriting the other chain since mainnet is "longer". Generally, mixing up commands can end up with behavior that seems very confusing until the mix up is discovered. – eth Mar 31 '17 at 8:54

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.