ainblockchain / ain-blockchain

Official Javascript implementation of AI Network Blockchain.
https://www.ainetwork.ai/
MIT License
67 stars 27 forks source link

[BUG] ntpsync error first seen? #430

Open minsulee2 opened 3 years ago

minsulee2 commented 3 years ago

Got firstly the below message during data compatibility test. (Env: four of data version 1.0.0 and one of data version 2.0.0)

[CONSENSUS] ntpsync error: Error: Operation timed out Error: Operation timed out

The error message came up in the node version 2.0.0. This error didn't stop the entire network though, reported this for the future accident prevention.

liayoo commented 3 years ago

This is actually a known issue, and I thought I mentioned & left comments about the issue but apparently not... If you see here, ntpsync doesn't allow "concurrent NTP requests or chains of NTP requests", so the error is seen occasionally if you run multiple nodes on one machine (e.g. local hosting env). I left it as it is because 1) it doesn't really affect the nodes nor the tests, 2) it doesn't seem to happen very often, and 3) we don't run multiple nodes in a GCP instance for the testnet. But if we decide to avoid the error message, I could simply add a hosting env check before the ntpsync call. Let me know your thoughts!