-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Description
Hi there,
After being running a mainnet Geth node for a couple of months, I get a block number which value is always zero when I execute eth_blockNumber rest RPC call.
System information
Version: 1.8.1-stable
Git Commit: 1e67410
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.9.4
Operating System: linux
Expected behaviour
After being running for a couple of months, executing RPC calls to my mainnet Geth node falls into a block number which value is always zero.
I would expect to get the current block number.
Actual behaviour
I run geth with the following parameters:
/usr/local/bin/geth --datadir /blockchains/ethereum/mainnet --syncmode fast --cache 2048 --port 30304 --rpc --rpcaddr 0.0.0.0 --rpcport 8645 --ws --wsport=8547
On the syslog I get:
Mar 29 07:35:25 localhost geth[5706]: INFO [03-29|07:35:25] Imported new block headers count=1 elapsed=10.102ms number=5341766 hash=33117b…015f6c ignored=
seems like there's an issue on the REST RPC eth_blockNumber method:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' http://localhost:8645
{"jsonrpc":"2.0","id":83,"result":"0x0"}
Steps to reproduce the behaviour
Geth command:
/usr/local/bin/geth --datadir /blockchains/ethereum/mainnet --syncmode fast --cache 2048 --port 30304 --rpc --rpcaddr 0.0.0.0 --rpcport 8645 --ws --wsport=8547
Execute eth_blockNumber RPC call:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' http://localhost:8645
{"jsonrpc":"2.0","id":83,"result":"0x0"}