4

I'm new to mining ethereum so this may be a very basic question.

I ran geth in attempt to sync the blockchain on my machine as follows

geth --rpc --fast --cache=2048

After letting it spin for about a day I ran get attach and saw the following

> web3.eth.syncing
{
  currentBlock: 3274586,
  highestBlock: 3275837,
  ...
}

I then restarted geth, with the intention of not passing in the fast flag and allowing geth to continue syncing the blockchain normally so that I could start to mine. However when running geth attach and checking the value of web3.eth.syncing I saw the the following

{
  currentBlock: 580,
  highestBlock: 1707213,
  ...
}

Is there some way to start geth with the blockchain from my initial sync, or do I have a misunderstanding of how geth is meant to be used?

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145
James
  • 43
  • 4

1 Answers1

1

Because geth --fast will not download the entire blocks

Instead of processing the entire Blockchain one link at a time, and replay all transactions that ever happened in history, fast syncing downloads the transaction receipts along the blocks, and pulls an entire recent state database.

When you remove --fast flag, the chain will start syncing all the blocks from very beginning.

niksmac
  • 9,673
  • 2
  • 40
  • 72
  • Thank you for your answer. In order to mitigate having to replay all transactions each time geth is run, is it better to run geth without the --fast flag and allow the blockchain to sync normally? – James Mar 02 '17 at 05:02
  • @James Not really. replay all transactions each time geth is run will not be the case. It is just to allow you to get the necessary blocks to do the txn. replay attack is explained here http://ethereum.stackexchange.com/q/26/259 – niksmac Mar 02 '17 at 05:21