1

I am using Geth 1.8.15-stable-89451f7c and starting geth in syncmode "light" starts importing block headers from 0. Is this expected or should it not start from the most recent block?

Following is the command I used to start light client:

geth --syncmode "light" --datadir data --rpc --rpcaddr localhost --rpcapi db,eth,net,web3,txpool --networkid 3711 -unlock 0x88978ac640c6b1e90a1be434af1907c26501543e --password password.txt --nodiscover --verbosity 4

Following are the logs:

INFO [09-17|02:54:07.822] Initialised chain configuration          config="{ChainID: 3781 Homestead: 1 DAO: <nil> DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}"
INFO [09-17|02:54:07.823] Loaded most recent local header          number=0 hash=854058…668426 td=1
INFO [09-17|02:54:07.824] Starting P2P networking 
WARN [09-17|02:54:07.824] Light client mode is an experimental feature 
DEBUG[09-17|02:54:07.912] Light Ethereum peer connected            id=477834e87a1554ec conn=staticdial name=Geth/v1.8.14-stable-316fc7ec/linux-amd64/go1.10
DEBUG[09-17|02:54:07.912] Received new announcement                id=477834e87a1554ec conn=staticdial number=274403 hash=b3466a…8c1954 reorg=0
DEBUG[09-17|02:54:07.912] Registered new entry                     enode=477834e87a1554ec
DEBUG[09-17|02:54:07.912] Synchronisation started                  id=477834e87a1554ec conn=staticdial
INFO [09-17|02:54:07.912] Block synchronisation started 
DEBUG[09-17|02:54:07.912] Synchronising with the network           peer=477834e87a1554ec eth=63 head=b3466a…8c1954 td=547249 mode=light
DEBUG[09-17|02:54:07.913] Retrieving remote chain height           peer=477834e87a1554ec
DEBUG[09-17|02:54:07.913] Fetching batch of headers                id=477834e87a1554ec conn=staticdial count=1 fromhash=b3466a…8c1954 skip=0 reverse=false
DEBUG[09-17|02:54:07.935] Remote head header identified            peer=477834e87a1554ec number=274403 hash=b3466a…8c1954
DEBUG[09-17|02:54:07.935] Looking for common ancestor              peer=477834e87a1554ec local=0 remote=274403
DEBUG[09-17|02:54:07.952] Fetching batch of headers                id=477834e87a1554ec conn=staticdial count=1 fromnum=0 skip=15 reverse=false
DEBUG[09-17|02:54:07.972] Found common ancestor                    peer=477834e87a1554ec number=0      hash=854058…668426
DEBUG[09-17|02:54:07.993] Directing header downloads               peer=477834e87a1554ec origin=1
DEBUG[09-17|02:54:07.993] Downloading block bodies                 origin=1
DEBUG[09-17|02:54:07.993] Downloading transaction receipts         origin=1
DEBUG[09-17|02:54:08.013] Fetching batch of headers                id=477834e87a1554ec conn=staticdial count=128 fromnum=192 skip=191 reverse=false
DEBUG[09-17|02:54:08.074] Filling up skeleton                      from=1
DEBUG[09-17|02:54:08.215] Fetching batch of headers                id=477834e87a1554ec conn=staticdial count=192 fromnum=1   skip=0   reverse=false
INFO [09-17|02:54:08.259] Stored checkpoint snapshot to disk       number=0      hash=854058…668426
DEBUG[09-17|02:54:08.312] Inserted new header                      number=1      hash=76a1c7…744617
DEBUG[09-17|02:54:08.313] Inserted new header                      number=2      hash=392992…307d46
DEBUG[09-17|02:54:08.313] Inserted new header                      number=3      hash=718ee7…e90c0e
DEBUG[09-17|02:54:08.313] Inserted new header                      number=4      hash=e4aee8…7f4069
DEBUG[09-17|02:54:08.313] Inserted new header                      number=5      hash=50b580…a71ae2
DEBUG[09-17|02:54:08.313] Inserted new header                      number=6      hash=509fb3…ddda0b
DEBUG[09-17|02:54:08.313] Inserted new header                      number=7      hash=0498d6…f27921
DEBUG[09-17|02:54:08.314] Inserted new header                      number=8      hash=4af189…0fd2e7
DEBUG[09-17|02:54:08.314] Inserted new header                      number=9      hash=645807…6bd7c5
DEBUG[09-17|02:54:08.314] Inserted new header                      number=10     hash=c8e384…3b66c8
DEBUG[09-17|02:54:08.314] Inserted new header                      number=11     hash=bfd9cb…a49823
DEBUG[09-17|02:54:08.314] Inserted new header                      number=12     hash=461e0b…583717
  • It is expected. – Briomkez Sep 17 '18 at 6:12
  • @Briomkez Is this changed recently with latest versions of geth? Could you please confirm? As per this link, it is stated otherwise ethereum.stackexchange.com/questions/17916/… – Jith Sep 17 '18 at 6:15
  • @Briomkez, I could see the light client getting crashed when trying to download the entire headers from beginning. The AWS instance where I am trying to run the light node has got only 512 MB Ram. Does it require more memory? I thought this was enough for a light client. – Jith Sep 17 '18 at 6:23
  • Maybe you're right (it is possible that it does not start from the beginning) . But the protocol requires that the light nodes downloads ALL the block headers (so that it can eventually ask other peers in the network to provide the information with a given hash). – Briomkez Sep 17 '18 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.