60

This question is in a similar vein to the past questions about geth --fast and parity --warp.

There was a recent question where the OP wanted to do as little syncing as possible, and one of the answers suggested the following:

Try geth --light, available since v1.5.2 . Syncs in minutes if not seconds.

How is this possible? What is it actually syncing?

3

1 Answer 1

83

I'll take my shot. Experts, please correct me.

  • "Full" Sync: Gets the block headers, the block bodies, and validates every element from genesis block.

  • Fast Sync: Gets the block headers, the block bodies, it processes no transactions until current block - 64(*). Then it gets a snapshot state and goes like a full synchronization.

  • Light Sync: Gets only the current state. To verify elements, it needs to ask to full (archive) nodes for the corresponding tree leaves.

EDIT (*) in newer version of geth it's -64

fsMinFullBlocks        = 64              // Number of blocks to retrieve fully even in fast sync
6
  • 1
    This is little bit related question - I hope your expertise can clear my misunderstand here. I want to build a map of transactions between Ethereum accounts to build a wallet. Does "fast" leave something information out or is the resulting chain data the same as with full sync? Jan 11, 2017 at 9:45
  • 1
    @MikkoOhtamaa If you have another question, please ask it by clicking the Ask Question button. This thread is about the light mode.
    – q9f
    Jan 11, 2017 at 9:46
  • 7
    @MikkoOhtamaa in fast you get the latests state, transaction and receipt tries. But you "lose" old history due to the fact that your node did not perform the validations (i.e. running those transactions to have that information available). For example, you will know your account A has E ether, but if it was due to an old tx, you won't know why you have those ethers. Jan 11, 2017 at 15:42
  • 15
    So, if I use the light version, can I make a token & deploy contracts using that?
    – remedcu
    Oct 9, 2017 at 9:08
  • 4
    @remedcu Andy Gray says "Yes" here (in the comments)
    – poshest
    May 16, 2018 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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