3

I tried light client 1.6.0 (a master branch pull). Starting it, it commenced to download block headers. But even if the block header reached the latest block number, when I use geth attach and write anything starting with eth, the client just hangs.

It also hangs with release/1.5, but here nothing is downloaded at all:

 $ geth --light --verbosity 5
 I0320 03:55:14.775222 accounts/keystore/account_cache.go:228] reloaded keys, cache has 2 accounts
 I0320 03:55:14.775916 accounts/keystore/account_cache.go:228] reloaded keys, cache has 2 accounts
 I0320 03:55:14.776585 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/lash/.ethereum/geth/lightchaindata
 I0320 03:55:14.827540 ethdb/database.go:176] closed db:/home/lash/.ethereum/geth/lightchaindata
 I0320 03:55:14.828539 node/node.go:176] instance: Geth/v1.5.9-stable/linux/go1.6.2
 I0320 03:55:14.828614 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /home/lash/.ethereum/geth/lightchaindata
 I0320 03:55:14.846816 light/lightchain.go:120] Added trusted CHT for mainnet
 I0320 03:55:14.847088 light/lightchain.go:172] Last header: #3379462 [c78a082b…] TD=171956396220725049396
 I0320 03:55:14.847529 les/handler.go:202] LES: create downloader
 I0320 03:55:14.847876 eth/downloader/downloader.go:1474] Quality of service: rtt 20s, conf 1.000, ttl 1m0s
 I0320 03:55:14.848082 p2p/server.go:340] Starting Server
 I0320 03:55:14.852248 p2p/discv5/net.go:700] seed node (age 413882h55m14.852228837s): enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30305
 I0320 03:55:14.852908 p2p/discv5/net.go:700] seed node (age 413882h55m14.852886742s): enode://1c7a64d76c0334b0418c004af2f67c50e36a3be60b5e4790bdac0439d21603469a85fad36f2473c9a80eb043ae60936df905fa28f1ff614c3e5dc34f15dcd2dc@40.118.3.223:30308
 I0320 03:55:14.853256 p2p/discv5/net.go:700] seed node (age 413882h55m14.853247765s): enode://85c85d7143ae8bb96924f2b54f1b3e70d8c4d367af305325d30a61385a432f247d2c75c45c6b4a60335060d072d7f5b35dd1d4c45f76941f62a4f83b6e75daaf@40.118.3.223:30309
 I0320 03:55:14.854025 les/backend.go:191] WARNING: light client mode is an experimental feature
 I0320 03:55:14.854049 p2p/server.go:608] Listening on [::]:30303
 I0320 03:55:14.854687 les/serverpool.go:466] loaded server stats ccdb466173274add  fails: 0  connStats: 0.3139125280573429 / 18.79367180496  delayStats: 9.138µs / 25  responseStats: 462.287942ms / 34  timeoutStats: 0.9392857142857143 / 560
 I0320 03:55:14.854794 les/serverpool.go:466] loaded server stats 158f8aab45f6d19c  fails: 0  connStats: 0.31794501577540857 / 19.789514924323335  delayStats: 4.101µs / 16  responseStats: 0 / 1  timeoutStats: 0.9230769230769231 / 13
 I0320 03:55:14.854832 les/serverpool.go:466] loaded server stats 78de8a0916848093  fails: 0  connStats: 0.7824426219618442 / 3.4447904239400002  delayStats: 713ns / 3  responseStats: 0 / 1  timeoutStats: 0 / 1
 I0320 03:55:14.854877 les/serverpool.go:571] dialing 78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30303 out of 1, known: true
 I0320 03:55:14.855019 node/node.go:304] InProc registered *node.PrivateAdminAPI under 'admin'
 I0320 03:55:14.855040 node/node.go:304] InProc registered *node.PublicAdminAPI under 'admin'
 I0320 03:55:14.855093 node/node.go:304] InProc registered *debug.HandlerT under 'debug'
 I0320 03:55:14.855115 node/node.go:304] InProc registered *node.PublicDebugAPI under 'debug'
 I0320 03:55:14.855135 node/node.go:304] InProc registered *node.PublicWeb3API under 'web3'
 I0320 03:55:14.855160 node/node.go:304] InProc registered *ethapi.PublicCompilerAPI under 'eth'
 I0320 03:55:14.855178 node/node.go:304] InProc registered *ethapi.CompilerAdminAPI under 'admin'
 I0320 03:55:14.855201 node/node.go:304] InProc registered *ethapi.PublicEthereumAPI under 'eth'
 I0320 03:55:14.855247 node/node.go:304] InProc registered *ethapi.PublicBlockChainAPI under 'eth'
 I0320 03:55:14.855213 p2p/dial.go:299] dial tcp 191.235.84.50:30303 (78de8a091684)
 I0320 03:55:14.855308 node/node.go:304] InProc registered *ethapi.PublicTransactionPoolAPI under 'eth'
 I0320 03:55:14.855321 node/node.go:304] InProc registered *ethapi.PublicTxPoolAPI under 'txpool'
 I0320 03:55:14.855339 node/node.go:304] InProc registered *ethapi.PublicDebugAPI under 'debug'
 I0320 03:55:14.855365 node/node.go:304] InProc registered *ethapi.PrivateDebugAPI under 'debug'
 I0320 03:55:14.855381 node/node.go:304] InProc registered *ethapi.PublicAccountAPI under 'eth'
 I0320 03:55:14.855425 node/node.go:304] InProc registered *ethapi.PrivateAccountAPI under 'personal'
 I0320 03:55:14.855456 node/node.go:304] InProc registered *les.LightDummyAPI under 'eth'
 I0320 03:55:14.855487 node/node.go:304] InProc registered *downloader.PublicDownloaderAPI under 'eth'
 I0320 03:55:14.855534 node/node.go:304] InProc registered *filters.PublicFilterAPI under 'eth'
 I0320 03:55:14.855556 node/node.go:304] InProc registered *ethapi.PublicNetAPI under 'net'
 I0320 03:55:14.855594 node/node.go:330] IPC registered *node.PrivateAdminAPI under 'admin'
 I0320 03:55:14.855612 node/node.go:330] IPC registered *node.PublicAdminAPI under 'admin'
 I0320 03:55:14.855653 node/node.go:330] IPC registered *debug.HandlerT under 'debug'
 I0320 03:55:14.855671 node/node.go:330] IPC registered *node.PublicDebugAPI under 'debug'
 I0320 03:55:14.855684 node/node.go:330] IPC registered *node.PublicWeb3API under 'web3'
 I0320 03:55:14.855703 node/node.go:330] IPC registered *ethapi.PublicCompilerAPI under 'eth'
 I0320 03:55:14.855721 node/node.go:330] IPC registered *ethapi.CompilerAdminAPI under 'admin'
 I0320 03:55:14.855747 node/node.go:330] IPC registered *ethapi.PublicEthereumAPI under 'eth'
 I0320 03:55:14.855794 node/node.go:330] IPC registered *ethapi.PublicBlockChainAPI under 'eth'
 I0320 03:55:14.855849 node/node.go:330] IPC registered *ethapi.PublicTransactionPoolAPI under 'eth'
 I0320 03:55:14.855861 node/node.go:330] IPC registered *ethapi.PublicTxPoolAPI under 'txpool'
 I0320 03:55:14.855875 node/node.go:330] IPC registered *ethapi.PublicDebugAPI under 'debug'
 I0320 03:55:14.855889 node/node.go:330] IPC registered *ethapi.PrivateDebugAPI under 'debug'
 I0320 03:55:14.855902 node/node.go:330] IPC registered *ethapi.PublicAccountAPI under 'eth'
 I0320 03:55:14.855936 node/node.go:330] IPC registered *ethapi.PrivateAccountAPI under 'personal'
 I0320 03:55:14.855961 node/node.go:330] IPC registered *les.LightDummyAPI under 'eth'
 I0320 03:55:14.855980 node/node.go:330] IPC registered *downloader.PublicDownloaderAPI under 'eth'
 I0320 03:55:14.856009 node/node.go:330] IPC registered *filters.PublicFilterAPI under 'eth'
 I0320 03:55:14.856021 node/node.go:330] IPC registered *ethapi.PublicNetAPI under 'net'
 I0320 03:55:14.856139 node/node.go:341] IPC endpoint opened: /home/lash/.ethereum/geth.ipc
 I0320 03:55:16.954996 p2p/nat/nat.go:109] network port tcp:30303 could not be mapped: no UPnP or NAT-PMP router discovered
 I0320 03:55:16.969600 p2p/server.go:737] Added Peer 78de8a0916848093 191.235.84.50:30303
 I0320 03:55:16.969731 les/serverpool.go:165] connecting to 78de8a0916848093, state: 1
 I0320 03:55:16.969756 les/handler.go:313] Peer 78de8a0916848093 [les/1]: peer connected [Geth/v1.5.9-stable-a07539fb/linux/go1.7]
 I0320 03:55:18.042897 les/handler.go:339] LES: register peer 78de8a0916848093
 I0320 03:55:18.042950 les/fetcher.go:242] received announce from peer 78de8a0916848093  #3374100  a6aec54716c758e6  reorg: 0
 I0320 03:55:18.043352 les/serverpool.go:187] registered 78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d
 I0320 03:55:19.855467 les/odr.go:240] networkRequest  err = context deadline exceeded
 I0320 03:55:19.855509 internal/ethapi/api.go:578] call took 5.00009145s
 I0320 03:55:19.855525 contracts/release/release.go:134] Failed to retrieve current release: Missing trie node 0ceaf36085b50246f9654fcbaa3c8abfa4d0e5ea9f57df048dfab02159c26447
 I0320 03:55:34.848273 eth/downloader/downloader.go:1474] Quality of service: rtt 20s, conf 1.000, ttl 1m0s

