Closed sznariOsmosis closed 2 years ago
It looks like the node is not synced.
getBlock('latest') must be returning 0 https://github.com/blockchain-etl/ethereum-etl/blob/develop/ethereumetl/streaming/eth_streamer_adapter.py#L40
看起来节点没有同步。
getBlock('latest') 必须返回 0 https://github.com/blockchain-etl/ethereum-etl/blob/develop/ethereumetl/streaming/eth_streamer_adapter.py#L40
The above error was solved. I synced directly to block 46146 and reported the following error: "Make sure Ethereum node is synced", but my Ethereum node is syncing
eth.syncing { currentBlock: 12961805, highestBlock: 12962575, knownStates: 0, pulledStates: 0, startingBlock: 12962264 }
Bumping this issue... Here is what I am facing...
My eth.syncing
but, getBlock('latest') is show the block number==0:
When I run the streaming, it shows 0 blocks and waits...
My geth node has been syncing for about 24 hours. According to this stack exchange, I have to wait for the node to fully sync before the getBlock('latest') will update properly: https://ethereum.stackexchange.com/questions/16537/why-is-getblock-latest-returning-0
For future people researching this issue... the answer seems to be to wait, even several hours after full sync:
https://github.com/ethereum/go-ethereum/issues/14338:
Geth 1.6.0 uses fast sync by default. The block states are unavailable for intermediate blocks and are downloaded only for the recent state. As such, up to the point that sync completes, the latest complete block is zero, since all newer blocks are incomplete during sync. When fast sync finishes, it downloads the associated state for the head, so the head block becomes complete and the latest block can be bumped to the current head.
and...
Issue resolved, Solution is to wait till all state entries complete download after all blocks sync, There are around 300 million state entries which could take anything between 3 to 4 hour or more depending on net speed.
Final update... 24 hours after eth.syncing was showing currentBlock as up to date, the states are finally downloaded and GETH is fully synced. Now getBlock('latest').number is showing the currentBlock.
Thanks, updated the docs https://ethereum-etl.readthedocs.io/en/latest/exporting-the-blockchain/
Final update... 24 hours after eth.syncing was showing currentBlock as up to date, the states are finally downloaded and GETH is fully synced. Now getBlock('latest').number is showing the currentBlock.
so geth is fully synced when getBlock('latest').number is what eth.syncing .currentBlock showing,right?
It is when the STATES are fully downloaded. At the same time, getBlock('latest') == eth.currentBlock
so geth is fully synced when getBlock('latest').number is what eth.syncing .currentBlock showing,right?
ethereumetl stream --start-block 500000 -e block,transaction --log-file log.txt \ --provider-uri file:///datalake/blockdata/geth.ipc \ --output=postgresql+pg8000://postgres:admin@127.0.0.1:5432/ethereum
why? root [INFO] - Current block 0, target block 0, last synced block 499999, blocks to sync 0 oot [INFO] - Nothing to sync. Sleeping for 10 seconds...