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
  • I just tested the retrieval of events from historical blocks using geth --light and the results are a bit unstable - if the historical data has not been synced, the results do not appear. Once the historical data has been synced, the events get presented like a full node geth. See the recent question link. Commented Jan 11, 2017 at 3:04
  • Related, How to run a “server” for light clients?
    – q9f
    Commented Jan 11, 2017 at 9:46
  • Related: ethereum.stackexchange.com/questions/1229/…
    – eth
    Commented Sep 14, 2017 at 9:54

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? Commented 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
    Commented 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.
    – hhh
    Commented Jan 11, 2017 at 15:42
  • 15
    So, if I use the light version, can I make a token & deploy contracts using that?
    – remedcu
    Commented Oct 9, 2017 at 9:08
  • 4
    @remedcu Andy Gray says "Yes" here (in the comments)
    – poshest
    Commented May 16, 2018 at 10:51

Your Answer

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

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