Qitmeer / qng

The next generation of the Qitmeer network implementation with the plug-able VMs under the MeerDAG consensus.
ISC License
19 stars 17 forks source link

node suddenly started going into sync mode #779

Closed saiharish-1029 closed 1 month ago

saiharish-1029 commented 2 months ago

Hey @dindinw , i am currently using qng 1.2.0 version privnet network. i started running 4 nodes in privnet. After the nodes reached certain difficulty or blocks the nodes stopped working or mining. So i restarted a node then the following warning started to show up and rest of the nodes remain stuck at that point itself. when i restarted the rest of the nodes, all of them are giving the same warning.

2024-09-16|05:49:28.338 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner 2024-09-16|05:49:29.339 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner 2024-09-16|05:49:30.340 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner 2024-09-16|05:49:31.341 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner 2024-09-16|05:49:32.341 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner 2024-09-16|05:49:33.341 [WARN ] qitmeer is downloading blocks... : Client in initial download module=miner

Can you please help me out, how can i resolve this issue?

dindinw commented 2 months ago

Generally speaking, privnet basically uses single-node mode, and generally does not use external miners. In the most of case started with the --generate cli option to open the built-in miner for block generation. The error you encountered is because the miner tries to submit a new block when the node is not synchronized, and gives a warning message. It is recommended not to use multi-node mode in privnet mode.

saiharish-1029 commented 2 months ago

First i tried to run the testnet with 4 nodes got same warning so then i switched to the privnet still got the same warning. @dindinw , Can you please tell the reason why does the nodes stopped mining and i had to restart the network. or should add any other flags for this to be working

the command i am currently using to run the testnet is : ./qng --testnet --rpclisten=0.0.0.0:38131 --notls --rpcuser=test --rpcpass=test --miner --miningaddr=TnNbgxLpoPJCLTcsJbHCzpzcHUouTtfbP8c --generate --walletpass=test --evmenv="--http --http.port=18545 --http.addr=0.0.0.0 --http.api=net,web3,eth,qng --ws --ws.port=18546"

dindinw commented 2 months ago

If you use the testnet, no matter how many nodes you start, usually you do not need to mine. You only act as a synchronization node and only need to synchronize blocks (that is, remove --generate). Please pay attention to your firewall configuration and make sure the P2P port remains open to ensure that the node can synchronize smoothly (18130 by default for the testnet).

saiharish-1029 commented 2 months ago

I need to run my own small testnet network, so I don't want to connect to the existing network. So, I need help regarding the above issue.