After network restart latest block points to wrong block number
After network restart (restarting all nodes of network), latest block points to wrong block number.
Geth Version: 1.8.12-stable Git Commit: 4baffd64bda63208f9a9d153e975b52dabbfa32f Quorum Version: 2.2.0 Architecture: amd64 Protocol Versions: [63 62] Network Id: 1337 Go Version: go1.9.7 consensus algo - RAFT
when accessing latest block or block number it shows incorrect block number
eth.blockNumber 498
In network it has blocks up 1000
eth.getBlock(1000) { difficulty: 131072, extraData: "0x0000000000000000000000000000000000000000000000000000000000000000f84432b841883e9761cedb49f6fe903f0da0737914bceb1f71bc6a6018450f40e46b96ea910d29a284311420c7995f6b26b485895ff32de230a790f67193cecba438ba1f4801", gasLimit: 2551271, gasUsed: 42008, hash: "0x62dd316d19379f426cc0dde3d2c753a58a02def86342bb002ed05efb850ee07d", logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", miner: "0x0000000000000000000000000000000000000000", mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000", nonce: "0x0000000000000000", number: 1000, parentHash: "0x3a2ed6218477beaa679f750f34da5b5a66e5f9cb1edb1248061fda59e3054786", receiptsRoot: "0x5834bf566ed3a6417b53d443cd8372255e32169894ef8bfde24b52bd5cf5bc8f", sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", size: 757, stateRoot: "0xdbaca87099ab45c821749edc441e24605d1c24389dc90299ac9033c8a2a0ce26", timestamp: 1551511800495946500, totalDifficulty: 131072700, transactions: ["0xedbd07d197c461140102ce63e5eda997fe084fe92e2b492ea9c0a444fc94a2b2"], transactionsRoot: "0x33e698b6c744026c1ea17823c4528c24dd1315e6071c960ab1e0e41260fbd380", uncles: [] }
┆Issue is synchronized with this Trello card
What can you see at the end of the log file? Are there any error messages? Also, can you paste you genesis file and the geth command line here please.
No there is no error in log file.
genesis file:- { "alloc": { "8150ae297bf0cfa6c39e92ec348710f7e356ddfe": {"balance": "1000000000000000000000000000"}, "f785a03d07b1c833b059b655b7cdad90a0c5ad3f": {"balance": "1000000000000000000000000000"}, "a04544bb29563c1edde7762b2935577ff0ee8662": {"balance": "1000000000000000000000000000"}, "a85c2bfd864d9a8e67d00ee489728a4ab3377114": {"balance": "1000000000000000000000000000"}, "cacc7fccd1eab4988e375a4a81d4dcb56cfe529e": {"balance": "1000000000000000000000000000"} }, "coinbase": "0x0000000000000000000000000000000000000000", "config": { "byzantiumBlock": 1, "chainId": 12, "eip150Block": 1, "eip155Block": 0, "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip158Block": 1, "isQuorum":true }, "difficulty": "0x02BC", "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0x001E8480", "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", "nonce": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp": "0x00" }
node start command:-
geth --datadir node --nodiscover --verbosity 5 --networkid
You appear to have a mistake in the command line you pasted; the "--networkid" parameter must be followed by the network id to attach to. Geth won't start up in the form you pasted. Please check that the networkid and the raft network id specified on the command line are correct.
Are you able to attach your log file here, in case there is something unusual I can spot.
BTW I notice that you don't have "homesteadBlock" flag set in your genesis, you may want to set that.
You appear to have a mistake in the command line you pasted; the "--networkid" parameter must be followed by the network id to attach to. Geth won't start up in the form you pasted. Please check that the networkid and the raft network id specified on the command line are correct.
Are you able to attach your log file here, in case there is something unusual I can spot.
network id is 12, included in the command after networkid parameter
node logs:- node.log
@vaibhav-eleven was this running in docker or any other container env?
BTW I notice the following message in the log file: "Head state missing, repairing chain" This implies that geth didn't shut down cleanly, which may cause a resync.
There are also a couple of the following messages: "Dial error" .... "getsockopt: connection refused", so the node could be having problems resyncing.
@vaibhav-eleven was this running in docker or any other container env?
No, its on azure vm.
getsockopt
- "Dial error" .... "getsockopt: connection refused"-> One of the network peer was down.
- How we can shut down geth cleanly? I have tried to restart many times (first kill the geth process and then tessera) but result is same.
- Is there a way we can resolve this lost block issue?
You can cleanly shutdown a node by sending a TERM signal to the process: kill
To resolve the lost block issue, you could try removing the db on the faulty node ("geth removedb") and performing a resync.
@SatpalSandhu61 please help me,I have encountered the same problem but can't solve it,2leader,1follower,restart One of the leader,i find it lost all blocks
java -Xms128M -Xmx128M -jar /home/vagrant/tessera/tessera-app-0.8-app.jar -configfile /home/dyjr/leader/tessera/tessera-config-enhanced-1.json
geth --datadir geth/data --nodiscover --verbosity 5 --networkid 10 --raft --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,raft --emitcheckpoints --permissioned --raftport 50001 --rpcport 8545 --port 30303
@xuyongchaovv Looking at the logs I can see that node is unable to connect to any peer to retrieve chain information: "connection refused" due to error "discovery is disabled". In order for this node to connect to the peers, you need to do the following:
- add it to the static-nodes.json on the peers, or start peers without the "--nodiscover" option
- add the node to the permissioned-nodes.json file on the peers, or start peers without the "--permissioned" option
Closing this ticket as there has been no discussion on the original issue for 22 days. @xuyongchaovv feel free to reopen or raise another ticket if necessary.