... only output after this is new lines of QOS (also when using --verbosity 6


Is this expected behavior from these versions?

1

I got the same hanging behavious with geth v1.5.9 .

I executed:

geth --light console

I also attached to the first instance to check out the methods you used:

geth attach

I found that I could not execute any commands in both consoles for the first ~ 10 minutes.

I had to break out of the first command console by pressing ^C 10 times.

I then restarted both commands again.

And the following command works:

> eth.getBalance("0x50dbed63da86ea1ca8c0bdce04d72228113be842")
591684102184704

I noticed that the synchronisation stopped at block 3,37.... while EtherScan.io was at block 3,38.... .

I exited the geth --light console console and restarted using the same command.

I0320 15:22:55.733141 core/headerchain.go:342] imported  192 headers in  31.112ms. #3383936 [2cde5f24… / 572d0c61…]
I0320 15:22:57.311638 core/headerchain.go:342] imported  192 headers in 250.223ms. #3384128 [d4bbf633… / 38dcd347…]
I0320 15:22:57.873056 core/headerchain.go:342] imported   13 headers in  20.722ms. #3384141 [a1373032… / b32e2eb6…]
> eth.blockNumber
3384141
> eth.syncing
false
> eth.getBalance("0x50dbed63da86ea1ca8c0bdce04d72228113be842")
970787901064008288
> I0320 15:23:20.291722 core/headerchain.go:342] imported    1 headers in   9.090ms. #3384142 [d6228133… / d6228133…]

This is the correct current balance for the account 0x50dbed63da86ea1ca8c0bdce04d72228113be842.

Seems that the light client syncing has problems communicating with Ethereum nodes with the light client syncing.

The workaround is to restart several times when first light syncing.


Update

The geth --light console command prompt periodically hangs and my notebook fan starts spinning heavily.

As the following console message states:

I0320 15:30:28.698112 les/backend.go:191] WARNING: light client mode is an experimental feature

Searching geth outstanding issues with the keyword "light" shows up 12 issues, including an unresponsive console while the syncing is in progress.

You may want to wait until some of these issues are resolved and/or the light client mode comes out of experimental mode.

  • 1
    Thanks for this heads up. The latter attempt I was describing was using 1.5.9-stable from the release/1.5 branch. And using that it didn't even start syncing. So the behavior in this case is not the same. I'm aware of the experimental status. – lash Mar 20 '17 at 7:45

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.